Skip to content

Commit 65643c2

Browse files
committed
fix(channels): bypass acp for colon verbose commands
1 parent d01745f commit 65643c2

2 files changed

Lines changed: 16 additions & 1 deletion

File tree

src/auto-reply/reply/dispatch-acp-command-bypass.test.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,21 @@ describe("shouldBypassAcpDispatchForCommand", () => {
109109
expect(shouldBypassAcpDispatchForCommand(ctx, {} as OpenClawConfig)).toBe(true);
110110
});
111111

112+
it.each(["/verbose:on", "/v:off", "/verbose:"])(
113+
"returns true for colon-form local verbose command %s",
114+
(command) => {
115+
const ctx = buildTestCtx({
116+
Provider: "discord",
117+
Surface: "discord",
118+
CommandBody: command,
119+
BodyForCommands: command,
120+
BodyForAgent: command,
121+
});
122+
123+
expect(shouldBypassAcpDispatchForCommand(ctx, {} as OpenClawConfig)).toBe(true);
124+
},
125+
);
126+
112127
it("returns true for ACP reset-tail slash commands", () => {
113128
const ctx = buildTestCtx({
114129
Provider: "discord",

src/auto-reply/reply/dispatch-acp-command-bypass.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ function isAcpCommandCandidate(text: string): boolean {
3030
}
3131

3232
function isLocalCommandCandidate(text: string): boolean {
33-
return /^\/(?:status|unfocus|verbose|v)(?:\s|$)/i.test(text);
33+
return /^\/(?:status|unfocus)(?:\s|$)/i.test(text) || /^\/(?:verbose|v)(?:[\s:]|$)/i.test(text);
3434
}
3535

3636
export function shouldBypassAcpDispatchForCommand(

0 commit comments

Comments
 (0)