Notify of plugin updates and add update UX (#339)

This commit is contained in:
Gregory Schier
2026-01-02 10:03:08 -08:00
committed by GitHub
parent e751167dfc
commit 0146ee586f
20 changed files with 375 additions and 103 deletions

View File

@@ -10,8 +10,18 @@ export const plugin: PluginDefinition = {
// 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');
setTimeout(() => {
mcpServer = createMcpServer({ yaak: ctx }, serverPort);
setTimeout(async () => {
try {
mcpServer = createMcpServer({ yaak: ctx }, serverPort);
} catch (err) {
console.error('Failed to start MCP server:', err);
ctx.toast.show({
message: `Failed to start MCP Server: ${err instanceof Error ? err.message : String(err)}`,
icon: 'alert_triangle',
color: 'danger',
timeout: 10000,
});
}
}, 5000);
},