feat(config): add default_run_agent schema option

Add optional 'default_run_agent' field to OhMyOpenCodeConfig schema.
This field allows users to configure the default agent for the 'run' command
via oh-my-opencode.json configuration file.

- Add Zod schema: z.string().optional()
- Regenerate JSON schema for IDE support
This commit is contained in:
YeonGyu-Kim
2026-02-02 10:49:07 +09:00
parent 8927847336
commit 9c2c8b4dd0
2 changed files with 5 additions and 0 deletions

View File

@@ -11,6 +11,9 @@
"new_task_system_enabled": { "new_task_system_enabled": {
"type": "boolean" "type": "boolean"
}, },
"default_run_agent": {
"type": "string"
},
"disabled_mcps": { "disabled_mcps": {
"type": "array", "type": "array",
"items": { "items": {

View File

@@ -366,6 +366,8 @@ export const OhMyOpenCodeConfigSchema = z.object({
$schema: z.string().optional(), $schema: z.string().optional(),
/** Enable new task system (default: false) */ /** Enable new task system (default: false) */
new_task_system_enabled: z.boolean().optional(), new_task_system_enabled: z.boolean().optional(),
/** Default agent name for `oh-my-opencode run` (env: OPENCODE_DEFAULT_AGENT) */
default_run_agent: z.string().optional(),
disabled_mcps: z.array(AnyMcpNameSchema).optional(), disabled_mcps: z.array(AnyMcpNameSchema).optional(),
disabled_agents: z.array(BuiltinAgentNameSchema).optional(), disabled_agents: z.array(BuiltinAgentNameSchema).optional(),
disabled_skills: z.array(BuiltinSkillNameSchema).optional(), disabled_skills: z.array(BuiltinSkillNameSchema).optional(),