dsh-t3-session-ui: Presenting T3 Code-style Conversation Context within the Existing DSH Interface

Preface

When running multiple sessions simultaneously in DeepSeek Harness (DSH), a single line of sidebar titles is often insufficient: facts such as machine name, workspace, branch, model, approval status, and context usage are scattered across the Host side. The Client plugin in the browser cannot directly read APIs like sessions, tokenMeter, and approval—which are not exposed via @Remote—through ctx.remote. To centrally display “what environment this session is running in and what state it is in” without modifying the input box (composer), a dedicated Client plugin combined with a Host-side data bridge is required.

Below we introduce the community plugin dsh-t3-session-ui (maintainer yusufameri), which ports the session context information hierarchy of T3 Code into DSH’s existing slots: session row hover cards, leading model chips, status pills, conversation header toolbars and lineage breadcrumbs, as well as context compaction triggered via menus; it adds no UI to the composer.

What Is This

dsh-t3-session-ui is a client-side plugin for DSH (dsh.client.platform in package.json is web). Each session corresponds to a context bundle assembled by the plugin’s Host half; facts that the Host cannot read are omitted rather than fabricated—for example, if a session is not within a git working tree, the branch row will not appear.

The information hierarchy design comes from T3 Code (MIT open source); this plugin retains the same presentation form while replacing the underlying data with DSH’s Session, git detection, and event waterfall. The current package version is 0.2.0, license MIT.

Core Features

Mount Points (Seat) and Display Content

Each UI surface reads data from the same set of per-session contexts, registered on DSH’s existing slots:

UI Location Seat Main Display
Session row hover card sidebar.session.row.hover Status, machine, workspace, branch (including dirty), worktree, model·provider, agent preset, parent session, delegation depth, approval policy, context usage, error lines
Leading chip sidebar.session.row.leading Model name + status dot
Row hover action sidebar.workspaces.session.row.action Copy context bundle (alongside archive and pin buttons)
Session header toolbar conversation.session.header.utilities Status, model, branch, workspace, approval policy, sub-agent count, preset, delegation depth
Header lineage conversation.session.header.lineage Session title plus parent session, preset, depth chips
Settings item settings.general.item This plugin’s preferences: whether to display each fact, machine name override
Header action conversation.session.header.actions Copy entire context bundle as JSON
Row menu sidebar.workspaces.session.menu.item Copy context JSON, copy branch name, copy working directory

README note: earlier versions placed a context ring on the composer, which has been removed; token details (such as 42% · 83k/200k) now appear in the context row of the hover card, and Compact context is in the session row ... menu, calling DSH’s built-in /compact—the plugin does not reimplement compaction logic.

Status Ladder

Status is resolved on the Host side according to T3 Code priority:

Ladder DSH-side Determination
Pending approval approval/request waterfall bracketed outside next(), lit during manual decision
Awaiting input user-questions/request waterfall, similarly bracketed
Working Live api-session/status event + unclosed turn/start in session log
Error Failed turn/end, or api-session/error outside a turn
Subagent work ctx.subagents.listChildren(sessionId)
Ready None of the above

Approval and awaiting-input are in-process states, so they are read from the waterfall rather than relying solely on the session log.

Bridge Between Host and Browser

The browser cannot directly call node:os or the above Host APIs. The plugin’s Host half provides fenced JSON RPC routes (only loopback and deployment-declared trusted authorities, with Origin validation):

POST /t3session/api/hostFacts        -> machine identity, no sessionId required
POST /t3session/api/sessionContext   -> { sessionId } -> context bundle
POST /t3session/api/compact          -> { sessionId } -> execute /compact

The Client accesses these using relative-path fetch, a bridging approach similar to dsh-better-sidebar and @michengai/dsh-codex-ui.

Primary fact sources (excerpt):

Fact Source
Machine label Beautified os.hostname(), overridable by config or in-browser display settings
Working directory, preset, parent session, delegation depth Session.header
Provider, model, context window size Session.requestContext()
Branch, dirty, worktree git in the session directory (cached for 5s)
Tokens used ctx.tokenMeter.measure(session)
Liveness and pending asks api-session/status, api-session/error, approval/user-question waterfalls
Sub-agents ctx.subagents.listChildren(sessionId)
Approval policy ctx.approval.overrideOf(session)

Display Preferences

Preferences appear in a single row for this plugin in DSH Settings → General, stored per browser in dsh.t3-session-ui.prefs.v1: toggles for each fact (machine, workspace, branch, model, preset, approval, context), as well as a machine label override (takes precedence over the Host-beautified hostname). These only affect this plugin’s rendering, requiring no Host round-trip; a single Host can be connected by multiple browsers.

Installation and Enablement

Install from the plugin directory under the desktop profile (command from the README):

dsh plugin --profile desktop add dsh-t3-session-ui

If you already have a local checkout (no build step required):

dsh plugin --profile desktop add /path/to/dsh-t3-session-ui

Removing the bundle unregisters all seats and restores the original composer toolbar with no residue.

Optional Host configuration (written as a bundle patch):

- id: t3-session-ui
  name: 'dsh-t3-session-ui'
  config:
    machineLabel: "Shima's MacBook Pro"   # optional; default uses beautified hostname

Other display items are adjusted in the single plugin row in DSH settings.

Typical Usage

  1. After installing and restarting or refreshing the DSH Web client, open the sidebar session list: model chips and status dots are visible at the start of each row; hovering over a row opens a context card showing machine, workspace, branch, context usage, etc. (depending on display toggles).
  2. After entering a session, view the utilities bar and lineage breadcrumbs in the session header; when full debugging information is needed, use the header actions or “Copy context JSON” in the row menu.
  3. When context approaches the window limit, select Compact context from the session row ... menu, and the Host will call DSH’s /compact.
  4. If the default hostname is inconvenient to recognize, set a machine label override in Settings, or configure machineLabel in cordis.patch.yml.

Development side: pure ESM, no build; modify client.js and refresh the page. pnpm test in the repository runs 101 tests (README Development section).

Use Cases and Caveats

Suitable for: users who routinely run multiple sessions in parallel in the DSH desktop/Web client, need to see model/branch/approval/context usage at a glance, and want the UI to be consistent with T3 Code habits.

Caveats:

  • The plugin runs with the current dsh process permissions; before installing, please read the GitHub source code and the MIT license, and evaluate the Host routing and git detection behavior yourself.
  • The community directory SkillHub plugin page has no official affiliation with DeepSeek / High-Flyer; the DSH ecosystem emphasizes “everything is a plugin”, and this introduction does not represent official endorsement.
  • Fields such as non-git workspaces, branches/worktrees that the Host cannot detect, etc., will be missing—this is by design, not a fault.

Closing

dsh-t3-session-ui connects T3 Code’s session context UX to DSH’s existing sidebar and session header slots, fills in data the Client cannot obtain with a Host-side facts bridge, and preserves browser-local display preferences. If you are organizing the DSH client experience, you can start from the directory page or the installation command in the repository README.

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

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

Xiaoye