返回目录
开发工具 插件

dsh-desktop-tools

1997liuyh-boop/dsh-desktop-tools

独立桌面插件运行时:为官方 DSH 提供悬浮球、划词工具栏、截图录屏的 Electron 原生辅助进程。

Stars
0
Forks
0
Issues
0
更新
7 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:1997liuyh-boop/dsh-desktop-tools

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-desktop-tools

English | 中文

dsh-desktop-tools is one DSH Desktop plugin for the selection toolbar, floating assistant, screenshots, long screenshots, and screen recording.

Install

Use DSH Desktop >=0.2.2-rc.1 <0.3.0-0, then add this repository as one plugin:

https://github.com/1997liuyh-boop/dsh-desktop-tools.git

Install tag 0.8.0. The plugin includes its own helper, preload, native feature modules, static assets, and settings page. No separate dsh-desktop-runtime, dsh-selection-toolbar, dsh-floating-ball, or dsh-capture package is required.

Installation does not require an Electron path.txt file and does not use the koffi install script. The helper loads the matching prebuilt Koffi platform package.

Prerequisite: a standalone Electron

The plugin runs its features in a separate Electron helper process and never downloads Electron itself. Which executable it starts depends on how DSH Desktop was installed:

  • Installed DSH Desktop (the installer build, with resources/app.asar next to the executable, e.g. DeepSeek Harness.exe): that executable always starts DSH itself, so a standalone Electron is required. The helper uses the first one found:

    1. the plugin's electronExecutable setting;
    2. the DSH_DESKTOP_TOOLS_ELECTRON environment variable;
    3. $DSH_HOME/electron/ (~/.dsh/electron/ by default): electron.exe on Windows, Electron.app/Contents/MacOS/Electron on macOS, electron on Linux. Extracting an official Electron release archive into this folder produces exactly this layout.

    If none exists, enabling a feature fails with an error listing the paths it tried, and the settings page shows it.

  • DSH Desktop started from a bare Electron (development): the helper reuses that Electron and nothing else is needed.

Use the same Electron major version as your DSH Desktop; other versions are untested.

Prerequisite: dsh-vision-router

Extract text, Translate, and Knowledge graph on screenshots and long screenshots, and Recording to knowledge graph, recognize text with the OCR tools of dsh-vision-router (>=3.2.0). Install and enable it and keep its "tool" switch on. All other tools (annotations, pin, save, forward, recording, long-screenshot stitching) work without it.

The DSH plugin manager cannot install one plugin together with another, so use any of these:

  • In Settings → Desktop tools → Screenshot, click Install dsh-vision-router on the prerequisite card (Enable when it is installed but disabled), then restart DSH when asked;
  • When you use one of those three tools before it is installed, the result window shows the same install button;
  • Or run dsh plugin add dsh-vision-router in a terminal.

package.json declares it as an optional peerDependencies entry so marketplace checks warn about an out-of-range version. The default OCR engine is auto: local Tesseract first, falling back to the vision model configured in vision-router (which receives the image). For strictly local OCR, set the vision-router default OCR engine to Tesseract only.

Screenshot, long screenshot, and recording

Press the shortcut (system-wide, also while DSH is in the background) to open a toolbar at the top of the screen with three modes: Screenshot, Record screen, and Long screenshot.

Screenshot, after you select an area:

  • Shape (rectangle / ellipse / line; hold Shift for a square, circle, or 45° steps), pen, arrow, text (text / auto-incrementing numbers), mosaic (brush with adjustable strength), plus color, stroke width, and font size;
  • Pin to desktop (always-on-top window: drag to move, scroll to zoom, double-click or Esc to close, right-click to copy, save, reset the size, or ask about the image). Pins are stored in the profile under desktop-tools/pins/ (up to 30) and come back after saving settings or restarting; closing a pin deletes it. The tray menu Pins (N) and the floating ball menu Manage pins… show, hide, or close all pins, and the manager window brings a pin to the front, copies, saves, or asks about it. An optional global shortcut shows or hides all pins;
  • Ask: ask about the screenshot in its own window. Answers stream in, follow-up questions carry the last three turns, and quick questions (What is this / Summarize / Find problems) are offered. The image is sent to the current model; if the model cannot read images, one click switches to asking with the text recognized by dsh-vision-router. Long screenshots are answered from recognized text;
  • Long screenshot (starts scrolling capture with the current area);
  • Knowledge graph, Translate, and Extract text (need dsh-vision-router): shown in a separate result window. Translate and Knowledge graph create DSH sessions in the "Screenshots and recordings" workspace; the knowledge graph is a Mermaid diagram plus node and relation lists, saved as Markdown or exported as PNG;
  • Undo (Ctrl/Cmd + Z), Forward (to a new DSH conversation with an optional message, or the system share panel), Save to disk (Ctrl/Cmd + S), Cancel (Esc), Done (copy to clipboard, Enter).

Recording:

  • Scope: a selected area, an application window, or a full screen;
  • Format MP4 / GIF / WebM (WebM is used when Chromium cannot encode MP4); quality SD 720p / HD 1080p / Original;
  • System sound and microphone (mixed into one track when both are on); GIF has no sound;
  • Recording to knowledge graph: key frames with clear visual changes (up to 12) are kept during recording and their text is turned into a knowledge graph afterwards. Speech is not transcribed;
  • While recording, a control bar offers pause / resume (Space), stop and save (Enter), and discard (Esc). MP4 / WebM stop at 15 minutes or 500 MB, GIF at 3 minutes.

