File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 resolveTimestampMsToIsoString ,
66} from "@openclaw/normalization-core/number-coercion" ;
77import { normalizeOptionalString } from "@openclaw/normalization-core/string-coerce" ;
8+ import { truncateUtf16Safe } from "@openclaw/normalization-core/utf16-slice" ;
89import { sanitizeInboundSystemTags } from "../../auto-reply/reply/inbound-text.js" ;
910import type { CliDeps } from "../../cli/deps.types.js" ;
1011import { getRuntimeConfig } from "../../config/io.js" ;
@@ -68,7 +69,7 @@ function sanitizeHookConsoleValue(value: string | undefined): string | undefined
6869 const code = char . charCodeAt ( 0 ) ;
6970 return code < 32 || code === 127 ? " " : char ;
7071 } ) . join ( "" ) ;
71- return withoutControlChars . replace ( / \s + / gu, " " ) . trim ( ) . slice ( 0 , 500 ) ;
72+ return truncateUtf16Safe ( withoutControlChars . replace ( / \s + / gu, " " ) . trim ( ) , 500 ) ;
7273}
7374
7475function formatHookRunWarningConsoleMessage ( params : {
You can’t perform that action at this time.
0 commit comments