mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-10-19 12:43:39 +00:00
fix(acp-bridge): forget a replaced child's runtime MCP servers (#14527)
Names recorded on channel A survived a replace to channel B until the next hasRuntimeMcpServers() call. An add on B then adopted them, so removing B's own server still reported the runtime as holding one. Clear the set when the live child changes before recording a new name. Refs #14488
This commit is contained in:
parent
53a76e4088
commit
95a55ff511
1 changed files with 6 additions and 1 deletions
|
|
@ -16173,7 +16173,12 @@ export function createSessionControlPlane(
|
|||
const addSkipped = (response as { skipped?: boolean }).skipped === true;
|
||||
if (!addSkipped) {
|
||||
const ok = response as AddOk;
|
||||
runtimeMcpServerChannelId = info.id;
|
||||
// Names recorded on a replaced child are gone with it; do not let
|
||||
// a later add on the new child inherit them.
|
||||
if (runtimeMcpServerChannelId !== info.id) {
|
||||
runtimeMcpServerNames.clear();
|
||||
runtimeMcpServerChannelId = info.id;
|
||||
}
|
||||
runtimeMcpServerNames.add(ok.name);
|
||||
broadcastWorkspaceEvent({
|
||||
type: 'mcp_server_added',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue