feat(config): allow runtime_fallback to be configured as boolean
Enable simple boolean configuration for runtime_fallback:
- "runtime_fallback": true - Enable with defaults
- "runtime_fallback": false - Disable
- "runtime_fallback": { ... } - Advanced object config (existing)
Updated schema, event handler, chat-message handler, and session hooks
to handle both boolean and object formats.
This commit is contained in:
@@ -44,7 +44,12 @@ export const OhMyOpenCodeConfigSchema = z.object({
|
||||
auto_update: z.boolean().optional(),
|
||||
skills: SkillsConfigSchema.optional(),
|
||||
ralph_loop: RalphLoopConfigSchema.optional(),
|
||||
runtime_fallback: RuntimeFallbackConfigSchema.optional(),
|
||||
/**
|
||||
* Enable runtime fallback (default: true)
|
||||
* Set to false to disable, or use object for advanced config:
|
||||
* { "enabled": true, "retry_on_errors": [400, 429], "timeout_seconds": 30 }
|
||||
*/
|
||||
runtime_fallback: z.union([z.boolean(), RuntimeFallbackConfigSchema]).optional(),
|
||||
background_task: BackgroundTaskConfigSchema.optional(),
|
||||
notification: NotificationConfigSchema.optional(),
|
||||
babysitting: BabysittingConfigSchema.optional(),
|
||||
|
||||
Reference in New Issue
Block a user