mirror of
https://github.com/getpaseo/paseo.git
synced 2026-11-02 22:52:58 +00:00
* Switch reasoning, mode, plan, and fast from the Command Center Extend the Command Center (Cmd-K) with selectors for a focused agent's Thinking (reasoning effort), access Mode, Plan mode, and Fast mode, mirroring the model switcher. Typing surfaces tiered "<Setting> › <Value>" breadcrumb rows with icons and a check on the current value, for both a running agent and a new draft tab. Rows only appear while typing, so the default palette is unchanged. - Thinking and Mode are multi-option selects; Plan mode and Fast mode are On/Off toggles. - Plan mode is dual-natured: a permission mode for Claude/Copilot/OpenCode (excluded from the Mode list, given its own toggle) and the plan_mode feature for Codex. Fast mode drives the fast_mode feature (model-gated). - All logic lives in command-center/agent-setting-contributions.ts as pure, unit-tested builders, with a small icon helper and a hook that registers the running-agent selectors; the draft registers from its composer tab. No changes to the command palette component and no protocol changes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> * Unify Command Center agent controls * refactor: clarify agent control ownership * refactor(app): tighten command center agent controls --------- Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> Co-authored-by: Mohamed Boudra <boudra.moha@gmail.com>
66 lines
1.5 KiB
TypeScript
66 lines
1.5 KiB
TypeScript
import type { ComponentType } from "react";
|
|
import {
|
|
Bot,
|
|
Brain,
|
|
ListTodo,
|
|
Settings2,
|
|
Shield,
|
|
ShieldAlert,
|
|
ShieldCheck,
|
|
ShieldEllipsis,
|
|
ShieldOff,
|
|
ShieldPlus,
|
|
ShieldQuestionMark,
|
|
Zap,
|
|
} from "lucide-react-native";
|
|
import { getModeVisuals, type AgentProviderDefinition } from "@getpaseo/protocol/provider-manifest";
|
|
|
|
export interface AgentControlIconProps {
|
|
size: number;
|
|
color: string;
|
|
}
|
|
|
|
export type AgentControlIcon = ComponentType<AgentControlIconProps>;
|
|
|
|
export const ThinkingIcon = Brain;
|
|
export const PlanModeIcon = ListTodo;
|
|
|
|
const MODE_ICONS: Record<string, AgentControlIcon> = {
|
|
Bot,
|
|
Shield,
|
|
ShieldAlert,
|
|
ShieldCheck,
|
|
ShieldEllipsis,
|
|
ShieldOff,
|
|
ShieldPlus,
|
|
ShieldQuestionMark,
|
|
};
|
|
|
|
const FEATURE_ICONS: Record<string, AgentControlIcon> = {
|
|
"list-todo": ListTodo,
|
|
"shield-check": ShieldCheck,
|
|
zap: Zap,
|
|
};
|
|
|
|
export function getAgentModeIcon(
|
|
provider: string,
|
|
modeId: string,
|
|
providerDefinitions: AgentProviderDefinition[],
|
|
): AgentControlIcon {
|
|
const icon = getModeVisuals(provider, modeId, providerDefinitions)?.icon;
|
|
return (icon ? MODE_ICONS[icon] : undefined) ?? Bot;
|
|
}
|
|
|
|
export function getAgentModeOptionIcon(
|
|
provider: string,
|
|
modeId: string,
|
|
providerDefinitions: AgentProviderDefinition[],
|
|
): AgentControlIcon | undefined {
|
|
const icon = getModeVisuals(provider, modeId, providerDefinitions)?.icon;
|
|
return icon ? MODE_ICONS[icon] : undefined;
|
|
}
|
|
|
|
export function getAgentFeatureIcon(icon?: string): AgentControlIcon {
|
|
return (icon ? FEATURE_ICONS[icon] : undefined) ?? Settings2;
|
|
}
|