fix(router): escape Discord markdown delimiters instead of stripping

This commit is contained in:
claude-bot
2026-06-01 17:49:54 +09:00
parent ccc747ae1c
commit 5af1c5b1d1
5 changed files with 234 additions and 9 deletions

View File

@@ -1,7 +1,7 @@
import { getAgentOutputText } from './agent-output.js';
import type { NewMessage } from './types.js';
import { logger } from './logger.js';
import { formatOutbound } from './router.js';
import { sanitizeForOutbound } from './router.js';
import type { StructuredAgentOutput } from './types.js';
const SESSION_COMMAND_CONTROL_PATTERNS = [
@@ -86,7 +86,7 @@ function agentResultToText(result: AgentResult): string {
result: result.result ?? null,
output: result.output,
});
return raw ? formatOutbound(raw) : '';
return raw ? sanitizeForOutbound(raw) : '';
}
/**