feat: toggle to keep model/agent when switching sessions#24508
feat: toggle to keep model/agent when switching sessions#24508alfredocristofano wants to merge 2 commits intoanomalyco:devfrom
Conversation
|
The following comment was made by an LLM, it may be inaccurate: Based on the search results, I found several related PRs that address similar functionality around model/agent persistence across session switches: Potentially Related PRs:
These PRs suggest there have been multiple efforts to handle model/agent state management during session switches. You may want to review #17190 and #23681 in particular to ensure there's no overlapping implementation or to understand how the previous attempts addressed this issue. |
Issue for this PR
Closes #4930
Type of change
What does this PR do?
Right now, every time you switch sessions with
Ctrl+X l, the TUI yanks your model and agent back to whatever the last message in that session used. If you were deliberately using a different setup, tough luck — you have to reconfigure it manually.This PR adds a
sync_prompt_context_on_session_switchKV preference (defaulttruefor backwards compatibility) that controls this behavior. When toggled off via the command palette, your current model and agent selection sticks with you across session switches instead of being overwritten.How did you verify your code works?
local.agentandlocal.modelfromlastUserMessage()Checklist