dsh-command-monitor: Extracting AI-executed commands from chat streams

Introduction

In DSH’s session view, tool calls persist, but the command execution process is collapsed within the conversation stream. To see the stdout, exit code, and duration of a command, one often has to scroll back and forth through the chat history to find the card; if you look away midway, the command sinks down with the message stream.

dsh-command-monitor is designed to solve this: it hangs a draggable floating button in the bottom-right corner of the DeepSeek Harness Web GUI. Clicking it opens the “Execution Process” panel, where the command, output, exit code, and duration are clearly visible. It is scrollable, selectable/copyable, and exportable. The plugin is maintained by j4ckzh0u, under the MIT license, and is a pure browser plugin: it does not add new host services, does not scrape DOM, does not restart dsh web, and only reads the currently loaded session data on the page. It is classified as a client-side plugin (marked with 1 star in the community directory). Below, we introduce its features, installation methods, usage, and limitations.

What is it

In one sentence: extracts tool/command execution records in the dsh Web GUI into a floating window that is always in view.

Comparison with existing approaches:

  • Command cards in the chat history flow with messages and require scrolling to locate; the floating window does not interrupt the conversation, does not take up layout space, and reduces to a single button when collapsed.
  • It does not re-parse network data; instead, it subscribes to tool/call / tool/result nodes that are already assembled in the current main session. Therefore, it is essentially synchronized with the command cards in the chat.

Core Features

The plugin provides two areas: the collapsed state is a circular floating button in the bottom-right corner, and the expanded state is the “Execution Process” panel. The functions are as follows:

Capability Description
Floating Button / Panel Both the button and panel are draggable, and their position and size are remembered
Two Views Command: Only shows bash / pwsh / terminal_*; All: Displays all tool calls (read file, search, edit, MCP, sub-agent, etc.)
Smart Follow New records automatically scroll to the bottom; scrolling up automatically pauses following; click “Follow” or “Back to Latest” to resume
Complete Entry Tool name, description, start time, duration, status, cwd, command, stdout+stderr, exit code; background tasks, timeouts, sandbox rejections, and output truncation are all marked
Selection & Copy Text body can be freely selected; single “Copy” (command + full output); top “Copy” copies all records under current filtering
Download Three formats: Markdown, Plain Text, JSON; filename format is dsh-commands-<session>-<time>.<ext>
Session Follow Automatically follows the current main session, switching sessions automatically; when leaving the conversation view, it retains the last data and marks “Update Paused”
Theme Adaptive Uses DSH’s --dsw-* design tokens; both light and dark themes work normally

Compatibility

