v0.9.4 is live! — Read the latest technical documentation and migration guides.

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);

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_documentation or get_site_structure to 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 runRelayTurn and runAiplugTurn.
  • 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