mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-11 00:06:11 +00:00
* fix(irc): sanitize internal tool-trace lines from outbound text * fix(irc): sanitize internal tool-trace lines from outbound text --------- Co-authored-by: Vincent Koc <vincentkoc@ieee.org>
17 lines
735 B
TypeScript
17 lines
735 B
TypeScript
// Irc plugin module implements outbound base behavior.
|
|
import { sanitizeForPlainText } from "openclaw/plugin-sdk/channel-outbound";
|
|
import { sanitizeAssistantVisibleText } from "openclaw/plugin-sdk/text-chunking";
|
|
import { chunkTextForOutbound } from "./channel-api.js";
|
|
|
|
export const ircOutboundBaseAdapter = {
|
|
deliveryMode: "direct" as const,
|
|
chunker: chunkTextForOutbound,
|
|
chunkerMode: "markdown" as const,
|
|
textChunkLimit: 350,
|
|
// IRC's plain-text pass does not remove assistant scaffolding. Run the
|
|
// canonical delivery sanitizer first so internal tool traces are dropped
|
|
// before channel formatting.
|
|
sanitizeText: ({ text }: { text: string }) =>
|
|
sanitizeForPlainText(sanitizeAssistantVisibleText(text)),
|
|
};
|