dsh-session-titler:Generate Titles for DSH Sessions on Demand and Persist after Confirmation

Introduction

In DeepSeek Harness (DSH), the session list on the left distinguishes different tasks by their titles. While DSH or third-party plugins can automatically name sessions, common strategies rely on triggers like the “first prompt” or “every prompt.” This makes it difficult to manually request a summary-style title after a long conversation when the current one feels inappropriate. If you try to change the title manually, you have to extract key points from the long dialogue yourself.

The dsh-session-titler introduced below (maintained by ZilongYang) takes a different approach: with a single button click in the Web UI, it uses a model to compress the entire conversation into a single title proposal. The title is only written if you click “Confirm Change”; canceling, pressing Esc, or clicking the overlay will not modify session data. The plugin is categorized as “Model Inference,” and the current npm package version is 0.2.1 (MIT).

What is this

dsh-session-titler is a Host + Web Client dual-half plugin for DSH: The Host half registers a read-only HTTP route and calls the LLM; the Client half attaches a top-bar button and a session row menu to the existing page, popping up an editable confirmation dialog. It does not register a provider for ctx.sessionTitle (that slot is exclusive and would override DSH’s built-in automatic title provider), so it does not change your existing automatic naming behavior; it only generates a title when you explicitly click it.

Community Catalog Page: skillhub.cn/plugins/ZilongYang/dsh-session-titler. Source Code & Documentation: github.com/ZilongYang/dsh-session-titler. The DSH ecosystem emphasizes “Everything is a plugin”; directories like SkillHub are community sites and have no official affiliation with DeepSeek or Hithink.

Core Features

Two entry points, no new pages

Entry Point Location
Top Bar ✦ Generate Title In the session title bar, to the right of the “Creative Mode” chip and before the “Cost ¥0” chip
Session Row Generate Title In the left session row “…” menu, below “Rename” and above “Fork Session”

For empty sessions with no content to summarize, the button will be disabled (greyed out).

Generate → Edit → Confirm to Write

  1. After clicking the entry point, the Client sends a POST /session-titler/propose request to the Host (body { "sessionId": "session-…" }, ≤ 8 KiB).
  2. The Host reads the current session’s “model surface” (considering compression/replacement), assembles a transcript (default 32 KiB budget, with entry-level truncation), and calls the LLM via the session’s routed candidate (purpose: 'session-title').
  3. A dialog displays the title proposal, allowing editing or “Regenerate”; clicking Confirm Change uses the same session.rename(title) path as the official “Rename” function.
  4. The generation phase does not write to session logs; the title in the database remains unchanged until confirmed.

Model Routing & Fallback

Routing candidates are ordered from newest to oldest: Live session requestHeader().config → Each request/header in logs → agentDefaultModel. Each candidate must have a registered adapter in llm.listProviders(). If a session-recorded route lacks an adapter in the current profile, it falls back to an earlier available route or the default model; if the response contains fallback: true, the dialog will annotate “Model used: … (… fell back)”.

Adjustable Policies (Requires Host Restart after code changes)

Policies are centralized in the POLICY object at the top of title.js on the Host side; the plugin does not include a Config section:

Key Default Meaning
maxInputBytes 32768 Byte limit for the transcript sent to the model
maxOutputTokens 256 Token limit for title output
timeoutMs 30000 Wall-clock timeout for a single call
maxTitleBytes 120 UTF-8 byte limit for accepted titles
userCharsPerMessage / assistantCharsPerMessage 2000 / 3000 Character trimming limit per message

For oversized sessions, the system first trims individual messages, then discards entire messages from the middle (keeping the beginning and end); if it still exceeds the limit, the tail is cut off, and the return value is marked with truncated: true.

Installation & Activation

DSH requires version >=0.2.0-rc.1 and <0.3.0-0 (see engines.dsh in package.json); if outside this range, the plugin market’s pre-installation check will refuse installation.

Desktop Version (DeepSeek Harness.app)

The desktop profile is exclusive to the Electron app; the command dsh plugin --profile desktop … will result in an error. Please install it via the in-app left “Plugins” page; once listed, you can also search for titler to install.

CLI Managed Profiles

web, main, or custom profiles can be used:

# Install from npm (Recommended)
dsh plugin --profile <your-profile> add dsh-session-titler

# Install from GitHub source (tracking main branch)
dsh plugin --profile <your-profile> add github:ZilongYang/dsh-session-titler#main

# Local development: link mount
dsh plugin --profile <your-profile> add link:/absolute/path/dsh-session-titler

If the button is not visible after installation: The Host half runs inside the process, so you need to restart the dsh process or the desktop app and then refresh the page (refreshing is sufficient for the Client half).

Uninstallation (CLI profiles):

dsh plugin --profile <your-profile> remove dsh-session-titler

For the desktop version, deactivate or uninstall via the in-app “Plugins” page.

Typical Usage

  1. Open any session that already has content.
  2. Click the title bar ✦ Generate Title, or the session row … → Generate Title.
  3. Wait about 2–4 seconds, then view or edit the proposal in the popup.
  4. Click Confirm Change; the title in the left list updates immediately and persists after refreshing the page.

Clicking “Cancel”, pressing Esc, or clicking the overlay will not write any data.

Use Cases & Notes

Who it is for

  • Those who want to summarize a long conversation into a single sentence after the fact, without overriding existing automatic title plugin behaviors.
  • Scenarios requiring you to review a model proposal before changing the title, manually fine-tune it, and then save it.

Compatibility & Permissions

  • The README declares verification on versions 0.2.0-rc.2, 0.2.1-alpha.2, 0.2.1-rc.2, etc.; <0.2.0-rc.1 and >=0.3.0 are outside the support scope.
  • The plugin runs with the current DSH Host process privileges, reading session content and calling configured LLMs; before installation, you should review the source code and MIT license yourself to ensure the providers and data boundaries meet your environment requirements.
  • The Host route includes loopback / same-origin request fencing (to prevent DNS rebinding, CSRF), but it is not a substitute for authentication.

Common Error Codes (Selection)

code Meaning
no-content No user/assistant text on the surface
no-adapter No registered adapter for session routing or default model
timeout No return within 30 s
forbidden Fencing check failed

Conclusion

dsh-session-titler turns “entire session → one title” into an explicit, editable operation that writes upon confirmation, without occupying DSH’s exclusive automatic title provider slot. If you manage profiles in the CLI or desktop version of DSH, follow the commands above to install and click Generate Title in a session to try it out.

  • Catalog Page: https://www.skillhub.cn/plugins/ZilongYang/dsh-session-titler
  • GitHub: https://github.com/ZilongYang/dsh-session-titler
羽毛球分组比赛记分
小程序二维码

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

Xiaoye