Skip to content

Commit 3aaf9c6

Browse files
author
Zehee
committed
feat: auto-open browser when MCP server starts vis dashboard
- When KIMI_MEMORY_AUTO_VIS=1, MCP server starts dashboard and opens browser - open_memory_dashboard tool already opens browser - Ignore open failures in headless environments
1 parent ed0b85e commit 3aaf9c6

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

‎src/server.ts‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,12 @@ async function main() {
114114
const visResult = await maybeStartVisServer(ctx);
115115
if (visResult.started && visResult.url) {
116116
process.stderr.write(`[kimi-memory] vis dashboard ready at ${visResult.url}\n`);
117+
try {
118+
const { default: openBrowser } = await import('open');
119+
await openBrowser(visResult.url);
120+
} catch {
121+
// Browser may not be available in headless/server environments; ignore.
122+
}
117123
} else if (visResult.error) {
118124
process.stderr.write(`[kimi-memory] vis dashboard failed to start: ${visResult.error}\n`);
119125
}

0 commit comments

Comments
 (0)