diff options
| author | Agando <roduccomm@gmail.com> | 2026-10-23 18:20:29 +0200 |
|---|---|---|
| committer | Agando <roduccomm@gmail.com> | 2026-10-23 18:20:29 +0200 |
| commit | 9f88966abe5d0665c9fd42dbb91c0c83fcf806bf (patch) | |
| tree | 431db2d123bb3d6cf9ce679040f682bf12e5c8eb /modules/core/module-fs.js | |
| parent | d100ad3c57f4a18dacb2cbc11cfdc5590f20cf08 (diff) | |
fix(newos4): tokenised body-aware skill search for load_skills (v4.6.62)
Packet 4. The matcher tested the whole query as one substring against
name+description+tags: word order decided the outcome ("telemetry dashboard" = 0
while "telemetry" = 1), a sentence could never match, and skill bodies were never
searched at all.
- _skillTokens(): lowercase, split on non-word chars, drop <3-char words and a
stopword list; a query made only of stopwords keeps its literal form
- scoring: name 3, description 2, tags 2, body 1 + up to 1.0 for repeated hits,
multiplied by token coverage (0.5 + 0.5 * matched/total), +3 phrase bonus so word
order can never zero a real hit
- results carry score and matchedTokens ("2/3"); top 3 by score, name as tiebreak
- zero results now name the tokens searched and the closest skill names instead of
"No matching skills found"
Verified live on v4.6.62 via the real runTool entry point:
"telemetry dashboard" and "dashboard telemetry" both return the same 2 skills
(was 0 and 0); "how do I regenerate the skill index" returns skills-system-guide
first (8.96, 2/3) where a sentence previously matched nothing; "info" returns 3
body matches; a nonsense query returns 0 with the tokens and closest names.
Diffstat (limited to 'modules/core/module-fs.js')
0 files changed, 0 insertions, 0 deletions