mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-04-10 19:26:49 +02:00
Notify of plugin updates and add update UX (#339)
This commit is contained in:
@@ -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);
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user