feat: allow session/set_mode to switch collaboration presets (plan/default)#168
Open
z-x-yang wants to merge 2 commits intozed-industries:mainfrom
Open
feat: allow session/set_mode to switch collaboration presets (plan/default)#168z-x-yang wants to merge 2 commits intozed-industries:mainfrom
z-x-yang wants to merge 2 commits intozed-industries:mainfrom
Conversation
Member
|
We can also expose this as a config option instead? and allow for setting both? |
Author
|
@benbrandt great point — yes, this should support both paths. In
I verified both flows locally via |
Author
|
Follow-up update pushed to this PR branch (
Related tracking issue: #172. |
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.
Why
acpxdocumentsset-mode plan, but withcodex-acpthe ACP call fails withInvalid paramsbecauseset_session_modecurrently only accepts approval presets (read-only/auto/full-access).In practice this means ACP clients can set approval mode, but cannot switch collaboration presets (especially
plan) viasession/set_mode.What this PR changes
src/thread.rssosession/set_modesupports both:read-only,auto,full-access)models_manager.list_collaboration_modes()(includingplananddefault)SessionModeState.availableModesso ACP clients can discover them.active_mode_idsoload/config mode state reflects the latest selected mode.Validation
cargo checkcargo test test_set_mode_plan_routes_to_collaboration_modeBehavior notes
set_mode(plan)now routes throughOp::OverrideTurnContext { collaboration_mode: Some(...) }.set_mode(auto/read-only/full-access)still updates approval/sandbox policies exactly as before.If maintainers prefer, I can split this into: