説明
以下はプラグイン作者による原文です。
dsh-temp-note
A local scratchpad and session recap for DeepSeek Harness. Keep the thought, the snippet, or the decision you are about to lose — and turn the current session into a one-page HTML report with the lens you need.
中文说明 · What it's for · Install · Usage · Recap lenses · How it works
What this plugin is for
dsh-temp-note covers the parts of agent work that the composer and the repo cannot hold. It does three jobs:
- Park a thought beside the agent. A private reminder, a hypothesis, a snippet, a decision — written in the right sidebar, never sent as a prompt, never written into the session log. Three lifetimes: this session, this workspace, or everything.
- Find it again. The left-sidebar All notes view lists every note, grouped by session, workspace, and global. Click one and it jumps to the owning session and opens the note there.
- Understand the session at a glance. Recap turns the current session into a designed HTML report. Six lenses fit six moments: Overview, Handoff, Decision, Change, Retrospective, Debug.
The two halves share one tab and one mental model:
- Notes are yours. No folders, tags, titles, or templates; one note per scope, always autosaved, always in your browser.
- Recap is a lens on one session. It is generated on demand, is not stored by the Host, and is not injected into a later session. Pick the lens that matches what you need to do next.
What it is not: a note manager, a synced knowledge base, a work-memory layer, or an automatic transcript summarizer. If you want context to be recalled or injected across sessions automatically, this is deliberately not that.
The problem
DeepSeek Harness is a good place to think with an agent, but it has nowhere to think beside it.
- The composer is a microphone, not a notepad. Typing a private reminder there sends it to the model and writes it into the session log. Some notes are for you, not for the turn.
- Workspace files are for the project, not for you. Dropping a
scratch.mdinto the repo creates diff noise, review comments, and a file that outlives its purpose..gitignoreis a workaround, not a workflow. - A separate notes app breaks the context. Alt-tabbing to Notion, Obsidian, or a sticky-note widget means losing the conversation, the file, and the thread you were holding.
- One bucket never fits. "Remember this for this chat", "this project always does X", and "I paste this snippet everywhere" are three different lifetimes. A single scratchpad degrades into a graveyard.
- The end of a session is a blind spot. A long agent session is hard to hand off, review, or learn from. Scrolling the log is not a summary, and the next session starts by re-explaining what happened.
What it does
dsh-temp-note adds a Temp Note tab to the right sidebar — the same dock as Files, Chat, and Terminal — plus a note button in the session header. The first tab is Recap; the other three are the note scopes.
| One note, three scopes | Session / Workspace / Global. Default: Workspace. Switching scope switches the note. |
| All notes in the left sidebar | The All notes entry lists every session, workspace, and global note. Pick one and it jumps to the owning session and opens Temp Note there. |
| No note management | No "new note" button, no tree, no titles to invent. One note per scope, auto-created, always there. |
| Autosave | Every keystroke is written to local storage. Reload, switch tabs, switch sessions — it is still there. |
| One-click copy | Copies the whole note to the clipboard, ready for a prompt, an issue, or a PR description. |
| One-click polish | Sends the note through your Harness default model and replaces it with a cleaner Markdown version. Undo is one click away. |
| Session recap, six lenses | Generate a designed HTML report for the current session: Overview, Handoff, Decision, Change, Retrospective, or Debug. Pick the lens that matches the moment. |
| Bilingual UI | Switch the plugin's own copy between 中文 and English. It follows the app language until you pick one. |
| Local by default | Notes never enter the session log and are not sent to the agent. Only the explicit Polish action sends note text; only the explicit Generate recap action sends the current session transcript. Both go only to your configured model. |
Scopes
| Scope | Keyed by | Use it for |
|---|---|---|
| Session | current session id | "this conversation only" — a private reminder, a hypothesis, a thing to verify before the turn ends |
| Workspace | current workspace directory | project conventions, decisions, reusable commands — shared by every session in that workspace |
| Global | one note for all workspaces | personal snippets you paste everywhere |
The scope is remembered per session, so a new session starts on Workspace and returns to whatever you picked last time. There is deliberately no "create note" action: each scope always has exactly one note.
When to use which recap lens
Recap is not one generic summary. Each lens answers a different question, so pick by the moment you are in, not by the writing style you like.
| Lens | Use it when | What you get | A typical moment |
|---|---|---|---|
| Overview (default) | A chunk of work is done and you need the shape of it | One-sentence summary, key actions, decisions, open questions, next steps, artifacts | Just finished a task block |
| Handoff | You are switching sessions, agents, people, or stopping for the day | Current state, done, remaining, key files and commands, risks, first step | End of the day or before a handoff |
| Decision | A choice will matter later and you need the why | Question, options, choice, rationale, impact, when to revisit | Architecture, priority, or trade-off decision |
| Change | You are opening a PR, releasing, or asking for review | What changed, why, impact, verification, risks and rollback | Before a commit, PR, or release |
| Retrospective | A milestone or task is done and you want to improve next time | Goal, outcome, went well, went wrong, lessons, next experiment | After a milestone or postmortem |
| Debug | You just fixed a bug and want the postmortem | Symptom, root cause, fix, verification, prevention | After a fix or incident |
A few shortcuts:
- Ending the day or switching tasks → Handoff.
- Opening a PR or releasing → Change.
- A bug is fixed → Debug.
- A milestone is done → Retrospective.
- A choice needs defending later → Decision.
- You only need the shape of the session → Overview.
The report is generated for the current session only. The Host does not store it, and it is not injected into later sessions. Copy HTML gives you a self-contained page to keep or share. Changing the lens or language after generating shows a stale hint; press Refresh to regenerate. Nothing runs until you click Generate recap, and switching a lens never makes a model call by itself.
Install
Requires a DeepSeek Harness 0.2.x build with the Web GUI (built for 0.2.x; originally verified against 0.2.1-rc.2).
Desktop app
Settings → Plugins → Add plugin, paste:
dsh-temp-note
The Desktop app owns its desktop profile; install through its UI rather than the CLI.
dsh web / CLI
sole plugin --profile web add dsh-temp-note
Use the profile you actually run (web, or your own name). To install straight from source instead:
sole plugin --profile web add github:GuihaiHU/dsh-temp-note
# or from a local checkout
git clone https://github.com/GuihaiHU/dsh-temp-note.git
sole plugin --profile web add /absolute/path/to/dsh-temp-note
Published on npm: dsh-temp-note.
After installing or upgrading, restart the DSH Host (or the Desktop app) so the Host routes load, then reload the Web page. The client half can hot-reload, but a newly added Host route cannot.
Usage
Notes
- Open it. Click the note icon in the session header, or press
+in the right sidebar and pick Temp Note in the guide. Like any sidebar tab, it can be docked, split, dragged into a floating panel, or made fullscreen. - Pick a scope. Use the second, third, or fourth tab:
Session · Workspace · Global. The default is Workspace; the hint tells you what the current scope covers. - Write. Autosave runs on every keystroke. The footer shows the character count and the last save time.
- Copy or polish. Copy puts the whole note on the clipboard; Polish rewrites it as cleaner Markdown with your default model, and Undo polish brings the previous text back.
All notes
Pick All notes in the left sidebar. Notes are grouped by session, workspace, and global, newest first, with a one-line preview. Clicking a session note jumps to that session and opens Temp Note there; a workspace note jumps to a session in that workspace; a global note opens in the current session. Notes whose session no longer exists or is archived stay listed and read-only.
Recap
- Open Temp Note and switch to the first tab, Recap.
- Pick a lens in the View selector — Overview is the default.
- Click Generate recap. The current session's model-visible messages are read; a designed HTML report appears in the tab; nothing is sent until you click.
- Use Refresh to regenerate (for example after switching the lens or language), or Copy HTML to keep the self-contained page.
Language
Use 中文 / English in the tab header or on the All notes page. The left-sidebar entry and guide card still follow the app language; the tab chip and header tooltip follow the selected plugin language.
How the model features work
Polish
The plugin's Host half registers one route:
POST /api/dsh-temp-note/optimize
{ "text": "<note>" } -> { "ok": true, "text": "<rewritten note>" }
- It calls
ctx.llm.stream()with the model selected as the default in Settings → Models and a fixed instruction prompt: keep every fact, keep the original language, structure the result as Markdown, return only the note body. - Requests are accepted only from this machine, from the same origin, and — when the Connection service is mounted — from the same authenticated browser/API credential as the rest of the Web GUI.
- The route stores nothing and logs no note text. Notes themselves live in the browser, not in the Host.
- If no default model is configured, the button reports it instead of guessing.
- The route needs the page to be served over HTTP (
dsh webor the Desktop app's Web GUI). Under afile://renderer the polish button reports that the endpoint is unreachable; notes, scopes, autosave, and copy keep working.
Session recap
POST /api/dsh-temp-note/recap
{ "sessionId": "<id>", "lang": "zh" | "en", "framework": "overview" | "handoff" | "decision" | "change" | "retro" | "debug" }
-> { "ok": true, "framework": "overview",
"recap": { "sections": [
{ "id": "summary", "type": "paragraph", "title": "一句话", "text": "…" },
{ "id": "highlights", "type": "list", "title": "关键动作", "items": [] }
] }, "messageCount": 12, "generatedAt": 0 }
frameworkdefaults tooverview; an unknown value returnsbad-framework. Section titles come back localized. See When to use which recap lens for the six structures.- It reads the session's model-visible history —
ctx.sessions.get(sessionId).deriveMessages()when the session is live, otherwise the non-activating session-query read — skips system/developer prompts, keeps the newest messages under a 48k-character cap, and asks the default model for the JSON defined by the selected lens. The output language follows the selected UI language. - The client turns these sections into a self-contained HTML report (no scripts or external resources), applies the current DSH theme tokens, and renders it in a sandboxed iframe. Copy HTML copies that page.
- The route only runs on an explicit click; the Host keeps no transcript and logs no session text. Changing the lens or language after generating only marks the recap stale; the user must press Refresh, so no extra model call is made automatically. A session that is neither live nor readable through the query backend returns
no-session; an empty conversation returnsempty-session. - After upgrading, restart the DSH Host (or the Desktop app) so both routes load, then reload the Web page.
Data and privacy
| What | Where |
|---|---|
| Note content | browser localStorage: dsh.temp-note.v1.global, …workspace.<encoded path>, …session.<session id> |
| Scope preference | dsh.temp-note.v1.scope.<session id> |
| Language preference | browser localStorage: dsh.temp-note.v1.language (zh / en) |
| Recap lens preference | browser localStorage: dsh.temp-note.v1.recap-framework |
| Note text in the session log | never |
| Note text sent anywhere | only on an explicit Polish click, to your configured model provider |
| Session transcript sent anywhere | only on an explicit Generate recap click, to your configured model provider |
| Recap report | generated in the browser; not stored by the Host; Copy HTML to keep or share it |
Clearing the browser's site data clears the notes. Notes are per-browser; they are not synced across devices.
Compatibility
- Built for DSH
0.2.x; originally verified against0.2.1-rc.2on macOS. The recap path uses the 0.2.x session/query APIs. - Uses the right sidebar type registry (
sidebarRightTabs,sidebarRight), theconversation.session.header.utilitiesslot, and — for All notes — the left sidebar'ssidebar.panellistplus the layout's globalmainpanel, so it needs a DSH build that ships both sidebars (0.2.x). - Host half needs
llm,webServer, andsessionsservices; the recap also usessessionQuerywhen a restored session is not live. All are part of the Web profile. - No runtime dependencies, no install scripts, no build step. The browser half is a single hand-written
client.jsloaded through__ModuleLoader__.load.
Development
git clone https://github.com/GuihaiHU/dsh-temp-note.git
cd dsh-temp-note
# syntax checks and tests (19 tests: Host + HTML page builder)
node --check index.js
node --check client.js
node -e "JSON.parse(require('fs').readFileSync('package.json','utf8'))"
npm test
# install this checkout into a profile
sole plugin --profile web add "$PWD"
Repository layout:
index.js Host half: loopback-only /optimize and /recap endpoints
client.js Browser half: sidebar tab, header button, scopes, storage,
All notes page, recap view, HTML report builder
cordis.patch.yml Host plugin row inserted into the profile
test/recap.test.js Host transcript, framework JSON, and endpoint tests
test/recap-page.test.js HTML page builder and escaping tests
locale/en.json Plugin Manager display metadata
locale/zh.json
icon.svg
Host changes need a Host restart; client changes can reload through the client HMR when it is available.
Limitations
- Browser-local storage only; no cross-device sync.
- One note per scope by design.
- The editor is a plain textarea — polished Markdown is not previewed in the tab.
- Polish and recap depend on a configured default model and a reachable HTTP host.
- Recap is scoped to the current session; it is not a cross-session work-memory layer and does not auto-inject context into later sessions.
- Long sessions are capped at 48k characters of transcript for the recap.
- The recap report is a sandboxed iframe with scripts disabled; use Copy HTML to export the self-contained page.
- The recap offers six curated lenses; custom prompts and templates are out of scope.
- The left-sidebar entry and the right-sidebar guide card follow the app language; the tab chip and header tooltip follow the plugin language.
- After upgrading, the Host half must be restarted before the new routes are available.
License
バージョン履歴
- 0.4.02026/11/29 · 46 KB