-
Notifications
You must be signed in to change notification settings - Fork 3k
fix(daemon): Refresh workspace provider defaults #5638
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
c222522
69e2ddd
7af9a39
5a52d1c
42bf3a0
c3c63f9
925263b
9a8f133
b4c1138
4d47fb5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1614,6 +1614,14 @@ export function createAcpSessionBridge(opts: BridgeOptions): AcpSessionBridge { | |
| transportClosed, | ||
| ]); | ||
| publishModelSwitched(entry, modelId, originatorClientId); | ||
| broadcastWorkspaceEvent({ | ||
| type: 'settings_changed', | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [Suggestion] This — qwen3.7-max via Qwen Code /review |
||
| data: { | ||
| key: 'model.name', | ||
| value: modelId, | ||
| }, | ||
| ...(originatorClientId ? { originatorClientId } : {}), | ||
| }); | ||
| succeeded = true; | ||
| } catch (err) { | ||
| // Surface the failure to ALL attached clients, not just the | ||
|
|
@@ -3944,6 +3952,14 @@ export function createAcpSessionBridge(opts: BridgeOptions): AcpSessionBridge { | |
| // the agent's authoritative canonical id and re-publishes if it | ||
| // differs. | ||
| publishModelSwitched(entry, req.modelId, originatorClientId); | ||
| broadcastWorkspaceEvent({ | ||
| type: 'settings_changed', | ||
| data: { | ||
| key: 'model.name', | ||
| value: req.modelId, | ||
| }, | ||
| ...(originatorClientId ? { originatorClientId } : {}), | ||
| }); | ||
| succeeded = true; | ||
| return result; | ||
| } finally { | ||
|
|
@@ -3983,8 +3999,6 @@ export function createAcpSessionBridge(opts: BridgeOptions): AcpSessionBridge { | |
| }); | ||
| throw err; | ||
| } | ||
| // model_switched is published inside the work callback above (while the | ||
| // suppress flag is still set), mirroring applyModelServiceId. | ||
| return response; | ||
| }, | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Suggestion]
settings_changedis broadcast here and insetSessionModel(line 3955), but two otherpublishModelSwitchedcall sites were not updated:onModelPromotedcallback — invoked when the ACP child sendscurrent_model_update(agent changes its own model mid-conversation). OnlypublishModelSwitchedis called, nosettings_changed.currentModelId, the bridge corrects viapublishModelSwitched— but nosettings_changed.Clients using
settings_changedto refresh settings/model-name display will show stale data when the agent autonomously switches models or the bridge corrects on reconnect. The existing reconciliation test (around line 9337) only assertssettings_changedfor the client-requested switch, not the corrective one.— qwen3.7-max via Qwen Code /review