Skip to content

feat(acp): add in-session mode/model/agent controls with ACP preference persistence#47

Open
iguit0 wants to merge 1 commit intomainfrom
feat/acp-session-controls
Open

feat(acp): add in-session mode/model/agent controls with ACP preference persistence#47
iguit0 wants to merge 1 commit intomainfrom
feat/acp-session-controls

Conversation

@iguit0
Copy link
Contributor

@iguit0 iguit0 commented Mar 6, 2026

Summary

This PR makes ACP mode/model/agent configurable at runtime from the session header and persists those selections per session, with workspace defaults fallback for new/empty sessions. #40

Why

ACP mode/model/agent were not fully controllable from the session UI, and selections were not persisted in a way that supports consistent resume/new-session behavior.

What Changed

  • Added header controls for:
  • Mode
  • Model
  • Agent
  • Advanced config options
  • Added disabled behavior when streaming or disconnected.
  • Kept Model/Agent visible and disabled with “Unavailable from ACP” if ACP does not expose those options.
  • Added ACP config-option support in Rust and TS types.
  • Added new Tauri command:
  • acp_set_config_option(workspace_id, session_id, config_id, option_id) mapped to session/set_config_option (option_id -> ACP value).
  • Added session/workspace preference persistence:
  • sessions.acp_preferences_json column
  • workspace_acp_defaults table
  • session_update_acp_preferences
  • workspace_acp_defaults_get
  • workspace_acp_defaults_set
  • Updated forget_workspace_data to delete workspace ACP defaults for directory workspaces.
  • Implemented preference application order on session init:
  • ACP session info
  • session preferences
  • workspace defaults fallback when session prefs are empty
  • apply mode first, then config options
  • ignore stale/invalid IDs safely
  • Preserved planning workflow auto-switch behavior:
  • planning => force plan
  • approve => force agent
  • append notice message when auto-switch occurs
  • workflow-forced mode changes do not overwrite user defaults

Data Contract

acp_preferences_json:

{
  "modeId": "string | null",
  "selectedConfigOptions": {
    "configId": "optionId"
  }
}

@iguit0 iguit0 requested a review from wilcorrea March 6, 2026 06:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant