dsh-session-tabs: Multi-session tabs for a single client, retaining the native sidebar and background tasks

Foreword

When working on multiple sessions simultaneously in DeepSeek Harness (DSH), the common practice is to repeatedly click into different sessions in the left column or rely on system-level multi-window management. While the left column list manages sessions, the current view typically hosts only one session at a time. When tasks are running in the background and the sidebar and workbench need to remain accessible, the cost of frequent switching becomes noticeably high.

Below is an introduction to the community client plugin dsh-session-tabs (maintainer DEVbyQIN, npm package name dsh-session-tabs). Without introducing iframes or extra runtime dependencies, it adds top session tabs to a single client, reusing the native DSH chat view and task services, while preserving the left/right sidebars and the bottom workbench as much as possible. The plugin is released under the MIT license. The current npm version is 0.1.6, and the README states it has been verified on DSH 0.2.0-rc.2. Since the host client API is still evolving, it is recommended to re-validate after upgrading DSH.

What is this

dsh-session-tabs is positioned as: Single-client session tabs preserving native sidebars and background work.

In terms of implementation, there is only one native chat view tree; the tabs are responsible for switching session identity and top-bar interactions, without replacing native sidebar/rightbar slots or right-column services. Closing a tab does not mean deleting, archiving, or stopping a session—running or pending sessions are kept in the background, and extra references are released upon completion. Closing the entire client, uninstalling the plugin, and closing a tab are distinct operations.

Core Features

Tabs and Sessions

  1. Sessions opened via the native left column automatically appear in the top tab bar; click a tab to switch sessions, and use + to create a new session via native means.
  2. × only closes the tab, not deleting the session; background tasks and host native navigation behavior remain handled by DSH.
  3. Tabs can be dragged to reorder; once a tab is focused, left/right arrow keys switch sessions, and Alt + Shift + Left/Right adjusts order. The input box does not intercept these shortcuts, so Chinese IME composition is unaffected.
  4. The “Tab Window” line icon at the bottom of the left column can show/hide the tab bar; when focus is within the tab bar, ⌘/Ctrl + Shift + T can restore the most recently closed tab within this window.

Interface and Native Controls

  • The current tab and content area share the same light surface, connecting with the content area via reverse rounded corners at the bottom sides; non-current tabs sit on a darker background, where titles and close buttons share a gray background on hover, following the DSH light/dark theme.
  • + follows the tabs and is center-aligned with ×, with no ⋯ displayed beside it. The bottom workspace and right sidebar entries are located at the right end of the tab row, reusing the icons, states, and click events of the corresponding native buttons; if native entries are missing, the corresponding buttons are not shown, and the original entries are restored when switching back to the native view or uninstalling the plugin.
  • When the right column is expanded, the central open entry is hidden, retaining only the native collapse button at the far right of the window; both related buttons have a 28px click area. During animation, the right column toggle position remains fixed to prevent bottom buttons from intruding.

Status Indicators

Optional status markers on tabs (the dot is not shown when idle):

Symbol Meaning
● Running
! Awaiting confirmation
✓ Completed & Unread
… Connecting

State Storage and Performance Boundaries

Tab order, enablement preferences, and active identity are saved in the browser’s localStorage['dsh-session-tabs.v1']; refreshing restores tabs, and invalid or archived session IDs are pruned. Multiple windows sync preferences and tab identities but will not hijack the current session of another window.

When reopening the client, non-active tabs only restore identity and do not immediately load all history; visited tabs retain a lightweight session binding to carry over native draft/attachment states, but their count still affects memory. The plugin does not promise infinite tabs or fixed memory overhead; drafts follow native mechanisms, with no guarantee of cross-restart draft persistence. Mounting relies on the stable data-slot="main", making host DOM structure changes the primary compatibility risk; on mount failure, new nodes are rolled back and the native interface is preserved.

0.1.6 fixes the issue in 0.1.5 where the entire window froze when opening global pages like plugin management; users still on 0.1.5 are advised to update.

