Merge main into proxy branch (formatting and docs)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Gregory Schier
2026-03-13 12:09:59 -07:00
parent 3c4035097a
commit 7314aedc71
712 changed files with 13408 additions and 13322 deletions

View File

@@ -1,7 +1,7 @@
import type { Context, PluginDefinition } from '@yaakapp/api';
import { createMcpServer } from './server.js';
import type { Context, PluginDefinition } from "@yaakapp/api";
import { createMcpServer } from "./server.js";
const serverPort = parseInt(process.env.YAAK_PLUGIN_MCP_SERVER_PORT ?? '64343', 10);
const serverPort = parseInt(process.env.YAAK_PLUGIN_MCP_SERVER_PORT ?? "64343", 10);
let mcpServer: Awaited<ReturnType<typeof createMcpServer>> | null = null;
@@ -9,16 +9,16 @@ export const plugin: PluginDefinition = {
async init(ctx: Context) {
// Start the server after waiting, so there's an active window open to do things
// like show the startup toast.
console.log('Initializing MCP Server plugin');
console.log("Initializing MCP Server plugin");
setTimeout(async () => {
try {
mcpServer = createMcpServer({ yaak: ctx }, serverPort);
} catch (err) {
console.error('Failed to start MCP server:', err);
ctx.toast.show({
console.error("Failed to start MCP server:", err);
void ctx.toast.show({
message: `Failed to start MCP Server: ${err instanceof Error ? err.message : String(err)}`,
icon: 'alert_triangle',
color: 'danger',
icon: "alert_triangle",
color: "danger",
timeout: 10000,
});
}
@@ -26,7 +26,7 @@ export const plugin: PluginDefinition = {
},
async dispose() {
console.log('Disposing MCP Server plugin');
console.log("Disposing MCP Server plugin");
if (mcpServer) {
await mcpServer.close();