fix(command-handler): add echo-dedup for WS commands to prevent Discord relay

This commit is contained in:
Variet Worker
2026-03-17 20:34:55 +09:00
parent 302d21d35c
commit 4bb400820c

View File

@@ -109,6 +109,8 @@ export function handleWSCommand(ctx: CommandHandlerContext, data: { text?: strin
// General text → send as user message to AG
ctx.logToFile(`[WS-CMD] Sending text to AG: ${text.substring(0, 80)}`);
// Mark for echo-dedup: step-probe will skip relaying this back to Discord
ctx.recentDiscordSentTexts.set(text.trim(), Date.now());
if (ctx.sdk) {
try {
ctx.sdk.cascade.sendPrompt(text);