Skip to content

JiuwenSwarm is an intelligent AI Agent built on openJiuwen. It extends the powerful capabilities of large language models directly to your fingertips through various communication apps you use daily.

Python

fix:/config set context_engine_enabled no 报错,提示只能赋值true/false

openJiuwen-botdcc6a0502fbd
diff --git a/jiuwenclaw/cli/src/core/commands/builtins/config.ts b/jiuwenclaw/cli/src/core/commands/builtins/config.ts
index a816f97b82..66282ca6d0 100644
--- a/jiuwenclaw/cli/src/core/commands/builtins/config.ts
+++ b/jiuwenclaw/cli/src/core/commands/builtins/config.ts
@@ -292,6 +292,15 @@ export function createConfigCommand(): SlashCommand {
}
if (schema.type === "toggle") {
const currentVal = String(configPayload[key] ?? "false");
+ if (value && value !== "true" && value !== "false") {
+ ctx.addItem(
+ addError(
+ ctx.sessionId,
+ `Invalid value "${value}" for ${key}. Toggle only accepts: true, false`,
+ ),
+ );
+ return;
+ }
const effectiveValue = value || (currentVal === "true" ? "false" : "true");
await applyConfigSet(ctx, key, effectiveValue, schema);
return;