cloudAgentSkillSearchTokens dropped any token shorter than 2 runes.
That filter was copied from English stop-word logic (a / I), but a single
Han rune such as the ones meaning hook, gag or twist is already a complete
semantic unit in Chinese. When the whole keyword consisted of such runes,
tokens came back empty and cloudAgentSearchSkills degraded to listing the
full index of enabled skills - the user thinks a search happened but gets
an unsorted dump.
Fix: keep a token when it is exactly one Han rune (unicode.Han); single
ASCII/digit runes and empty strings are still dropped as before.
Test: TestCloudAgentSkillSearchTokensKeepsSingleCJKRune fails on the old
logic (got [反转 钩子], want [反转 钩子 梗 钩]) and passes after the fix.
recall_lessons has an isomorphic copy of the same tokenizer, fixed
separately in #593.
cloudAgentLessonSearchTokens dropped any token shorter than 2 runes.
That filter was copied from English stop-word logic (a / I), but a single
Han rune such as the ones meaning hook, gag or twist is already a complete
semantic unit in Chinese. When the whole keyword consisted of such runes,
tokens came back empty and cloudAgentSearchLessons silently fell back to
"list the first N lessons" - the user thinks a search happened but gets an
arbitrary list.
Fix: keep a token when it is exactly one Han rune (unicode.Han); single
ASCII/digit runes and empty strings are still dropped as before.
Test: TestLessonSearchTokensKeepsSingleCJKRune fails on the old logic
(got [反转 钩子], want [反转 钩子 梗 钩]) and passes after the fix.
The isomorphic copy in skill_search (cloud_agent_tools.go) is fixed
separately on the #580 branch and deliberately not included here.
Gates: go build ./... and go vet EXIT=0; gofmt clean on LF content; the 3
go-sqlite3 cgo-stub failures in internal/app are pre-existing and unrelated.