The chat page picks up to 12 tools from a large MCP catalog. It now splits unspaced Chinese into two-character terms instead of treating the whole question as one word. Terms are weighted by how rare they are in the catalog (IDF), and a tool named exactly in the question, hyphenated names included, is boosted to the top. The selection moves into lib/tool-selection.mjs with its own tests. page-chat goes to 0.1.12.
Run at d10e93a62832e31ead84ddef438b615b13935e26 merged onto main 1aab125bf, on a separate macOS machine (bun 1.4.2, sandbox HOME):
- packages/chat `bun test`: 75 pass, 1 skip, 0 fail.
- `bun scripts/check.mjs`: exit 0.
- Root `bun test`: 21 fail and 4 errors in devin, zcode and window-warmup, none in chat. Main 1aab125bf shows the same 21 and 4 in the same tests. The devin and zcode ones refuse a HOME that isn't from `mktemp -d`.
- Broken by hand, one at a time: without the exact-name boost, "exact identifier outranks…" goes red. With IDF replaced by 1, "rare term outranks…" goes red. Without `-` in the Latin term regex, the exact-identifier test goes red.
Version: page-chat is served from the dist branch, where the newest is 0.1.11.