mirror of
https://github.com/farcasclaudiu/openclaw.git
synced 2026-06-28 09:01:32 +03:00
03bec49299
Adds sanitization to extractAssistantText in sessions-helpers.ts to prevent tool call text from leaking to users. Previously, messages retrieved from chat history via sessions-helpers.ts could expose: - Minimax XML tool calls (<invoke>...</invoke>) - Downgraded tool call markers ([Tool Call: name (ID: ...)]) - Thinking tags (<think>...</think>) This fix: - Exports the stripping functions from pi-embedded-utils.ts - Adds a new sanitizeTextContent helper in sessions-helpers.ts - Updates extractAssistantText to sanitize before returning - Updates extractMessageText in commands-subagents.ts to sanitize Fixes #1269 Co-Authored-By: Claude <noreply@anthropic.com>