feat(desktop): add OMP model and plan controls
What & why
Fixes #6801.
Superset only exposed OMP's reasoning effort in the new-workspace flow. This adds executable-aware OMP launch capabilities without applying OMP-only flags to the legacy pi CLI:
- model choices for configured OMP roles and current Anthropic/OpenAI Codex selectors;
- a persisted
Direct mode/Plan firstpicker; - end-to-end
modepropagation through workspace/session creation and direct agent launches; - host-side validation and argv construction for
--model,--thinking, and--plan-yolo; - per-capability local preference persistence for both new-workspace surfaces.
Existing configs that retain the Pi preset/icon but override the executable to omp are detected from the command. A true pi executable keeps the legacy Pi capability surface.
How I tested it
bun run lintbun run typecheck— 37/37 tasks passedbun test packages/shared/src/agent-models.test.ts packages/host-service/src/trpc/router/agents/agents.test.ts— 72 pass, 0 fail- Desktop CDP flow against the local dev app:
- configured the Pi preset to execute
omp; - selected Oh My Pi in New Workspace;
- confirmed configured-role and exact-model choices, including GPT-5.6 Sol;
- selected Configured plan model and Plan first;
- closed and reopened the modal and confirmed both preferences persisted;
- captured the rendered modal and confirmed all four selectors fit without clipping.
- configured the Pi preset to execute
bun run test was also attempted. It finished with 3 failures in packages/host-service/test/integration/terminal.integration.test.ts (real-daemon session disposal/reaper/restart timeouts); the changed focused suites above passed.
Checklist
- PR title follows conventional commits (
type(scope): subject) -
bun run lintandbun run typecheckpass (CI fails on lint warnings too) - Allow edits from maintainers is enabled on this fork PR
Summary by cubic
Adds executable-aware Oh My Pi (OMP) model selection and a Plan-first mode across desktop workspace creation and direct agent launches. Previously only reasoning effort was exposed; now model, effort, and mode propagate end-to-end with safe defaults, while a true Pi executable keeps the legacy Pi surface.
- UI: adds a mode picker backed by
useAgentModePreference(per-preset, localStorage); renders whengetAgentModeSupportexists. Agent selection now exposes alaunchPresetIdso OMP controls appear when the preset runsomp. - Shared (
@superset/shared/agent-models): introducesAGENT_MODE_SUPPORT,getAgentModeSupport,buildAgentModeArgs, andresolveAgentLaunchPresetId; adds OMP model catalog and reuses Pi thinking levels for OMP. - Host: validates mode via
validateAgentModeSelectionand consolidates checks invalidateAgentLaunchOptions; TRPC inputs acceptmode; argv construction includes--model,--thinking, and--plan-yolofor OMP. - Rollout: existing Pi presets that point to an
ompexecutable automatically gain OMP controls; realpikeeps Pi behavior. Stale stored mode ids are ignored; no migrations required.
Summary by CodeRabbit
-
New Features
- Added launch-mode selection when creating a workspace, including Direct and Plan modes where supported.
- Remembers the last selected mode for each agent preset.
- Added Open Model Protocol (OMP) support with model, effort, and plan-mode options.
- Applies selected modes when launching agents and supports executable-based preset detection.
-
Bug Fixes
- Validates unsupported launch modes before starting agents and ensures consistent handling across workspace creation flows.