feat(frontend): add configurable default agent with smart resolution

Introduce resolveDefaultSessionAgent to select the default agent based on
config.default_agent and visible primary agents from the agents API.
Fall back to first visible primary agent or 'build'. Prevents storing
fallback agents in session store. Also fixes Assistant tab active state
in mobile navigation.
This commit is contained in:
Chris Scott committed 2026-04-26 23:17:00 -04:00
1 parent 23afe0dd9f
commit 3eaa9a2480
4 files changed
+246 -24

No files matched your search

+1
View File
@@ -283,6 +283,7 @@ export const OpenCodeConfigSchema = z.object({
theme: z.string().optional(),
model: z.string().optional(),
small_model: z.string().optional(),
default_agent: z.string().optional(),
provider: z.record(z.string(), ProviderConfigSchema).optional(),
agent: z.record(z.string(), z.any()).optional(),
command: z.record(z.string(), z.any()).optional(),