Item Requirement
dsh 0.2.1-rc.2 or newer (README notes tested with 0.2.1-rc.5; see package.json#engines.dsh for range)
Runtime Environment dsh Web GUI (dsh web / Web profile)
Browser Modern Chromium / WebKit (requires backdrop-filter, color-mix(), Pointer Events)
Node (Installation Environment) ^22.19.0 || >=24.0.0
Host Platform macOS / Linux / Windows (plugin itself does not distinguish platforms)

Plugin package version is 0.1.1, license MIT.

Installation and Enablement

To install the plugin into the dsh profile: put the package into the profile’s node_modules, and add the package name to dsh.profile.bundles. The README provides two methods.

Method A: Installation Script (Recommended):

git clone https://github.com/j4ckzh0u/dsh-command-monitor.git
cd dsh-command-monitor

# 默认安装到 web profile;也可以传其它 profile 名
./scripts/install.sh            # 等价于 ./scripts/install.sh web

The script does three things: copies runtime files to $DSH_HOME/profiles/<profile>/node_modules/dsh-command-monitor/; backs up and updates the profile’s package.json (including dependencies + dsh.profile.bundles); and prints verification steps.

Method B: Manual Installation. First, copy the directory into the profile:

cp -R . "$HOME/.dsh/profiles/web/node_modules/dsh-command-monitor"

Then edit ~/.dsh/profiles/web/package.json to add dependencies and bundles:

{
  "dsh": {
    "profile": {
      "bundles": ["…", "dsh-command-monitor"]
    }
  },
  "dependencies": {
    "dsh-command-monitor": "file:/absolute/path/to/dsh-command-monitor"
  }
}

README notes: $DSH_HOME defaults to ~/.dsh; on Windows, paths and commands need to be adjusted for PowerShell syntax.

After installation, DSH’s HMR will automatically reorganize the plugin graph, so usually no need to restart dsh web; if the floating button doesn’t appear on the page, refresh the page once. For upgrades, uninstallation, rollback, multi-profile, and troubleshooting, see docs/DEPLOYMENT.zh.md in the repository.

Verification steps after installation:

  1. Open / Refresh dsh Web GUI;
  2. A floating button with a terminal icon appears in the bottom-right corner (with a badge if there are running commands);
  3. Click the button to expand the “Execution Process” panel;
  4. In any conversation, let the AI execute a command (e.g., echo hello), and the corresponding entry should appear in the panel.

Typical Usage

Daily operations after opening the floating window:

  • Drag: Hold down the floating button or panel title bar to drag; the small triangle in the top-left corner of the panel can be used to resize.
  • Scroll: Use the mouse wheel to scroll up and down within the panel; scrolling up automatically pauses “Follow”.
  • Toggle Scope: Switch views using “Command / All” at the top of the panel.
  • Copy: “Copy” on the right side of a single entry, or “Copy” at the top to copy all records under the current filter.
  • Download: Top “Download” -> Markdown / Plain Text / JSON.
  • Collapse: The “—” at the far right of the panel title bar; clicking the floating button again expands it.

A typical workflow can be like this: let the AI run a command, the panel shows a “Running” entry; when the command finishes, stdout / stderr, exit code, and duration are filled in; if the output needs to be archived, simply download Markdown or JSON, no need to copy and paste from the chat history. For entry field details, follow logic, download format, and storage keys, see docs/USAGE.zh.md in the repository.

Implementation Highlights

  • UI Slot: Uses shell.overlay (root scope, full-frame overlay, clickable-through), occupying only one entry point, without replacing any existing UI.
  • Data Source: The Conversation chat target of the current main session, which refers to the tool/call / tool/result nodes already assembled in the chat; does not scrape DOM, nor does it re-parse network data.
  • Collector: A headless component mounted on conversation.session.header.utilities, uses useChat to read the current session, and publishes to a module-level store after debouncing; automatically rebinds when switching sessions.
  • Rendering: React 18 (DSH platform built-in module), no bundler; client.js directly follows DSH’s window.__ModuleLoader__.load CJS protocol, depending only on react.
  • Styling: Uses --dsw-* tokens and --dsh-* font variables throughout, following theme and font size settings.

For architecture diagrams and details, see docs/DEVELOPMENT.zh.md.

Applicable Scenarios and Notes

Who is it for:

  • Developers who primarily work in the dsh Web GUI and want the command execution process to always be visible;
  • Teams that need to export execution records for archiving (Markdown / Text / JSON);
  • People who do not want to interrupt the conversation flow with AI and do not want to restart dsh web.

Limitations to note (all from “Known Limitations” in the README):

  • Only follows the current main session, does not aggregate calls from other sessions or sub-agent sidebars;
  • Session event window is loaded on demand: very old commands need to be loaded by scrolling up in the chat first before the floating window can see them;
  • Command output is completed all at once when the command finishes (consistent with command cards in the chat), not streamed line by line; for background tasks, please use the task panel on the right to see real-time output;
  • At most renders the last 300 entries at once (Copy / Download still includes all entries under current filtering);
  • The floating window depends on the Conversation session view: when switching to other main panels like “Plugins / Context”, it retains the last data and shows “Update Paused”, resuming when returning to the conversation.

Privacy and Security: The plugin runs only locally in the browser, sends no network requests, does not read credentials, and does not modify session content; Copy / Download is done via browser Clipboard and Blob APIs, data stays on the machine; the host-side index.js is an empty implementation, does not register tools, and does not read or write files.

Before installation, you should read the source code (the repository is small, with client.js and index.js as the core) and confirm that the MIT license meets team requirements.

Conclusion

The value of dsh-command-monitor lies in extracting command execution from the chat stream: the floating window takes up no space, and when expanded, you can see the full command, output, exit code, and duration; copying and exporting are also convenient. It does not change DSH’s permission model; it is simply a browser-side plugin with low overhead and is ready to use immediately after installation.

  • Community Directory Page: https://www.skillhub.cn/plugins/j4ckzh0u/dsh-command-monitor
  • GitHub Repository: https://github.com/j4ckzh0u/dsh-command-monitor
羽毛球分组比赛记分
小程序二维码

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

Xiaoye