Preface¶
The DSH Community Directory is an independent site with no official affiliation to DeepSeek / Huanfang. Under DSH’s philosophy of “Everything is a Plugin,” many developers add lightweight tools around their own session workflows.
A common problem in long sessions is the presence of a large amount of debugging, errors, repeated modifications, and terminal output, while only the conclusions, decisions, to-do items, and file outputs need to be retained in the end. dsh-sessiongraph is a DSH web plugin maintained by lwklbb that reads the current session and organizes the content into an editable, copyable structured outline and mind map.
Below is an introduction to its features, installation methods, typical usage, and extraction rules.
What is this¶
dsh-sessiongraph is a small plugin for DSH designed to organize the current session into an editable, copyable structured outline and mind map.
Its features are:
- Adds a button entry only on the current DSH session page.
- Does not take over the original input box.
- Does not modify the session persistence file.
- Only reads the session snapshot already existing on the current page.
- The actual functionality is completed on the browser side.
MITlicense, maintained bylwklbb.
The package name in package.json is dsh-sessiongraph, and the repository address is https://github.com/lwklbb/DSH-SessionGraph.
Core Features¶
The plugin adds a SessionGraph ▾ button above and to the right of the session input box.
Upon clicking, it reads the current session content and extracts the following information:
- Session Goal
- Final Conclusion
- Key Points
- Decisions and Trade-offs
- To-do / Next Steps
- Files / Outputs
At the same time, it filters out content that is obviously not needed for the mind map, such as:
stack trace- Terminal logs
stdout,stderr,exit codenpm err,pnpm errwarning,debug,verboselogs- Repeated trial and error processes
- Large blocks of terminal command output
The organized results can be further edited in the popup, supporting manual modification of nodes, adding child nodes, deleting unwanted nodes, and one-click copy export of the results.
Three Mind Map Modes¶
The plugin supports three modes:
| Mode | Content | Suitable Scenarios |
|---|---|---|
| Default Mind Map | Session goal, final conclusion, key points, decisions and trade-offs, to-do, files / outputs | Organizing a session in daily life |
| Concise Mind Map | Only keeps final conclusion and to-do | Quick review, handover, or a quick look before writing a commit |
| Detailed Mind Map | Default Mind Map + compressed timeline | Used when the session is long and you want to look back at the process |
Export Formats¶
Currently supported formats:
MarkdownoutlineMermaidmindmapPlantUMLmindmapXMindindentation text- TODO list brief
These formats are suitable for copying and further editing, such as pasting into documentation, code repository descriptions, review records, or mind mapping tools.
Installation and Enablement¶
Plugin requirements:
engines.node: >=20dsh.client.platform: web
Execute in the plugin directory:
dsh plugin --profile web add .
This command adds the current directory as a plugin to DSH’s web profile.
After installation, restart or refresh DSH, open a session with existing content, and you will see the SessionGraph ▾ button above and to the right of the input box.
If you just want to confirm the installation entry, it is not recommended to directly concatenate the remote installation command based on the repository name; the local installation method verified in the provided materials is the dsh plugin --profile web add . above.
Typical Usage¶
The following is a set of common workflows:
- Open an existing DSH session with some content.
- Click the
SessionGraph ▾button above and to the right of the input box. - Select Default Mind Map, Concise Mind Map, or Detailed Mind Map.
- Check the generated nodes in the popup.
- Manually delete irrelevant nodes or supplement missing conclusions or to-dos.
- Click one-click copy to export Markdown, Mermaid, PlantUML, XMind indentation text, or TODO list brief.
This workflow is suitable for:
- A quick review after a development session ends.
- Compressing a long conversation into a transferable list of key points.
- Quickly reviewing conclusions before writing a
commit messageor task record. - Organizing file outputs from the session into a list.
Extraction Rules¶
The main parsing logic is in lib/extractor.js. The current implementation uses local rules and does not rely on additional models.
The general process is as follows:
- Read user and assistant messages from the current
ConversationSnapshot. - Skip
reasoning/thinkingcontent by default. - Clean each line and filter obvious noise.
- Prioritize keeping conclusions from the last few assistant replies.
- Identify some conclusion-related keywords.
- Capture suspected file paths from the text and put them into the “Files / Outputs” node.
It identifies these keywords:
结论(Conclusion)总结(Summary)完成(Complete)结果(Result)决定(Decision)待办(To-do)下一步(Next step)TODODecisionSummary
File paths will be placed in the “Files / Outputs” node for easier organization later.
It is worth noting that this set of rules does not record all processes completely, but is designed to quickly obtain usable information that can still be used now.
Project Structure¶
The repository structure is roughly as follows:
DSH-SessionGraph/
├─ cordis.patch.yml
├─ lib/
│ ├─ index.js # host side entry, currently kept as no-op
│ ├─ client.js # browser UI and slot registration
│ └─ extractor.js # session parsing, mind map generation, format export
├─ test/
│ └─ extractor.test.mjs
├─ docs/
│ └─ sessiongraph-showcase.png
├─ package.json
├─ LICENSE
└─ README.md
Where:
lib/index.jsis the host side entry point, currently kept as no-op.lib/client.jsis responsible for browser-side UI and slot registration.lib/extractor.jsis responsible for session parsing, mind map generation, and format export.
Core functions include:
extractMessages(snapshot): Extracts usable messages from the session snapshot.summarizeSession(snapshot, mode): Generates a mind map tree according to the mode.exportGraph(tree, format): Exports the mind map tree toMarkdown,Mermaid,PlantUML,XMind, orTODObrief.
Suitable Scenarios and Precautions¶
Suitable for the following scenarios:
- DSH sessions are relatively long, and you want to quickly extract conclusions.
- Need to organize a list of key points after development, debugging, or troubleshooting.
- Need to copy to-do items and file outputs from the session separately.
- Want to convert a single session into an editable
Markdown,Mermaid,PlantUML, orXMindoutline.
Pre-use precautions:
- It only reads the session snapshot already existing on the current page and does not modify the session persistence file.
- It actively filters some process noise, so the result is not a complete chat history.
- It runs with the permissions currently possessed by the DSH process; you should check the source code, dependencies, and license before installation.
- The current implementation targets the web side, and dependencies are declared in
package.json.
Project addresses:
- GitHub:
https://github.com/lwklbb/DSH-SessionGraph - License:
MIT © 2026 lwklbb