From 2f45e2f7231ef60e674dd7fd9da4913089ea2648 Mon Sep 17 00:00:00 2001 From: B Harper Date: Tue, 28 Oct 2025 08:55:12 +1100 Subject: [PATCH] Add startup notification feature with user configuration option --- package.json | 5 +++++ src/extension.ts | 26 ++++++++++++++++++++++++++ 2 files changed, 31 insertions(+) diff --git a/package.json b/package.json index afe32dc..f3b3f95 100644 --- a/package.json +++ b/package.json @@ -141,6 +141,11 @@ "type": "boolean", "default": true, "description": "Enable visual flashing notifications when AI agents send messages" + }, + "humanagent-mcp.notifications.showStartup": { + "type": "boolean", + "default": true, + "description": "Show startup notification when HumanAgent MCP extension is activated" } } } diff --git a/src/extension.ts b/src/extension.ts index 0b3a84b..2545ce1 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -156,6 +156,32 @@ export async function activate(context: vscode.ExtensionContext) { // Auto-start server and register session (no mcp.json dependency) await ensureServerAndRegisterSession(workspaceSessionId); + // Show startup notification + const notificationConfig = vscode.workspace.getConfiguration('humanagent-mcp'); + const showStartupNotification = notificationConfig.get('notifications.showStartup', true); + + if (showStartupNotification) { + vscode.window.showInformationMessage( + 'HumanAgent MCP Extension Started Successfully! 🚀', + 'Open Chat', + 'Show Status', + 'Don\'t Show Again' + ).then(selection => { + switch (selection) { + case 'Open Chat': + vscode.commands.executeCommand('humanagent-mcp.chatView.focus'); + break; + case 'Show Status': + vscode.commands.executeCommand('humanagent-mcp.showStatus'); + break; + case 'Don\'t Show Again': + notificationConfig.update('notifications.showStartup', false, vscode.ConfigurationTarget.Global); + vscode.window.showInformationMessage('Startup notifications disabled. You can re-enable them in settings.'); + break; + } + }); + } + // Restore the persisted session name after server is running (with retry) setTimeout(async () => { try {