dsh-workspace-categories: DSH Desktop Workspace Classification Tree

Preface

The DeepSeek Harness (DSH) desktop version provides a workspace and session list by default in the left sidebar. As the number of workspaces increases, the cost of finding directories and past sessions in the flat list grows noticeably. The community plugin dsh-workspace-categories (maintained by Knight-Zjy) replaces that same slot with a VS Code-style three-level tree: Category → Workspace → Session. Category definitions and collapse states are stored locally in the browser, without altering the workspace data model on the host.

What is this

dsh-workspace-categories is a client-side plugin for the DeepSeek Harness desktop version: it takes over the sidebar.workspaces slot in the sidebar and replaces the default browser UI of the official ui-workspace with a collapsible category tree. Official workspace services (Cordis services like ctx.uiWorkspace, workspaces, sessions, etc.) are still mounted as usual; this plugin registers with priority: -100, which is lower than the official default priority: 0 (lower value wins), so the category tree is displayed without needing to disable the official plugin. Once uninstalled or disposed, the native list immediately restores.

The rough structure of the tree is as follows (excerpt from the project README):

Category A                     ← Custom category (workspaces can be dragged in)
  └ Workspace A-1             ← Session count / New session / Assign to category
      └ Session 1
      └ Session 2
  └ Workspace A-2
Uncategorized                 ← Unclassified workspaces land here
  └ Workspace B

npm package name: dsh-workspace-categories (version 0.1.1, license MIT in the current materials). Requires DSH >=0.2.0-rc.2.

How it takes over the left sidebar (coexisting with the official UI)

The sidebar.workspaces slot in the DSH sidebar is a single slot: multiple registrations can be attached to the same slot, and rendering priority is determined by the priority value — the one with the lowest priority wins.

The relationship between this plugin and the official ui-workspace can be summarized as follows:

  1. This plugin uses priority: -100, while the official browser uses priority: 0 → once installed and enabled, the category tree is displayed.
  2. ui-workspace still remains in the bundle; ctx.uiWorkspace and its other extension points remain available.
  3. Switching views does not require changing configuration or restarting: the list icon on the right side of the tree’s top bar, or the folder icon at the bottom of the sidebar (sidebar.footer.action), allows switching between “Category tree / Native list”; the choice is persisted in the localStorage key dsh.workspace-tree.state.v1.

All data comes from client-side Cordis services; no RPC is used. Category names, workspace-to-category assignments, etc., are pure UI metadata stored in the browser’s localStorage; there is no host-side state. The host half lib/index.js is just an empty apply(), used by the Loader to discover ./client.

Core features

The following capabilities are taken from the feature table and descriptions in the project README.

Capability Description
Category management Top bar + to create new; pencil icon on the category row to rename, × to delete (workspaces return to “Uncategorized” after deletion)
Classification Dropdown box on the right side of a workspace row, or drag a workspace row onto a category row
Collapsing Click a category row / workspace row to collapse; state is persisted
Sessions When expanding a workspace, 5 sessions are shown by default; “Show more” adds 10 each time; clicking a session row opens that session
Running indicator Pulsing dot on the right side of the session row
New session The + on a workspace row calls ctx.uiWorkspace.startSession(workspaceId)
New workspace Folder button in the top bar, + on each category row, + on the “Uncategorized” row: after selecting a directory via the system directory picker, it immediately becomes a workspace; when initiated from a category row, it is automatically assigned to that category
Filtering The input box at the top matches both workspaces (title/path) and sessions (title/path/id)
Sorting Pinned sessions come first, the rest are sorted by updatedAt in descending order (consistent with the official browser)

Creating a new workspace follows the same chain as the official one: prefer globalThis.__DSH_DIRECTORY_PICKER__?.pick(), otherwise ctx.get('uiWorkspace').pickDirectory(); it is adopted as await ctx.get('workspaces').create({ path }). If the user cancels the selection, no action is taken; on failure, a closable error bar is shown at the top of the tree.

When the sidebar is collapsed into a narrow rail (wide === false), this plugin degrades into an icon rail, consistent with the slot props convention.

Installation and enabling

The package has been published to npm under the name dsh-workspace-categories. It is recommended to install it via the profile package manager, which will automatically write it into that profile’s dsh.profile.bundles:

dsh plugin --profile desktop add dsh-workspace-categories

You can also add it via Settings → Plugins in the app, filling in the package name dsh-workspace-categories.

Restart the desktop app after installation. cordis.yml is a generated file; do not edit it manually.

To uninstall:

dsh plugin --profile desktop remove dsh-workspace-categories

A restart is also required after uninstallation.

When developing from source, you can follow the README to create a symbolic link from the directory to ~/.dsh/profiles/desktop/node_modules/dsh-workspace-categories, and append the package name to the end of dsh.profile.bundles in that profile’s package.json; after development, you should switch back to the npm installation to avoid coexistence of the symlinked version and the npm version.

Typical usage

  1. Create categories by project or topic: click + in the tree top bar to create categories, e.g., “Client”, “Document Repositories”.
  2. Assign workspaces to categories: select a category in the dropdown on the right side of a workspace row, or drag the workspace row onto the target category row.
  3. Switch sessions under the same workspace: expand a workspace and click a session row to open it; click “Show more” when you need more history.
  4. Quick creation: click + on a workspace row to create a new session; click + / the folder button in the top bar or on a category row, and use the system directory picker to add an existing directory as a new workspace.
  5. Temporarily return to the official list: click the list icon at the top of the tree or the folder icon at the bottom, without uninstalling the plugin; official list-only capabilities such as archiving sessions can be operated in the native view.

After entering keywords in the top filter box, the workspace and session lists are filtered synchronously; when expanding a workspace, sessions are also filtered by the same keyword.

Applicable scenarios and notes

For whom: developers who maintain multiple disk directories as workspaces in the DSH desktop version long-term and want to organize the list with custom categories. This aligns with DSH’s “everything is a plugin” ecosystem; the plugin directory page is at SkillHub. It has no official affiliation with DeepSeek / High-Flyer; before installing, it is still recommended to review the GitHub source and the MIT license.

Known limitations (from the README):

  • Drag-and-drop only supports “Workspace → Category”; it does not support category reordering, nor manual reordering of workspaces within a category.
  • Creating a new workspace uses the system directory picker and can only select existing directories; the official browse-style in-app browsing is not implemented.
  • Archived sessions do not appear in the tree; restoring archived sessions requires switching back to the official list.
  • Categories are stored only in local localStorage and are not synced across machines; clearing the cache will lose the categories.

Security and permissions: the plugin runs inside the DSH client process, reads and writes local localStorage, and calls Cordis services related to workspaces and sessions; before installing, you should verify the package source (the npm package name or a source path you trust).

If your plugin wants to extend the UI in the same tree, the README mentions that you can continue registering below priority: -100, or directly fork this plugin as a sidebar.workspaces implementation; the slot props are { wide, expandSidebar }.

Conclusion

dsh-workspace-categories reorganizes the left sidebar browsing experience with a category tree without replacing the official workspace services, and supports switching back to the native list with one click. The installation command is dsh plugin --profile desktop add dsh-workspace-categories; after enabling, restart the desktop app.

  • Directory page: https://www.skillhub.cn/plugins/Knight-Zjy/dsh-workspace-categories
  • GitHub: https://github.com/Knight-Zjy/dsh-workspace-categories
羽毛球分组比赛记分
小程序二维码

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

Xiaoye