mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-16 12:31:36 +00:00
* fix(qa-lab): use truncateUtf16Safe for tool search and mock OpenAI text truncation Replace naive .slice(0, N) with truncateUtf16Safe() in: - tool-search-gateway.fixture.ts: 4 sites (provider input snippet, tool output snippet, gateway output text for normal/code lanes) - mock-openai/server.ts: 1 site (tool output evidence snippet) LLM output text may contain non-BMP characters (emoji, CJK extension characters). Naive .slice(0, N) at a surrogate pair boundary produces a lone surrogate. Co-Authored-By: Claude <noreply@anthropic.com> * test: add proof script for qa-lab UTF-16 safe truncation at all boundaries * test(qa-lab): integrate UTF-16 boundary coverage Co-authored-by: lsr911 <liao.shirong@xydigit.com> --------- Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Peter Steinberger <steipete@gmail.com>