Long screenshot: select the scrolling area, click Start, and scroll down inside the frame with the mouse wheel. Frames are matched row by row and stitched, excluding fixed headers and footers; Auto scroll is also available. Afterwards you can copy, save, pin, extract text, translate, build a knowledge graph, or forward the result. The maximum height is 30000 pixels.

Platform limits:

Feature Windows macOS Linux
System sound Supported macOS 13+; falls back to video only Not supported
Long screenshot auto scroll Supported Needs Accessibility permission Not supported (scroll manually)
System share Explorer Share panel macOS share menu Not supported

Replace earlier plugins

If the profile already has any of the four earlier entries, remove dsh-selection-toolbar, dsh-floating-ball, dsh-capture, and dsh-desktop-runtime before installing dsh-desktop-tools@0.8.0, then restart the Host. The new plugin stores settings in desktop-tools.json; it does not import the retired packages' separate settings files. Its defaults enable the selection toolbar and floating assistant, and disable screenshots and recording.

Settings

The DSH settings panel adds one Desktop tools entry with six submenus:

  • Selection toolbar: enablement, target language, model, compatibility copy, and the toolbar buttons: turn them on or off, reorder them, and add up to 10 custom actions (a name and a prompt; {text} becomes the selected text and {language} the target language). Custom actions stream their output in the result window like Translate and Explain.
  • Floating assistant: enablement, avatar, conversation/background models, permission preset, coordinate mode, and system permissions.
  • Usage & balance: actual DeepSeek API/account balances, local token totals, configurable model rates in CNY per million tokens, and a daily estimate budget.
  • Screenshot: enablement, the screenshot shortcut (default Ctrl/Cmd + Shift + S), an optional long-screenshot shortcut, and dsh-vision-router status with one-click install.
  • Screen recording: enablement, the recording shortcut (default Ctrl/Cmd + Shift + R), and default format, quality, system sound, microphone, and knowledge graph.
  • Diagnostics: checks the configuration file, the helper Electron (path and version against DSH), the Koffi native module, the helper process and each tool, global shortcut registration, dsh-vision-router, and macOS system permissions. Each item shows OK, Needs attention, Error, or Not applicable; restarting the helper, installing or enabling dsh-vision-router, and opening system permissions can be done from the item. Copy report copies a plain-text report to attach to an issue.

Shortcuts are global; a combination already taken by another program is not registered; the Diagnostics tab lists it, so choose another one. Selection and floating assistant are enabled by default. Screenshot and recording are disabled by default. Configuration is stored in the profile's desktop-tools.json; each save reports both persistence and actual helper application status.

Saving settings only starts or stops the tools whose switch changed; tools that stay on pick up the new settings in place (shortcuts are re-registered, selection buttons and language, recording defaults, and so on apply at once), so open result windows, the floating assistant conversation, and pins stay open. Turning off screenshots, for example, only closes screenshot windows. Restart helper on the Diagnostics tab still rebuilds everything.

The desktop tools follow the DSH language setting: after you switch languages in DSH, the tray menu, the floating ball right-click menu, the selection toolbar, and windows opened afterwards use the new language; the floating assistant panel updates the next time it starts.

Capture history (on by default): screenshots you copy, save, pin, or forward, Extract text / Translate / Knowledge graph / Ask results, and saved recording paths are recorded in the profile under desktop-tools/history/ (up to 100 entries). Open the history window from the tray Capture history…, the floating ball menu, or settings to copy an image or text, ask again, pin, show the file in its folder, delete, or clear everything. Turn recording off or clear it under Settings → Desktop tools → Screenshot; clearing never deletes files you saved yourself.

Floating assistant and accounting

Click the ball to open and focus a conversation; hold and drag to move it. Releasing within the configured distance (24 logical pixels by default) snaps left/right to a compact tab, or top/bottom to the visible work area. Hover over a tab or click it to bring the ball back. Settings include snap, status bubble, and notification switches.

Task bubbles show running, waiting for a question/approval, and finished/failed states. Clicking a bubble or completion notification opens that conversation. Completion notifications use live turns, not chat-history replay; renamed conversations do not generate another completion alert. Bubbles stay out of the way while the conversation panel is open.

Usage & balance separates actual balances from this device’s usage estimates. Balances use the DSH DEEPSEEK_API_KEY credential when available, then the optional DSH account service; keys remain in the Host process. Balance queries are cached for one minute. Input, cache read, cache creation, and output tokens are counted separately; reasoning is already included in output. Configure provider/model rates before estimating costs. Unknown rates remain explicitly unpriced, and rate changes apply only to future messages. A budget of zero disables reminders; reminders use local-day estimated CNY costs and do not enforce a spending limit.

The local ledger is stored at profile/desktop-tools/usage.json; it records new events while enabled, preserves daily totals across restarts, and deduplicates session event sequences. It does not import historical sessions or reconcile invoices. Task state refreshes about every 1.5 seconds, and OS notifications depend on system support and notification settings. Bubbles, reminders, and local usage recording default to enabled; old configuration files receive these defaults automatically.

These additions were inspired by DeepSeek Balance Whale Widget.

Build

Use Node 24.9 or newer:

npm install --ignore-scripts
npm test
npm run build

The build creates the Host, helper, preload, Remote descriptor, Client settings bundle, and TwCSS-based assets. macOS native modules are compiled when the build runs on macOS; Windows and Linux keep the Darwin-only modules unavailable.

License

MIT. The repository includes the DeepSeek MIT notice and third-party package licenses.

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类开发工具
规则置信度低

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: 工具。