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:
@@ -245,10 +245,15 @@ export function createSessionHooks(args: {
|
||||
? safeHook("anthropic-effort", () => createAnthropicEffortHook())
|
||||
: null
|
||||
|
||||
const runtimeFallbackConfig =
|
||||
typeof pluginConfig.runtime_fallback === "boolean"
|
||||
? { enabled: pluginConfig.runtime_fallback }
|
||||
: pluginConfig.runtime_fallback
|
||||
|
||||
const runtimeFallback = isHookEnabled("runtime-fallback")
|
||||
? safeHook("runtime-fallback", () =>
|
||||
createRuntimeFallbackHook(ctx, {
|
||||
config: pluginConfig.runtime_fallback,
|
||||
config: runtimeFallbackConfig,
|
||||
pluginConfig,
|
||||
}))
|
||||
: null
|
||||
|
||||
Reference in New Issue
Block a user