Skip to content

Commit 8e4d4fc

Browse files
committed
fix: notify server when model is selected via EcaChatSelectModel
When a model was selected via EcaChatSelectModel, the local state was updated but the server was never notified. This meant the server's last-config-notified was out of sync with the client's selected model. Send chat/selectedModelChanged to the server on model selection, matching the approach used by eca-emacs. The local state update is kept for immediate header refresh since the server's response to chat/selectedModelChanged does not include selectModel. Note: /model in chat does not update the header when the selected model matches the server's last-config-notified value. This is a server-side gap where chat-selected-model-changed should include select-model in its notify-fields-changed-only! call to keep last-config-notified in sync.
1 parent a9b5ab6 commit 8e4d4fc

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

lua/eca/commands.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,7 @@ function M.setup()
454454
}, function(choice)
455455
if choice then
456456
chat.mediator:update_selected_model(choice)
457+
chat.mediator:send("chat/selectedModelChanged", { model = choice, variant = nil }, nil)
457458
end
458459
end)
459460
end, {

0 commit comments

Comments
 (0)