Introduction¶
When handling long sessions in DSH, topics from more than 15 rounds ago are often completely unrelated to the current conversation, and finding old topics requires scrolling all the way back up. This plugin enables the large language model to continuously organize the session into multiple topics (grouped by purpose/workline) in the background, and provides two types of navigation entries.
Plugin Overview¶
dsh-session-topics is a DSH plugin provided by maintainer weseeon. It generates a navigable topic directory for each session, with two entry points—a right-side rail and a sidebar panel—allowing users to quickly jump to specific topics, return to the latest conversation, continue discussing old topics, and search for topics across sessions.
Core Features¶
Automatic Incremental Summarization¶
At the end of each conversation round, the plugin incrementally updates topics in the background without rerunning a full pass or interrupting the current conversation. Topic data is stored in DSH’s local storageDomain (domain session_topics), and nothing is uploaded to any server. Only the “organize topics” step sends session excerpts to the configured LLM provider: user messages are sent in full, assistant messages are truncated to assistantExcerptChars (default 500), and tool calls include only the tool name.
Topic Navigation & Continued Discussion¶
The plugin calls the host’s session.loadThrough(seq) to lazily fetch the target page on demand, eliminating the need to manually click “Load Earlier.” Clicking a topic jumps to the conversation at the start of that topic. A “Back to Latest” button scrolls to the bottom in one click. The “Continue Discussion” feature injects the topic summary into the input box (conversation.input.shell().setDraft), eliminating the need for manual typing.
Dual-Mode Search¶
Instant keyword matching (local scoring) + “Semantic Search” via LLM re-ranking, both supporting cross-session retrieval. Semantic search consumes one LLM call and can be slow when there are too many candidate topics.
Right-Side Rail¶
A persistent 40px-wide rail on the right side of the session, where each 2px cell represents one topic. Hovering expands it into a 320px capsule, displaying “Date Time · Topic Name · Tick” line by line. Clicking a row jumps to the conversation at the start of that topic. The bottom row reads “Back to Latest,” and the tick for the current topic is thicker and longer. The capsule only shows one screen’s worth of rows; scroll to see more.
Sidebar Panel¶
The topic list is ordered by time in descending order, with each row showing the title, round range, and relative time. Clicking a topic → jumps to the start of that conversation segment. The bottom “↓ Back to Latest” → scrolls to the bottom. Hovering over a topic row reveals “Continue Discussion” → the summary fills into the input box. The top search box defaults to the current session scope with instant keyword matching; toggle to global cross-session search; when keywords don’t match, click “Semantic Search” to let the LLM find related topics.
Configuration & Status¶
Two independent toggles: “Show Topic Rail” and “Show Sidebar Topic Panel” each control one entry point, switchable in DSH native Settings → “Session Topics.” Disabling the rail restores the DSH native rail. In settings, you can select the provider/model for summarization, independent of the main conversation model. A spinner shows during organization, a green ✓ on completion, a red dot on failure; topic rows display relative time, and recently updated topics are highlighted.
Multi-Session Initialization¶
On first installation, the plugin automatically organizes the most recent 10 sessions, with pause/resume controls on the panel.
Installation¶
Method 1: Install from Market Index¶
- Open the Web sidebar → Plugins → Enable custom plugin index under Experimental Plugins
- Switch to the Discover tab and add the index source:
https://raw.githubusercontent.com/weseeon/dsh-session-topics/main/market-index.json
- Search for
Session Topicsorsession-topics, then click Install
Method 2: Direct Install¶
# In the DSH profile directory
pnpm add github:weseeon/dsh-session-topics
Then restart DSH (or reload plugins).
Dependencies & Runtime Modes¶
| Mode | Condition | Behavior |
|---|---|---|
| Sidebar page (recommended) | dsh-better-sidebar installed |
Topic panel appears as a tab within that sidebar |
| Standalone | better-sidebar not installed | A floating button “Open Topic Panel” appears at the bottom-right of the session page; clicking opens a drawer panel |
dsh-better-sidebar is an optional peer dependency: if installed, it uses that container; if not installed, the plugin works independently.
Usage¶
Rail (Persistent Right Side)¶
A 40px-wide rail sits along the right edge of the session, where each 2px cell represents one topic.
- Hover to expand into a 320px capsule, displaying “Date Time · Topic Name · Tick” line by line
- Click a row to jump to the start of that topic’s conversation
- “Back to Latest” at the bottom scrolls to the end of the session
- The current topic’s tick is thicker and longer; the capsule shows one screen’s worth of rows—scroll to see more
Sidebar Panel¶
- Open a session and click the “Topics” button below the input box (or the right sidebar tab)
- The topic list is ordered by time descending; each row shows the title, round range, and relative time
- Click a topic → jumps to the start of that conversation segment
- “↓ Back to Latest” at the bottom → scrolls to the bottom
- Hover over a topic row to reveal “Continue Discussion” → the summary fills into the input box
- Top search box:
- Defaults to current session scope with instant keyword matching
- Toggle to global cross-session search
- When keywords don’t match, click Semantic Search to let the LLM find related topics - Top “Organize” → immediate incremental organization; “Re-summarize” → discard and rebuild (with confirmation)
Configuration¶
DSH Native Settings (Recommended)¶
Settings → Session Topics:
| Item | Description |
|---|---|
| Show Topic Rail | Replaces the native rail on the right side of the DSH session; restoring it when disabled |
| Show Sidebar Topic Panel | “Topics” button below the input box + Better Sidebar tab; both collapse when disabled |
| Summarization Model | Provider / model used for summarization |
| Max Topic Count | Maximum number of topics retained per session |
| Initial Backfill Rounds | Number of historical rounds to organize backward when loading a new session |
cordis.patch.yml¶
| Field | Default | Description |
|---|---|---|
| enableRail | true | Show the right-side topic rail (overrides the native rail) |
| enableSidebar | true | Show the “Topics” button in the input area and the sidebar tab |
| summarizer.provider | deepseek-official | Provider for summarization |
| summarizer.model | deepseek-flash | Model for summarization |
| autoUpdate | true | Automatic incremental summarization after each round |
| maxTopics | 20 | Maximum number of topics per session |
| assistantExcerptChars | 500 | Truncation length for assistant messages (controls token usage) |
| language | auto | Topic language: auto / zh / en |
| initBackfillCount | 10 | Number of sessions to backfill on first install |
| searchResultLimit | 50 | Maximum search results returned |
| semanticCandidateLimit | 100 | Number of candidate topics for semantic search |
Compatibility¶
- DSH >= 0.2.1-rc.3
- Node ^22.19.0 || >= 24.0.0
- Tested: DSH Desktop (macOS)
Known Limitations¶
- Hot-reload causes a brief white screen: This plugin injects third-party Client services such as
betterSidebar. Whenremove_bundle/set_plugintriggers a hot reload, the old tab component is not cleanly destroyed, which may cause a one-time white screen. Restarting DSH restores it with no persistent damage. It is recommended to restart directly when modifying this plugin. - Topic navigation relies on the host’s
loadThrough(seq); for extremely long sessions (>10,000 events), the initial jump may be slightly slower. - LLM output occasionally produces invalid JSON; built-in balanced-bracket extraction + repair + one retry are in place; if it still fails, that round is skipped and caught up on the next pass.
- Semantic search consumes one LLM call and can be slow with too many candidate topics.
Use Cases¶
Ideal for DSH users who need to frequently review long session history, search for topics across sessions, or quickly resume old discussions. The plugin runs with the current DSH process permissions; please review the source code and license before installation.
Summary¶
The Session Topics plugin continuously organizes sessions via LLM and provides two navigation modes—the right-side rail and the sidebar panel—supporting topic jumps, back-to-latest, continued discussion, and cross-session search. Data is stored locally and never uploaded to any server, ensuring privacy. It is well suited for long-session scenarios, helping users quickly locate and resume old topics.
References¶
- GitHub: https://github.com/weseeon/dsh-session-topics
- Directory page: https://www.skillhub.cn/plugins/weseeon/dsh-session-topics