Installation and Enablement

The plugin runs with the permissions of the current DSH process. Before installation, please review the GitHub repository source code and the MIT license. Community directory page: dsh-session-tabs on skillhub.cn (an independent community site, with no official affiliation with DeepSeek / High-Flyer). It is recommended to try it in a separate profile first.

npm package: dsh-session-tabs.

Desktop: Add dsh-session-tabs in the in-app plugin manager.

Web: Use the DSH command:

dsh plugin --profile web add dsh-session-tabs@0.1.6

If manually managing profiles with npm, first navigate to the target profile directory, then execute:

npm install dsh-session-tabs@0.1.6 --ignore-scripts

After manual installation, you also need to enable dsh-session-tabs in that profile’s dsh.profile.bundles, then refresh or reopen DSH; the plugin manager and the aforementioned dsh plugin command usually handle the enablement logic.

To only download an offline package, execute in the target directory:

npm pack dsh-session-tabs@0.1.6

This generates dsh-session-tabs-0.1.6.tgz, which can be added in the DSH plugin manager using the full path to the file.

Install from GitHub

dsh plugin --profile web add github:QIN-SMART/dsh-session-tabs

Note: The CLI’s --profile desktop is a reserved name and cannot be used with the Web command syntax above. Users with existing local installations can update to dsh-session-tabs@0.1.6 in the target profile’s package manager, then fully exit and reopen the application.

Temporary Rollback and Removal

  • Temporary Rollback: Click the view switch icon at the bottom of the left column to switch back to the native single-session layout.
  • Full Removal: Remove dsh-session-tabs in the target profile’s plugin manager and refresh the client; injected nodes, styles, subscriptions, and session references will be cleaned up. The local tab list dsh-session-tabs.v1 may remain in the browser’s localStorage; you can clear the corresponding localStorage key for that site if needed.

Typical Usage

After completing the installation and enablement steps above, daily usage can follow this workflow:

  1. Open or create sessions via the native left column; they will automatically enter the top tabs.
  2. Click tabs to switch between multiple sessions; use + to create new sessions, and × to close only the tab (sessions and background tasks remain managed by the host).
  3. When needing to monitor task status side-by-side, pay attention to markers like ● and ! on tabs; switching tabs does not automatically stop tasks in other sessions.
  4. Drag to reorder when there are many tabs; to restore an accidentally closed tab, focus within the tab bar and press ⌘/Ctrl + Shift + T.
  5. If you do not want to show the tab bar, toggle it with the “Tab Window” icon at the bottom of the left column; upon showing it again, order and preferences are restored from localStorage.

Conflicts arising from different sessions modifying the same file simultaneously are still handled by DSH and the user; this plugin does not alter host behavior.

Suitable Scenarios and Caveats

Suitable for: Maintaining multiple agent sessions in parallel within the same DSH client (e.g., one thread running a long task while another awaits confirmation), while wishing to continue using native left column, right column, and bottom workbench, rather than opening multiple system windows or building custom iframe shells.

Caveats:

  • The plugin declares the client platform as web (dsh.client.platform: "web" in package.json). On Desktop, simply add the package name via the in-app plugin manager; on the Web side, the installation command requires --profile web.
  • The DSH client API is still changing. After major version upgrades, critical paths (tab switching, right column animation, plugin management pages, etc.) should be re-validated. For a detailed validation scope, see the Validation Notes in the repository.
  • The GitHub organization name in community clues may not match the npm repository fields: npm and README installation examples point to QIN-SMART/dsh-session-tabs; take the README and package.json repository fields as the source of truth.

Conclusion

dsh-session-tabs uses a lightweight top tab bar to contain multiple sessions in a single client, minimally disturbing the native sidebar and background task models. If you are extending workflows in the DSH ecosystem following the “everything is a plugin” approach, you can install 0.1.6 in an independent profile to test it out before deciding whether to incorporate it into your daily environment.

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

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

Xiaoye