dsh-ai-worker: Chat Status Pixel Widget in the Lower Right Corner of the DSH Web Interface

Preface

When running agent sessions in DeepSeek Harness (DSH), the sidebar and message stream reflect progress, but there is a lack of lightweight feedback that is always visible and bound to the “current main session.” Relying solely on scanning logs or waiting for notifications makes it difficult to distinguish at a glance whether the agent is “reasoning,” “running tools,” “waiting for your confirmation,” or has already finished.

The dsh-ai-worker (repository jiang-yang/dsh-ai-worker) introduced below is a pure client-side DSH plugin released by maintainer jiang-yang: it attaches a pixel-style “AI Worker” floating widget to the bottom right corner of the Web interface. Its actions switch according to the current session state, and it throws confetti and counts the number of “tasks completed today” when a task is finished. It does not replace the native DSH UI, nor does it initiate additional network requests.

What is this

  • Positioning: A floating widget attached to the shell.overlay slot of the DSH Web shell. It is not a standalone webpage, nor is it an iframe.
  • Maintenance & License: GitHub repository jiang-yang/dsh-ai-worker. package.json indicates version 0.2.1 and license MIT.
  • Runtime Environment: engines.dsh is >=0.1.0-rc.6 <0.2.0-0 || >=0.2.0-rc.0 <0.3.0-0, and engines.node is >=20. The plugin runs within the current DSH process and its browser-side loading mechanism; it is recommended to read through the source code and confirm the license and permission boundaries before installation.

Community plugin directory page: https://www.skillhub.cn/plugins/jiang-yang/dsh-ai-worker (SkillHub is a community directory site and has no official affiliation with DeepSeek / High-Flyer).

Core Features

Visuals and Implementation

  • All graphics are drawn using DOM + CSS keyframes: no external images, no CDN, no network requests, no additional npm dependencies (except the UI peer provided by the DSH host).
  • Colors are read from DSH theme variables --dsw-*, automatically adapting to light/dark themes.
  • Draggable, collapsible into a small avatar, and closable; closed state, collapsed state, position, and “completed today” count are written to the browser’s localStorage and persist after refreshing or restarting DSH (resetting if you switch browsers or clear cache).

Five Display States (Derived from session data, not random animation)

Display Trigger Condition
Waiting for Confirmation pendingInteraction for the current session in useSessionStatus is not empty
Coding Current session is running, and the inline updatedAt (or current turn start time) is within the last 2 seconds
Thinking Current session is running, but has been quiet for more than 2 seconds (common in reasoning phases)
Task Completed The transition where a session changes from running to non-running (count +1, confetti for ~7 seconds)
Slacking Off Idle and no activity for more than 45 seconds
Standby No session is selected

The “current session” is prioritized as the row in byId within the useSessions snapshot where retainedBy.mainView > 0 (consistent with how DSH sidebar finds the main session); if this field is absent, it falls back to current, and then to “only one session in the list.”

Data sources are two standard slot properties:

  • useSessions: Session list snapshot { ids, byId, phase, projectionsBySession };
  • useSessionStatus: Real-time status table Map<sessionId, { running, pendingInteraction, completionUnread }>, pushed by the host via api-session/status. This is the primary state source for changes during an ongoing session.

Interaction

  1. Drag: Hold and drag the title bar; after focusing the title bar, use arrow keys (Shift increases step size).
  2. Confetti: Plays automatically upon task completion; clicking the widget body or pressing Enter/Space while focused can trigger it again (pure animation, does not count towards “completed today”).
  3. Collapse: Title bar — or Esc → small avatar in the bottom right corner (badge shows completed today count); click the small avatar to expand.
  4. Close: Click ✕; it will not appear by default the next time DSH is opened.
  5. Reopen: Clear the localStorage key dsh.aiWorker.closed.v1 and refresh, or execute in the browser console:
localStorage.removeItem('dsh.aiWorker.closed.v1')

Installation and Activation

The plugin is packaged according to DSH specifications: it includes cordis.patch.yml and automatically registers id: ai-worker via package.json’s dsh.bundle.patch when installed into a profile. No manual modification of the profile’s cordis.patch.yml is required. The README states that since 0.2.0, the old method of “copying directories + manual registration” is no longer used to avoid duplicate ids causing DSH to refuse loading.

Execute the following inside the cloned or extracted plugin directory (commands from the repository README; do not construct github:owner/repo based on the plugin name):

cd plugins/dsh-ai-worker
bash install.sh    # Installs to web profile by default (recognizes DSH_PROFILE / DSH_BIN)

For the desktop version of DSH, specify the profile:

DSH_PROFILE=desktop bash install.sh

Uninstall:

bash uninstall.sh

install.sh is essentially a wrapper for the official CLI, for example:

dsh plugin --profile desktop add "$(pwd)"

After installation, DSH scans the dsh.client declaration and serves lib/client.js to the browser; apply(ctx) registers the widget into shell.overlay.

If you modify the source code yourself, you need to build before refreshing the page:

node build.mjs     # Regenerate lib/client.js
node verify.mjs    # Offline self-check (no browser required)

Typical Usage

  1. Execute bash install.sh in the target profile as described in the previous section, then restart or refresh the DSH Web interface.
  2. Open or select a main session and observe the widget in the bottom right corner switching between “Thinking,” “Coding,” and “Waiting for Confirmation” based on running / pendingInteraction, etc.
  3. Wait for the session to finish running; you should see the task completion animation and the “Completed N tasks today” count increase; the count resets automatically across days.
  4. Collapse to a small avatar when you need to clear the interface; close it if not used for a long time, and clear dsh.aiWorker.closed.v1 as described above to restore it.

For development or acceptance testing, run node verify.mjs to simulate loading and run through all states in a browserless environment (the screenshots in the README are the rendering results of the same lib/client.js in headless Chrome).

Applicable Scenarios and Cautions

Who it is for

  • Developers who frequently monitor sessions in DSH Web for long periods and want to use a fixed corner feedback to distinguish between “waiting for confirmation” and “quietly reasoning.”
  • Users who want zero additional network or image dependencies and only wish to enhance the shell overlay.

Boundaries and Limitations

  • DSH Web Interface Only: The terminal TUI does not have a shell.overlay slot, so the plugin will not appear.
  • “Thinking / Coding” relies on session row activity heuristics (2-second threshold) and is not a precise mapping of the model’s internal state.
  • Starting from 0.2.1, it switched to using the host-provided useSessionStatus; older versions relying on non-existent APIs might cause the widget to stay in “Standby.”
  • Collapse, close, position, and counts are all stored in the local browser’s localStorage and are independent of DSH server-side configuration.

Installing the plugin is equivalent to letting DSH load its declared client bundle; please review the source code (core logic is in src/client/ai-worker.js) on your own under the premise of trusting the maintainer and the MIT license.

Conclusion

dsh-ai-worker condenses “what the current main session is doing” into several actions of a pixel character in the bottom right corner, and uses localStorage to remember your layout and completed tasks today. It is suitable as a lightweight status companion on DSH Web. Directory and source code:

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye