dsh-compact-activity
 
简体中文 | English
Make DeepSeek Harness thinking and tool calls more compact and easier to browse.
The plugin groups consecutive thinking and tool calls into a single-line collapsible item. It stays collapsed by default; expand it when you need details. The model's final output always displays normally.
Why use it
- Less scrolling: consecutive thinking and tool calls collapse into one item.
- Soft panel appearance: a subtle surface, fine border, and state rail add hierarchy; violet marks running, Miku green marks completion, and red marks execution errors.
- Clear expanded ownership: a neutral process spine connects the summary's flat lower edge to official child rows; consistently rounded child surfaces use pale violet, green, or red for running, completed, or failed states.
- Official content unchanged: expanding still uses DSH's official Think, Code, and tool components.
- Model output preserved: the next model message is never folded into the process list.
- Live status: while running, it shows
In progress..., counts, and the latest activity summary. - Failure count: failed process steps have a separate count.
- Counts terminal failures: in addition to regular tool failures, non-zero exit codes and terminating signals from PWSH, Bash, and similar terminal tools count as failed steps.
- Terminal state: when the final process item fails or is interrupted, it shows
Execution error; when it ends normally, it showsDoneand later model output does not clear that state.
The plugin only adjusts the Web UI presentation. It does not modify model context, session logs, or tool execution.
The top-level disclosure's status and counts follow DSH's language setting, with 中文 and English dictionaries. When no explicit preference is stored, DSH derives the initial language from the browser; switching the DSH language updates existing disclosure rows. Official tool titles and summaries remain unchanged.
Screenshots
<img width="1124" height="201" alt="image" src="https://github.com/user-attachments/assets/ee50fdb0-82d1-4493-9342-788a4b985ab4" />
----------
<img width="1124" height="201" alt="image" src="https://github.com/user-attachments/assets/df69b7d5-a87b-4ff6-9bab-b6067bc1583e" />
----------
<img width="1176" height="604" alt="image" src="https://github.com/user-attachments/assets/8ecbd9f3-696b-40db-8532-e255dc0ae4e4" />
-----------
<img width="1149" height="603" alt="image" src="https://github.com/user-attachments/assets/a9fcdba8-c72c-4b79-9171-225b9a2f1e3a" />
Installation
DSH Desktop 2.0.x
Open the DSH Terminal from the system tray and run, against the current profile:
dsh plugin add dsh-compact-activity@latest
dsh --dump-config
pnpm list dsh-compact-activity --depth 0The config output should contain id: ui-compact-activity and name: dsh-compact-activity. After verifying, restart DSH Desktop.
Desktop already bundles Node.js, pnpm, and DSH. You don't need to install these globally for this plugin, and you should not use npm in place of pnpm. Commands in the DSH Terminal operate on the Desktop's current profile by default; don't add --profile web.
Desktop applies a 24-hour minimum publish time policy to freshly published npm packages. Prefer @latest when installing, then compare the npm latest version with the version actually installed in the profile:
$latest = pnpm view dsh-compact-activity dist-tags.latest
pnpm list dsh-compact-activity --depth 0If the installed version is not $latest, explicitly install the queried version to confirm the user's choice:
dsh plugin add "dsh-compact-activity@$latest"dsh plugin update dsh-compact-activity --latest can also keep the old version and show Already up to date because of the security window, so always check the actual version instead of relying on the command's exit status.
Each Desktop profile has its own plugin manifest and build config. After switching from desktop to web in the tray, plugins installed in desktop do not automatically appear in web. Switch to the target profile first, then run the install, update, and verification commands again in that profile's DSH Terminal. The same applies when switching back to another profile.
Plain DSH CLI/Web
For Linux, macOS, and Windows environments that already have dsh and pnpm in the terminal. Node.js and npm alone cannot install DSH plugins; configure pnpm and DSH using the official DSH method first.
dsh plugin --profile web add dsh-compact-activity@latest
dsh --profile web --dump-configThe config output should contain id: ui-compact-activity and name: dsh-compact-activity. After verifying, run dsh --profile web. The plugin is enabled by default.
Ask an agent to install it
If your agent can use a terminal, send it the following:
Please install and verify the latest version of dsh-compact-activity.
1. If the target is DSH Desktop 2.0.x, locate and use the DSH Terminal program or launch entry provided by Desktop. Don't use plain PowerShell, CMD, or another terminal instead. If you can't find DSH Terminal, stop and report; don't guess paths.
2. In DSH Terminal, prefer running `dsh plugin add dsh-compact-activity@latest`, `dsh --dump-config`, and `pnpm list dsh-compact-activity --depth 0`. These operate on Desktop's current profile; don't add `--profile web`.
3. Query the npm latest version with `pnpm view dsh-compact-activity dist-tags.latest`. If the installed version differs, run `dsh plugin add "dsh-compact-activity@<queried version>"`; don't hardcode a version.
4. Use `--profile web` commands only when the target is clearly a plain DSH CLI/Web setup. That path requires `dsh` and `pnpm`; npm can't replace pnpm.
5. The config output must contain `id: ui-compact-activity` and `name: dsh-compact-activity`. Read the installed package's `package.json` and report the npm latest version, installed version, install path, and verification result.
6. If locating or launching the terminal, running commands, downloading over the network, or reading verification results requires permissions you don't have, tell the user immediately which operation is blocked, what permission is needed and why, and ask for authorization. Don't continue before authorization; don't escalate privileges or bypass restrictions.
7. Don't install global tools, inspect paths inside app.asar, edit profile manifests, modify Desktop app files, or copy plugin files manually.Usage
The plugin has no separate settings page. After installation, restart DSH Web or Desktop and it takes effect automatically; DSH's Language setting controls the copy:
| Scenario | Display behavior |
|---|---|
| Multiple consecutive process messages | Grouped into one collapsed top-level item |
| Single process message | Placed in one collapsed top-level process item |
| Thinking in progress | Shows In progress..., counts, and Thinking (pale violet) |
| Calling a tool | Shows the last official tool's type and summary (pale violet) |
| Work finished | Shows Done and counts, with no summary (pale green) |
| Some tool calls fail but the final tool call succeeds | Shows Done and retains the failed-step count |
| The final process item ends abnormally | Shows Execution error with the same icon-count layout (pale red) |
| Model output follows an execution error | The process group remains Execution error; model output stays visible |
| A tool call in the next turn fails independently | Standalone error row; not attached to the previous process group |
| Switching the DSH language | Status and counts switch between Chinese and English |
| Top-level item expanded | Connects the original Think and tool components with a process spine and pale per-item state surfaces |
| Thinking and a model message in one step | Only the Think is collapsed; the message still displays |
Overly long live summaries are truncated automatically and never squeeze the layout.
Updating and uninstalling
Desktop 2.0.x, in the DSH Terminal:
dsh plugin update dsh-compact-activity --latest
dsh plugin remove dsh-compact-activityAfter updating, compare versions with pnpm view dsh-compact-activity dist-tags.latest and pnpm list dsh-compact-activity --depth 0. If the versions differ, install the queried explicit version with dsh plugin add "dsh-compact-activity@<version>".
Plain CLI/Web:
dsh plugin --profile web update dsh-compact-activity --latest
dsh plugin --profile web remove dsh-compact-activityRestart DSH Desktop or DSH Web afterwards.
Plugin not working after switching profiles on Desktop
Troubleshoot in this order:
1. Switch to the target profile that needs the plugin from the tray. 2. Open the DSH Terminal for that profile and run:
``powershell dsh plugin add dsh-compact-activity@latest dsh --dump-config $latest = pnpm view dsh-compact-activity dist-tags.latest pnpm list dsh-compact-activity --depth 0 ``
3. Confirm the output contains both id: ui-compact-activity and name: dsh-compact-activity, and compare the npm latest version with the installed version. 4. If the versions differ, run dsh plugin add "dsh-compact-activity@$latest", then re-check the installed version and config. 5. Restart DSH Desktop, then check the top-level process grouping.
pnpm peers check may report missing React, DSH Client, or Locale peer dependencies for older plugin versions. These modules are provided by the DSH host and should not be manually installed into the profile; the current version marks them as optional peers. If the target profile still has no effect despite the config above, record the DSH/Desktop version, launch method, npm latest version, installed plugin version, install path, and browser console errors. Don't edit profile manifests, copy plugin files, or inspect app.asar; those actions bypass Desktop's normal plugin loading flow.
Installing from local source
The project uses strict-mode TypeScript and requires Node.js 22.19+ or 24+:
npm install
npm run check
dsh plugin --profile web add .
dsh --profile web --dump-config
dsh --profile webIf you use the Harness source build, run pnpm dsh ... from the Harness source root and replace . with this plugin directory's absolute path.
Installing from a tarball
npm pack
dsh plugin --profile web add ./dsh-compact-activity-<version>.tgzReplace <version> with the actual version from the npm pack output. The tarball contains the prebuilt lib/, so no rebuild is needed at install time.
Development and verification
npm run typecheck
npm test
npm run build
npm pack --dry-runnpm run check runs strict type checking, tests, and a production build in order. lib/ is generated locally and is not tracked by Git; prepack rebuilds it before publishing or packing and includes it in the npm package.
Tests use the dev dependencies jsdom, react-dom, and tsx to verify the core grouping logic and browser controller behavior. They never enter the npm tarball; npm test auto-discovers test/*.test.ts.
scripts/
└── clean.ts # Cleans the build directory with Node's native TypeScript support
src/
├── index.ts # Host entry that lets the Loader discover the browser plugin
└── client/
├── index.ts # Registers the controller and manages style lifecycle
├── activity-group.ts # Process grouping, boundaries, states, and counts
├── locales.ts # Chinese and English dictionaries for the DSH Locale namespace
├── styles.ts # Styles for the top-level collapsed row and hidden states
└── components/
└── CompactActivityController.tsx # Controls the top-level collapse state of official process rowstsconfig.json enables strict, noUncheckedIndexedAccess, and exactOptionalPropertyTypes, and checks source, tests, build config, and scripts.
Compatibility
Compatibility status:
| Environment | Version | Result |
|---|---|---|
| DeepSeek Harness official Web | 0.1.1-rc.2 client packages | Typecheck, all 23 jsdom tests, and production build passed |
| DeepSeek Harness official Web | 0.1.1-rc.1 client packages | Typecheck, all 23 jsdom tests, and production build passed |
| DeepSeek Harness official Web | 0.1.0-rc.8 client packages | Dependency declarations, exports, and stable markers reviewed |
| DSH Desktop (Windows) | 2.0.2, bundled DSH 0.1.1-rc.2 | Upstream dependencies and extension points reviewed; typecheck, all 23 jsdom tests, and production build passed; real Desktop UI not verified |
| DSH Desktop (Windows) | 2.0.1, bundled DSH 0.1.0-rc.7 | Local profile install and real-UI verification passed |
Linux and macOS users can also use the plugin through the official CLI/Web.
The plugin relies on the following DSH Web extension points and stable markers:
conversation.session.header.actions- The
localeservice and slotttranslation seat from@deepseek-ai/dsh-client-locale - Chat Flow's
data-chat-flowanddata-chat-flow-key - The official process items'
data-variant="think",data-tool,data-state, anddata-disclosure-row assistant-stepandtool-callChat Node data
The dictionaries register in the plugin-owned compact-activity namespace, and statuses and counts render through DSH's injected t translator; the other markers are provided by DSH and are not a public API controlled by this plugin. After upgrading DSH, manually check top-level grouping, official sub-item interactions, language switching, and live tool summaries.
DSH Desktop service boundary
This plugin is a cross-environment Web UI plugin. It does not switch profiles, install/update/uninstall plugins, or fix dependencies, so it does not use Desktop-specific desktopProfiles, desktopPnpm, desktopRuntime, or Electron IPC. Desktop still loads this plugin through the normal DSH Web Client module path; don't add Desktop Host services as required injections for this plugin, and don't access app.asar or other Desktop-private paths.
Real Desktop verification should use the DSH Terminal provided by Desktop and confirm that the current profile's config contains id: ui-compact-activity and name: dsh-compact-activity. The jsdom tests in this repo cannot replace real Desktop/Web host regression checks.
Feedback
For compatibility issues, file a report on GitHub Issues with:
- DSH version and launch method;
- plugin version;
- browser console errors;
- screenshots that reproduce the issue.
Don't include model context, tokens, or other sensitive information in issues.
License
[MIT](./LICENSE) © 2026 wallpap