Repository navigation
Conversation
📝 WalkthroughWalkthroughThis pull request introduces a TUI agent profile system and The agent type model is split into
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 11
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/renderer/src/components/settings/source-control-action-recipe-options.ts (1)
136-153:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winProfile warning label drops profile context.
At Line 148,
getAgentLabel(selectedAgent)is called withoutagentProfiles, so saved profile agents can show raw IDs in the unsupported-agent warning instead of the profile label.💡 Proposed fix
export function getSourceControlActionAgentWarningText( actionId: SourceControlActionId, - selectedAgent: TuiAgent | CustomAgentId | null | undefined + selectedAgent: TuiAgent | CustomAgentId | null | undefined, + agentProfiles?: readonly TuiAgentProfile[] | null ): string | null { @@ - const agentLabel = getAgentLabel(selectedAgent) + const agentLabel = getAgentLabel(selectedAgent, agentProfiles)And thread
agentProfilesfrom callers (SourceControlActionRecipeRowandRepositorySourceControlAiActionRows).src/renderer/src/components/floating-terminal/FloatingTerminalWindowControls.tsx (1)
139-139:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPass profiles into the launch button icon.
defaultAgentcan now be a profile id; withoutprofiles,AgentIconcannot resolveprofile.baseAgentand profile launch buttons fall back to a generic letter icon.🎨 Proposed fix
- <AgentIcon agent={defaultAgent} size={14} /> + <AgentIcon agent={defaultAgent} profiles={agentProfiles} size={14} />
🧹 Nitpick comments (2)
src/shared/tui-agent-config.ts (1)
331-333: ⚡ Quick winDocument why
isTuiAgentaccepts unresolved profile-shaped IDs.This behavior is subtle and cross-cutting; a short
Why:comment here would prevent future callers from assuming existence validation happens in this guard.As per coding guidelines, “When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does.”
Suggested patch
export function isTuiAgent(value: unknown): value is TuiAgent { + // Why: this guard validates ID shape only; profile existence is resolved + // later against the current `agentProfiles` set at launch/planning time. return isBuiltInTuiAgent(value) || isTuiAgentProfileId(value) }Source: Coding guidelines
src/shared/terminal-quick-commands.ts (1)
107-110: ⚡ Quick winAdd a short rationale for preserving profile IDs during normalization.
This branch is non-obvious because it intentionally keeps profile IDs even when built-in capability checks are stricter.
As per coding guidelines, “When writing or modifying code driven by a design doc or non-obvious constraint, add a comment explaining why the code behaves the way it does.”
Suggested patch
- const agent = + // Why: keep profile IDs round-trippable in settings normalization; support + // checks for profile-backed options are evaluated later with profile context. + const agent = supportsTerminalAgentQuickCommand(record.agent) || isTuiAgentProfileId(record.agent) ? record.agent : nullSource: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2cda9610-33ad-4204-b600-c1f7dce416c4
📒 Files selected for processing (82)
src/main/agent-hooks/first-work-branch-rename.tssrc/main/agent-hooks/first-work-generation-target.tssrc/main/ipc/filesystem.tssrc/main/persistence.tssrc/main/runtime/orca-runtime-git.tssrc/main/runtime/orca-runtime.tssrc/main/text-generation/commit-message-text-generation.tssrc/renderer/src/components/NewWorkspaceComposerCard.tsxsrc/renderer/src/components/agent/AgentCombobox.tsxsrc/renderer/src/components/automations/AutomationDetail.tsxsrc/renderer/src/components/automations/AutomationEditorDialog.test.tssrc/renderer/src/components/automations/AutomationEditorDialog.tsxsrc/renderer/src/components/automations/AutomationsPage.tsxsrc/renderer/src/components/floating-terminal/FloatingTerminalWindowControls.tsxsrc/renderer/src/components/right-sidebar/SourceControl.commit-failure-recovery.test.tssrc/renderer/src/components/right-sidebar/SourceControlAgentActionDialog.tsxsrc/renderer/src/components/right-sidebar/SourceControlAgentActionDialogForm.test.tsxsrc/renderer/src/components/right-sidebar/SourceControlAgentActionDialogForm.tsxsrc/renderer/src/components/right-sidebar/buildSourceControlAgentDeliveryPlan.tssrc/renderer/src/components/right-sidebar/source-control-agent-action-dialog-result.tssrc/renderer/src/components/right-sidebar/source-control-agent-action-dialog-support.tssrc/renderer/src/components/right-sidebar/source-control-ai-commit-failure-launch.tssrc/renderer/src/components/right-sidebar/source-control-ai-prompts.tssrc/renderer/src/components/right-sidebar/use-source-control-ai.tssrc/renderer/src/components/right-sidebar/useSourceControlAgentActionDialog.tssrc/renderer/src/components/right-sidebar/useSourceControlAgentActionStart.tssrc/renderer/src/components/settings/AgentsPane.test.tsxsrc/renderer/src/components/settings/AgentsPane.tsxsrc/renderer/src/components/settings/CommitMessageAiPane.test.tsxsrc/renderer/src/components/settings/CommitMessageAiPane.tsxsrc/renderer/src/components/settings/RepositorySourceControlAiActionRows.tsxsrc/renderer/src/components/settings/RepositorySourceControlAiSection.tsxsrc/renderer/src/components/settings/SourceControlActionRecipeRow.tsxsrc/renderer/src/components/settings/SourceControlAiActionRecipeDefaults.tsxsrc/renderer/src/components/settings/repository-source-control-ai-labels.tssrc/renderer/src/components/settings/source-control-action-recipe-options.tssrc/renderer/src/components/sidebar/folder-workspace-composer-submit.tssrc/renderer/src/components/source-control/SourceControlActionVariableChips.test.tsxsrc/renderer/src/components/tab-bar/QuickLaunchButton.test.tssrc/renderer/src/components/tab-bar/QuickLaunchButton.tsxsrc/renderer/src/components/tab-bar/TabBar.tsxsrc/renderer/src/components/tab-bar/tab-agent-launch-options.test.tssrc/renderer/src/components/tab-bar/tab-agent-launch-options.tssrc/renderer/src/components/terminal-pane/terminal-agent-session-fork.tssrc/renderer/src/components/terminal-quick-commands/TerminalQuickCommandContentSection.tsxsrc/renderer/src/components/terminal-quick-commands/TerminalQuickCommandDialog.tsxsrc/renderer/src/components/terminal-quick-commands/terminal-quick-command-agent-options.test.tssrc/renderer/src/components/terminal-quick-commands/terminal-quick-command-agent-options.tssrc/renderer/src/hooks/useComposerState.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/agent-catalog.tsxsrc/renderer/src/lib/agent-paste-draft.tssrc/renderer/src/lib/fix-checks-agent-launch.tssrc/renderer/src/lib/launch-agent-background-session.tssrc/renderer/src/lib/launch-agent-in-new-tab.tssrc/renderer/src/lib/launch-agent-tab-startup-plan.tssrc/renderer/src/lib/launch-agent-web-runtime-tab.tssrc/renderer/src/lib/launch-work-item-direct.tssrc/renderer/src/lib/source-control-agent-action-plan.test.tssrc/renderer/src/lib/source-control-agent-action-plan.tssrc/renderer/src/lib/source-control-launch-agent-selection.tssrc/renderer/src/lib/worktree-creation-flow.tssrc/renderer/src/store/slices/settings.tssrc/renderer/src/web/web-preload-api.tssrc/shared/agent-process-recognition.tssrc/shared/constants.tssrc/shared/source-control-ai-actions.test.tssrc/shared/source-control-ai-actions.tssrc/shared/terminal-quick-commands.tssrc/shared/tui-agent-config.tssrc/shared/tui-agent-launch-defaults.tssrc/shared/tui-agent-profile-id.tssrc/shared/tui-agent-profiles.test.tssrc/shared/tui-agent-profiles.tssrc/shared/tui-agent-startup-command.tssrc/shared/tui-agent-startup.test.tssrc/shared/tui-agent-startup.tssrc/shared/types.ts
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/lib/worktree-creation-flow.ts (1)
61-112: 💤 Low valueMinor: Direct mutation of return value could be replaced with spread.
Line 109 mutates the
startupPlanobject returned bybuildAgentStartupPlan. While safe because the function returns a fresh object, using a spread would be more explicit:- if (startupPlan && template.draftPrompt) { - startupPlan.draftPrompt = template.draftPrompt - } - return startupPlan + if (!startupPlan) { + return null + } + return template.draftPrompt ? { ...startupPlan, draftPrompt: template.draftPrompt } : startupPlanThis is optional—the current code is functionally correct since
buildAgentStartupPlanreturns a new object literal.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: e05e3075-b64b-498c-a9cd-ba964bcca667
📒 Files selected for processing (27)
src/renderer/src/components/NewWorkspaceComposerCard.tsxsrc/renderer/src/components/floating-terminal/FloatingTerminalWindowControls.tsxsrc/renderer/src/components/settings/AgentsPane.test.tsxsrc/renderer/src/components/settings/CommitMessageAiPane.test.tsxsrc/renderer/src/components/settings/RepositorySourceControlAiActionRows.tsxsrc/renderer/src/components/settings/SourceControlActionRecipeRow.tsxsrc/renderer/src/components/settings/source-control-action-recipe-options.tssrc/renderer/src/components/tab-bar/TabBar.tsxsrc/renderer/src/components/tab-bar/tab-agent-launch-options.test.tssrc/renderer/src/hooks/useComposerState.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/agent-catalog.tsxsrc/renderer/src/lib/launch-agent-background-session.tssrc/renderer/src/lib/launch-agent-tab-startup-plan.tssrc/renderer/src/lib/pending-worktree-creation.tssrc/renderer/src/lib/source-control-agent-action-plan.test.tssrc/renderer/src/lib/source-control-agent-action-plan.tssrc/renderer/src/lib/worktree-creation-flow.test.tssrc/renderer/src/lib/worktree-creation-flow.tssrc/shared/terminal-quick-commands.tssrc/shared/tui-agent-config.tssrc/shared/tui-agent-startup-command.tssrc/shared/tui-agent-startup.test.ts
✅ Files skipped from review due to trivial changes (1)
- src/renderer/src/i18n/locales/ko.json
🚧 Files skipped from review as they are similar to previous changes (19)
- src/shared/tui-agent-startup.test.ts
- src/renderer/src/lib/source-control-agent-action-plan.test.ts
- src/renderer/src/components/settings/AgentsPane.test.tsx
- src/renderer/src/components/settings/source-control-action-recipe-options.ts
- src/renderer/src/components/NewWorkspaceComposerCard.tsx
- src/renderer/src/components/floating-terminal/FloatingTerminalWindowControls.tsx
- src/renderer/src/components/tab-bar/TabBar.tsx
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/components/settings/RepositorySourceControlAiActionRows.tsx
- src/renderer/src/i18n/locales/zh.json
- src/shared/tui-agent-config.ts
- src/renderer/src/components/settings/SourceControlActionRecipeRow.tsx
- src/shared/terminal-quick-commands.ts
- src/renderer/src/lib/launch-agent-tab-startup-plan.ts
- src/renderer/src/lib/launch-agent-background-session.ts
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/lib/agent-catalog.tsx
- src/renderer/src/lib/source-control-agent-action-plan.ts
|
Thanks for pushing this forward. I noticed this overlaps pretty directly with #5728, which is also adding named launch profiles for built-in agents. I’m curious what led you to model profiles as first-class The tradeoff I see is that making profiles agent-like lets them show up naturally across more surfaces and be set as defaults, but it also means every existing What benefits are you aiming for with the first-class profile-id model over the built-in-agent-plus-profile-id approach? |
That makes sense. I modeled profiles as The benefit was UX/surface coverage: But I agree the downside is real: it expands the meaning of I’m open to aligning with #5728’s model if we can preserve the UX goals from this PR:
So I think the right convergence may be: keep built-in |
|
will get this landed hopefully by the end of tmr! |
…ubeworm # Conflicts: # src/main/runtime/orca-runtime.ts # src/renderer/src/components/settings/AgentsPane.tsx # src/renderer/src/i18n/locales/en.json # src/renderer/src/i18n/locales/es.json # src/renderer/src/i18n/locales/ja.json # src/renderer/src/i18n/locales/ko.json # src/renderer/src/i18n/locales/zh.json # src/renderer/src/lib/launch-agent-in-new-tab.ts
|
any updates on this? |

Summary
Agent setup is no longer limited to one fixed entry per provider. Users can duplicate a built-in agent, give the duplicate its own name, command override, args, and environment, then launch that profile from the same agent pickers used for normal agent starts.
The profile args/env/command templates can now reference
{repoPath}and{worktreePath}, so a profile can point at workspace-local plugins or repo-specific resources without hardcoding one machine path.What Changed
{repoPath}and{worktreePath}variables, with variable chips sorted consistently.The text-generation-only Source Control recipes remain constrained to agents that support single-response generation; profile support is applied to launch-style actions where profile args and command overrides map directly to an interactive agent start.
Demo
Validation
pnpm run typecheckpnpm run lintnpm test -- --run src/renderer/src/components/tab-bar/QuickLaunchButton.test.ts src/renderer/src/components/automations/AutomationEditorDialog.test.ts src/renderer/src/components/terminal-quick-commands/terminal-quick-command-agent-options.test.ts src/renderer/src/components/settings/CommitMessageAiPane.test.tsx src/renderer/src/lib/source-control-agent-action-plan.test.ts src/renderer/src/components/right-sidebar/SourceControlAgentActionDialog.test.tsx src/shared/terminal-quick-commands.test.ts src/renderer/src/lib/run-quick-command-in-new-tab.test.ts src/renderer/src/lib/launch-agent-in-new-tab.test.ts src/renderer/src/lib/launch-agent-background-session.test.ts src/renderer/src/components/tab-bar/tab-agent-launch-options.test.tsgit diff --checkELI5
You can now create custom agent profiles: copy a built-in agent, rename it, and override its command, args, and environment. Profiles can use placeholders like {repoPath} so they work across machines without hardcoding paths.