Skip to content

feat(vscode): add MCP server restart and edit-config buttons#7626

Open
markijbema wants to merge 3 commits intomainfrom
mark/7598-mcp-restart-edit
Open

feat(vscode): add MCP server restart and edit-config buttons#7626
markijbema wants to merge 3 commits intomainfrom
mark/7598-mcp-restart-edit

Conversation

@markijbema
Copy link
Copy Markdown
Contributor

Summary

  • Adds a per-server Restart button that sends a restartMcp message to the extension host, which calls the CLI's mcp.connect() endpoint to restart the server
  • Adds an "Edit opencode.json" button that opens the config file in VS Code's editor via the existing openFile message
  • Adds the RestartMcpMessage type to the webview message protocol and the handleRestartMcp handler in KiloProvider.ts
  • i18n strings with proper translations across all 18 locale files

Closes #7598

Comment thread packages/kilo-vscode/src/KiloProvider.ts Outdated
Comment thread packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx Outdated
@kilo-code-bot
Copy link
Copy Markdown
Contributor

kilo-code-bot bot commented Mar 25, 2026

Code Review Summary

Status: 4 Issues Found | Recommendation: Address before merge

Overview

Severity Count
CRITICAL 0
WARNING 4
SUGGESTION 0

Fix these issues in Kilo Cloud

Issue Details (click to expand)

WARNING

File Line Issue
packages/kilo-vscode/src/KiloProvider.ts 1719 Runtime-status guard blocks restarting enabled servers that were only disconnected at runtime
packages/kilo-vscode/src/KiloProvider.ts 1720 Restart targets the wrong workspace instance
Other Observations (not in diff)

Issues found in unchanged code that cannot receive inline comments:

File Line Issue
packages/opencode/src/kilocode/snapshot.ts 26 ensureGit() returns before git init, so per-worktree snapshot repos are never initialized and snapshot operations fail.
packages/kilo-vscode/src/agent-manager/git-transfer.ts 146 apply() logs untracked-file write failures but still returns success, so continue-in-worktree can silently drop files while reporting completion.
Files Reviewed (21 files)
  • packages/kilo-vscode/src/KiloProvider.ts - restart flow updated; 2 issues remain
  • packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx - previous edit-config issues resolved; no new issues
  • packages/kilo-vscode/webview-ui/src/types/messages.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/ar.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/br.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/bs.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/da.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/de.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/en.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/es.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/fr.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/ja.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/ko.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/nl.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/no.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/pl.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/ru.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/th.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/tr.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/zh.ts - no issues
  • packages/kilo-vscode/webview-ui/src/i18n/zht.ts - no issues

Reviewed by gpt-5.4-20260305 · 433,932 tokens

Comment thread packages/kilo-vscode/src/KiloProvider.ts Outdated
Comment thread packages/kilo-vscode/webview-ui/src/components/settings/AgentBehaviourTab.tsx Outdated
Comment thread packages/kilo-vscode/src/KiloProvider.ts Outdated
Comment thread packages/kilo-vscode/src/KiloProvider.ts Outdated
Add a per-server restart button that disconnects then reconnects the
MCP server via the CLI SDK. Uses the existing connect/disconnect
handlers from #7810, with a new restartMcp message type that
sequences disconnect + connect and refreshes the status display.

Closes #7598
@markijbema markijbema force-pushed the mark/7598-mcp-restart-edit branch from c959ed4 to 02fb0e2 Compare March 30, 2026 08:29
Check cached runtime status before restarting. If the server is
disabled, silently skip to avoid re-enabling it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(vscode): add MCP server restart and edit-config buttons

1 participant