feat(acp): implement set_session_mode with current_mode_update notification#946
Merged
feat(acp): implement set_session_mode with current_mode_update notification#946
Conversation
…cation (#920) Add session mode support (ask/architect/code) to zeph-acp: - Override set_session_mode on ZephAcpAgent: validates mode_id, stores in SessionEntry.current_mode, emits CurrentModeUpdate notification - Populate availableModes in new_session and load_session responses via available_session_modes() and build_mode_state() helpers - Add 5 unit tests covering mode switch, notification emission, and error paths
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.
Summary
set_session_modeACP method onZephAcpAgent(ask/architect/code modes)CurrentModeUpdatesession notification on mode switchavailableModesfield innew_sessionandload_sessionresponsescurrent_mode: RefCell<SessionModeId>toSessionEntry(consistent with existingcurrent_modelpattern)Closes #920 (Epic 2 from
.local/plan/acp-gap-analysis.md)Test plan
cargo +nightly fmt --check— cleancargo clippy --workspace -- -D warnings— zero warningscargo nextest run --workspace --lib --bins— 2859/2859 passednew_session_includes_modes,set_session_mode_updates_entry,set_session_mode_emits_notification,set_session_mode_rejects_unknown_mode,set_session_mode_rejects_unknown_session