DeepSeek Harness Plugin

xiyunSacire/dsh-find-quote

Stars ★ 0 Category UI Enhancements Added 2026-12-02

Ctrl+F find bar for the desktop Electron shell, plus a body-only right-click menu with Find and Quote.

Install

# from GitHub (first run asks for allowBuilds approval — follow the hint, retry)

dsh plugin --profile web add github:xiyunSacire/dsh-find-quote

Any plugin you install runs third-party code with your own permissions — it can read your files, use your credentials, and reach the network, and tool approvals don’t sandbox it. GitHub-sourced plugins also run build scripts at install time — pnpm blocks those until you allow them, so an install can stop with ERR_PNPM_GIT_DEP_PREPARE_NOT_ALLOWED or ERR_PNPM_IGNORED_BUILDS; dsh prints the exact key to add under allowBuilds in your profile’s pnpm-workspace.yaml, and the install works on the next run. Allowing a build is a trust decision: only install sources you trust, and pin a commit (github:owner/repo#sha).

README

English | 中文

A fork of secyborg/dsh-find-bar (MIT). The find bar is kept intact; this fork adds a message-area right-click menu with Find and Quote.

A web plugin for DeepSeek Harness (DSH) that brings back ⌘F / Ctrl+F in-page find for the desktop Electron shell, which ships without one — browser-grade find bar with highlight-all, match counter, Enter/Shift+Enter navigation, and a centre|right scope picker — plus a right-click menu on the conversation body.

Right-click menu (new in this fork)

Right-clicking inside the conversation body opens a themed menu anchored at the pointer (flips automatically near screen edges):

Item Behaviour
Find Opens the find bar with the current selection prefilled and searched immediately
Quote Inserts the selection into the composer as a real quote via the host's inputActions.insertQuote(); greyed out when nothing is selected

Rules:

  • Body only. Sidebar, right panel, buttons, inputs, links and images are never hijacked — the app keeps its own right-click behaviour. The find bar and the menu itself are excluded too.
  • Dismiss with Esc, a click outside, or scrolling.
  • Keyboard: ↑ / ↓ / Tab to move, Enter to run.
  • Fallback: when the host does not expose inputActions (plugin not mounted) or the composer is not in plain mode, Quote writes a Markdown blockquote (> …) to the clipboard and shows "copied — press Ctrl+V".

DSH already shows a selection toolbar with its own quote action. The two coexist: the menu simply exposes the same capability at a more convenient entry point.

Search scope

The segmented picker overlays the input's right side and maps to the app's two searchable columns (the choice is remembered across opens). It never resizes the bar: with the right column collapsed the pills simply vanish. The segments are text-free pills — left pill = conversation (default), right pill = right extension panel — and hovering the picker shows one shared hint bubble styled after the app's own control tooltips (500 ms delay, theme-matched surface).

Scope rules:

  • The picker only appears when there is a choice: with the right column collapsed, search runs on the conversation alone and the picker hides entirely — it reappears as soon as the column is opened. If the active scope collapses mid-search, it falls back to the conversation without overwriting the saved choice.
  • Folded regions are skipped: auto-folded tool steps and hidden panes do not match; expanding a region re-counts its matches within ~250 ms.
  • A fullscreen right panel (covering the centre) still counts as "R".
  • The left sidebar is not a scope: the dsh workspace already searches it.

How it works

Electron has no built-in find bar. This plugin implements one client-side:

  • Listens for ⌘F/Ctrl+F (capture phase) and draws a themed find bar.
  • Collects text nodes with a TreeWalker (shadow roots included), rooted at the selected column (the right column carries the stable [data-rightbar-col] anchor; the centre column is its previous sibling), and drops matches hidden by collapsed regions (checkVisibility).
  • Highlights via the CSS Custom Highlight API (CSS.highlights + ::highlight()) — paint-only, zero DOM mutation, zero React conflicts.
  • A MutationObserver (including attribute changes) re-scans on a debounce as content streams in and regions fold or expand.
  • Environments without the Highlight API fall back to window.find() (no scope or counting in that mode).

The right-click menu and quoting:

  • A capture-phase contextmenu handler first proves the hit is inside the body column and outside every interactive element; only then does it call preventDefault() and draw the menu.
  • Quoting uses the official capability: a UI-less React component is mounted in conversation.composer.dock (a scope: 'session' slot whose standard props carry inputActions), and the menu calls inputActions.insertQuote(text).

Keyboard

Key Action
⌘F / Ctrl+F Open the bar (prefilled with the page selection)
Enter / Shift+Enter Next / previous match
⌘G / F3 (+Shift) Next / previous
Esc Close and clear highlights

Search-as-you-type (debounced, follows streaming updates); the counter shows current/total.

Install

From local source (when the machine has no dsh CLI):

cd ~/.dsh/profiles/<profile>
pnpm add file:F:/Project/dsh-find-bar

Then add dsh-find-quote to that profile's dsh.profile.bundles and restart the app once. pnpm caches file: content, so after editing the source run pnpm remove then pnpm add again.

With the dsh CLI:

dsh plugin --profile <profile> add dsh-find-quote

Known limitations

  • Only searches text rendered and visible in the DOM; collapsed sessions or long lists must be expanded first.
  • Web content inside panel iframes is out of scope.
  • Match cap of 5000 (shown with a + suffix).
  • Case-insensitive; no "match case" toggle yet.
  • The window.find() fallback mode has no scope picker.
  • Quote needs the host's inputActions; outside plain composer mode it degrades to a clipboard copy.
  • The right-click menu covers the body column only.

Uninstall

cd ~/.dsh/profiles/<profile>
pnpm remove dsh-find-quote

and drop dsh-find-quote from dsh.profile.bundles.

License

MIT. The find bar comes from secyborg/dsh-find-bar, Copyright (c) secyborg; the right-click menu and quote bridge in this fork are MIT as well.

Content from the project README on GitHub ↗

Links

More in this category

View the whole category →

Community comments

Comments are public GitHub Discussions. Loading them connects to GitHub and Giscus; a GitHub account is required to post.