feat: per-CLI model picker for local agents (closes #8)
Each agent CLI declares its selectable models (and reasoning effort, for Codex) on the daemon side; the frontend renders a model dropdown in the avatar menu and the Settings dialog scoped to the currently picked CLI, persists the choice per-agent in the AppConfig, and threads it through /api/chat to the spawn argv. "Default" leaves the flag off so the CLI's own config wins.
This commit is contained in:
+13
@@ -137,6 +137,18 @@ export function App() {
|
||||
[config],
|
||||
);
|
||||
|
||||
const handleAgentModelChange = useCallback(
|
||||
(agentId: string, choice: { model?: string; reasoning?: string }) => {
|
||||
const prev = config.agentModels?.[agentId] ?? {};
|
||||
const merged = { ...prev, ...choice };
|
||||
const nextAgentModels = { ...(config.agentModels ?? {}), [agentId]: merged };
|
||||
const next = { ...config, agentModels: nextAgentModels };
|
||||
saveConfig(next);
|
||||
setConfig(next);
|
||||
},
|
||||
[config],
|
||||
);
|
||||
|
||||
const handleChangeDefaultDesignSystem = useCallback(
|
||||
(designSystemId: string) => {
|
||||
const next = { ...config, designSystemId };
|
||||
@@ -272,6 +284,7 @@ export function App() {
|
||||
daemonLive={daemonLive}
|
||||
onModeChange={handleModeChange}
|
||||
onAgentChange={handleAgentChange}
|
||||
onAgentModelChange={handleAgentModelChange}
|
||||
onRefreshAgents={refreshAgents}
|
||||
onOpenSettings={openSettings}
|
||||
onBack={handleBack}
|
||||
|
||||
Reference in New Issue
Block a user