Files
qwen-code/docs
Job NatdhanaiandClaude Opus 5.5 db9478db8b fix(core): keep follow-up suggestions in Thai, Lao, Khmer and Myanmar (#16341)
* fix(core): keep follow-up suggestions in Thai, Lao, Khmer and Myanmar

getFilterReason() counted words by splitting on whitespace and exempted
only CJK, so a space-free Thai, Lao, Khmer or Myanmar suggestion was one
"word" and was dropped as too_few_words. Count word-like segments with
Intl.Segmenter for these scripts (2 characters minimum, 12 words maximum,
matching the prompt). The segmenter is created lazily and only on a
full-ICU Node build, because on small-icu builds segment() can crash the
process (#11747) and this filter also runs outside the CLI's ICU probe;
without it a 60-character bound applies. Adds the first CJK and
Southeast Asian script tests for the filter.

Fixes #16339

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* test(core): pin the segmenter path for Thai follow-up suggestions

Add two cases where the word count and the 60-character fallback
disagree (13 words in 37 characters; 11 words in 76 characters), so the
tests fail if the segmenter is silently disabled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(core): keep whitespace bounds for spaced Thai follow-up suggestions

Use the segmenter only for suggestions without spaces. A Thai suggestion
that also names a path or a command (e.g. "รัน npx vitest run ...") has
few whitespace words but many segments, so it was dropped as
too_many_words although the base branch accepted it.

Also test that no segmenter is created when process.config reports a
small-icu build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

* fix(core): keep the slash exemption for Thai follow-up suggestions

A /-prefixed suggestion in Thai, Lao, Khmer or Myanmar has one
whitespace word, so it entered the segmenter branch and could be
dropped as too_many_words before reaching the slash exemption. Return
early for it, as the space-delimited branch does.

Update the documented filter rules: these scripts are counted by word
segmentation, and a single word in them is allowed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-07 08:30:22 +00:00
..
2025-12-05 10:51:57 +08:00
2025-12-19 15:52:11 +08:00