docmd-assistant v0.1.9 introduces comprehensive LLM output sanitisation, autonomous and proactive search execution, smart version/locale relevance boosting, and enhanced chat flow stability across local and relay runtimes.
Key Features & Enhancements
LLM Output Sanitisation & Artifact Stripping
cleanAssistantReply() now aggressively strips reasoning/thinking tokens (<think>, <mm:think>), raw tool XML tags (<tool_call>, <request>), and internal provider metadata markers (e.g. minimax wrappers) before saving messages or rendering them to the user:
import { cleanAssistantReply } from 'docmd-assistant';
const clean = cleanAssistantReply(rawModelOutput);
Proactive Tool Execution & Autonomous Search
The system prompt and execution pipeline now mandate autonomous tool usage for technical, version, and release-note queries:
- No Permission Loops: The assistant directly executes
search_documentationorget_site_structureto retrieve accurate facts rather than asking the user for confirmation (“Would you like me to search?”). - Release Notes & Patch Intelligence: Automatically performs targeted searches on queries regarding the latest release or patch notes (e.g.
v0.9.1) without relying solely on static branch identifiers.
Version-Scoped Ranking & Filter Optimisation
- Active Version Boosting: Enhanced search scoring logic prioritising documents matching the active documentation branch and active locale.
- Legacy Exclusion: Automatically excludes or deprioritises older archived documentation branches unless the user explicitly requests historical information.
Enhanced Chat State Stability
- Hardened internal turn tracking in
runRelayTurnandrunAiplugTurn. - Guaranteed message synchronisation and error boundary protection preventing broken chat UI states during relay interruptions.
Upgrade
npm
pnpm
npm install docmd-assistant@0.1.9
pnpm add docmd-assistant@0.1.9