maple-agent: adopt a task's locked model in the selector - #1051
Merged
Merged
Conversation
Existing tasks already lock to their first model in the runtime, but the composer kept a global last-used selection. Opening a task now points the selector at that locked model without changing the account default, New Task restores the default, and a locked task's menu only offers that model. Fixes #1050
The lock was set only when a task was opened, so the task just started stayed unlocked after its first message and the menu still offered every model. Leaving a task kept its lock too: archiving or deleting the last task in a project left the empty screen on that task's model, and a new task would start on it. The summary update for the task on screen now re-applies the lock, and leaving a task restores the default. A locked chip shows a lock icon and its menu row says why it is the only choice. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1050.
The runtime already locks a task to its first model. The desktop composer kept a single global last-used selection, so switching from a GLM task to a Kimi task still showed GLM and send hit the lock error.
This matches ACP: once a task has messages, the selector shows that model and the menu only offers it. The account default is unchanged, so New Task restores it. Picking a model on a draft still updates the default.
Follow-up (ed292e4):
Test plan
cargo test -p maple-agent-app --locked ui::chat::testscargo clippy -p maple-agent-app --all-targets --locked -- -D warningsjust ci(474 crate + 418 app tests). The two new tests fail on a5139f7./model kimion the GLM task shows the lock notice.🤖 Generated with Claude Code