【插件】自动标注LetMe — dsh-plugin-letme-annotator
A DSH Desktop / DeepSeek Harness client plugin that watches the assistant's thinking blocks and, whenever the reasoning text contains let me (case-insensitive), places a red badge “出现了 let me” right after the Think label and highlights every actual occurrence of the phrase in red at its exact position inside the reasoning text.
- Works while reasoning is streaming; the badge appears the moment
let meshows up and disappears again if the text is rewritten without it. - Counts occurrences precisely:
出现了 let me ×2for repeated matches. The count equals the number of matches in the full reasoning text of that step (one badge per Think row). - Position marking: in the collapsed row the matching words in the visible summary line are highlighted; once expanded, every match in the full reasoning body is highlighted (CSS Custom Highlight API). The old whole-row left accent bar is used only as a fallback when that API is unavailable.
- Detects matches beyond the first line even while the Think row is collapsed (it reads the session snapshot, with a DOM-text fallback).
Install
The plugin is already installed into the desktop profile
(~/.dsh/profiles/desktop): a junction at
~/.dsh/profiles/node_modules/dsh-plugin-letme-annotator plus an entry in the profile manifest's
dsh.profile.bundles. Restart DSH Desktop to activate.
Manual install elsewhere: junction the autoHighlight_LetMe package folder
into ~/.dsh/profiles/node_modules/ and add dsh-plugin-letme-annotator to
dsh.profile.bundles in ~/.dsh/profiles/desktop/package.json, then restart.
Layout
lib/client.js— browser half (dsh.clientbundle, lazy-CJS factory format)lib/index.js— host loader entry (no-op)cordis.patch.yml— loader patch composing this package into the profilepackage.json—dsh.client+dsh.bundle.patchdeclarationstest/smoke.mjs— browser-logic smoke tests (stubbed DOM + session; the fake DOM notifies the MutationObserver like a real browser, so the runaway reconcile-loop freeze regression is covered)test/compose-check.mjs— loader-patch composition check via dsh-app-boottest/repro-loop.mjs— standalone freeze reproduction / settle check
Customize
Edit the constants at the top of lib/client.js:
const PATTERNS = [/\blet me\b/giu]; // match patterns
const BADGE_LABEL = "出现了 let me"; // badge text
Then restart DSH Desktop.
No comments yet. Be the first to write one.