diff --git a/docs/tools/slash-commands.md b/docs/tools/slash-commands.md index 855cda85c..9c4ad3603 100644 --- a/docs/tools/slash-commands.md +++ b/docs/tools/slash-commands.md @@ -39,7 +39,7 @@ Text + native (when enabled): - `/status` - `/status` (show current status; includes a short usage line when available) - `/usage` (alias: `/status`) -- `/config show|set|unset` (persist config to disk, owner-only) +- `/config show|get|set|unset` (persist config to disk, owner-only) - `/debug show|set|unset|reset` (runtime overrides, owner-only) - `/cost on|off` (toggle per-response usage line) - `/stop` @@ -92,6 +92,7 @@ Examples: ``` /config show /config show messages.responsePrefix +/config get messages.responsePrefix /config set messages.responsePrefix="[clawdbot]" /config unset messages.responsePrefix ``` diff --git a/src/auto-reply/reply/config-commands.test.ts b/src/auto-reply/reply/config-commands.test.ts index ca35d3365..f73d6d4f6 100644 --- a/src/auto-reply/reply/config-commands.test.ts +++ b/src/auto-reply/reply/config-commands.test.ts @@ -10,6 +10,10 @@ describe("parseConfigCommand", () => { action: "show", path: "foo.bar", }); + expect(parseConfigCommand("/config get foo.bar")).toEqual({ + action: "show", + path: "foo.bar", + }); expect(parseConfigCommand("/config unset foo.bar")).toEqual({ action: "unset", path: "foo.bar", diff --git a/src/auto-reply/reply/config-commands.ts b/src/auto-reply/reply/config-commands.ts index 22defd83c..e5cf099b6 100644 --- a/src/auto-reply/reply/config-commands.ts +++ b/src/auto-reply/reply/config-commands.ts @@ -20,6 +20,8 @@ export function parseConfigCommand(raw: string): ConfigCommand | null { switch (action) { case "show": return { action: "show", path: args || undefined }; + case "get": + return { action: "show", path: args || undefined }; case "unset": { if (!args) return { action: "error", message: "Usage: /config unset path" };