fix(router): escape Discord markdown delimiters instead of stripping
This commit is contained in:
@@ -4,7 +4,7 @@ import {
|
||||
getAgentOutputText,
|
||||
} from './agent-output.js';
|
||||
import { createScopedLogger, logger } from './logger.js';
|
||||
import { formatOutbound } from './router.js';
|
||||
import { sanitizeForOutbound } from './router.js';
|
||||
import { shouldResetSessionOnAgentFailure } from './session-recovery.js';
|
||||
import { TASK_STATUS_MESSAGE_PREFIX } from './task-watch-status.js';
|
||||
import { formatElapsedKorean } from './utils.js';
|
||||
@@ -169,7 +169,10 @@ export class MessageTurnController {
|
||||
}
|
||||
|
||||
const raw = getAgentOutputText(result);
|
||||
const text = raw ? formatOutbound(raw) : null;
|
||||
// Use sanitize (no markdown escape) — the Discord channel boundary
|
||||
// applies the final escape pass, and double-escaping would produce
|
||||
// visible backslash garbage.
|
||||
const text = raw ? sanitizeForOutbound(raw) : null;
|
||||
const attachments = getAgentOutputAttachments(result);
|
||||
|
||||
if (raw) {
|
||||
|
||||
Reference in New Issue
Block a user