# ๐Ÿงฐ dsh-toolkit โ€” DeepSeek Harness Utility Toolkit [็ฎ€ไฝ“ไธญๆ–‡](README.md) | English A collection of **purely incremental** native plugins for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): **sticky notes**, **API balance & per-turn cost**, **reasoning levels**, **session deletion**, **conversation node navigation**, and a **soft-UI skin**. All six plugins follow the same principle: **no modification of Harness core** โ€” everything is injected through official slots and dedicated API routes (`dsh-session-nav` is a pure client plugin that only reads official DOM contracts and has no host route), and uninstalling fully restores the original state. Every plugin follows the official plugin rules: bundle manifests (`dsh.bundle.patch`) + client declarations (`dsh.client`), the official Cordis plugin form (`name/inject/apply` + `ctx.effect` lifecycle), the official client-module form (`__ModuleLoader__` + `exports.inject/apply`) and official slots; all host-side tunables are exposed through Schemastery `Config` schemas (profile `cordis.yml`), see each plugin README's "Configuration (Config)" section. ## Plugin overview | Plugin | What it does | Where it lives | | --- | --- | --- | | :memo: **dsh-note** | Native sticky notes: create / history / draggable window / double-click history entries to edit with autosave | Input toolbar (right of the Full access selector) | | :moneybag: **dsh-api-balance** | API balance + per-turn cost + today's usage (ยฅ / tokens, peak-off-peak pricing, per-vendor stats) | Session header actions + each assistant reply | | :brain: **dsh-reasoning-levels** | Five-tier reasoning effort (low / medium / high / xhigh / max) for third-party models | Official model selector | | :wastebasket: **dsh-session-delete** | "Delete session" action that cleans up session data thoroughly | Session list โ‹ฎ menu | | :dna: **dsh-session-nav** | Conversation node navigation: one bar per user turn โ€” hover preview / click to jump & pin to top / double-click to pin | Right edge between text column and scrollbar (always resident) | | :art: **dsh-softui-skin** | Neumorphism soft-UI skin: one native toggle; light/dark follows the native appearance; state persists across refresh/restart ([derived from Lhy723/dsh-neu-theme](https://github.com/Lhy723/dsh-neu-theme)) | Settings โ†’ General โ†’ Appearance | ### :memo: dsh-note โ€” Native sticky notes - A small round button in the input toolbar, styled like the surrounding icons (28ร—28, follows the theme) - Opens as a **new note**; clicking **Save** archives it into history (max 30 entries); unsaved content is kept as an auto-saved **draft** when the popup closes - The **history window** is an independent popup: freely draggable and resizable, and it **remembers the last position and size**; expanding an entry reveals a **Copy** button; entries can be deleted individually - **Double-click an expanded entry to edit it inline**: autosaves ~0.6 s after you stop typing (shows "ๅทฒ่‡ชๅŠจไฟๅญ˜"); the entry keeps its position and no keystrokes are lost; press ESC to finish editing - Text limit 16,000 chars; data persists to `$DSH_HOME/storages/dsh-note.json` (atomic writes, serialized) ### :moneybag: dsh-api-balance โ€” API balance & cost - **Balance badge** in the session header: shows the balance of the current model's vendor โ€” the official DeepSeek balance endpoint (labeled **้ซ˜ๅณฐ / ้—ฒๆ—ถ** peak/off-peak by Beijing time, aligned with the official windows: Monโ€“Fri 9:00โ€“12:00 / 14:00โ€“18:00 peak, weekends off-peak all day), a third-party balance endpoint, or local accounting (total โˆ’ spent) - **Vendor manager** (double-click the badge): add / edit / delete vendors, each holding multiple models sharing one balance pool; per-model rates for input / output / cache-read / cache-write (CNY per million tokens) - **Per-turn cost**: each finished assistant reply shows `ๆœฌ่ฝฎ ยฅx.xxxx`, priced with official peak/off-peak rates or custom rates; hover shows **cache hit rate** and consumed tokens (K/M tok) - **Today's usage**: hovering the badge shows today's (Beijing time) consumption of the **current vendor** โ€” official DeepSeek routes and their derived channels (e.g. vision-toolkit) are merged into one vendor, matching the DeepSeek usage page; third-party vendors are tracked separately and switch along with the badge - **Switch-aware**: switching sessions or switching to another vendor's model updates the badge immediately; switching models within the same vendor keeps it unchanged - The API key is reused from Harness' credential service (`DEEPSEEK_API_KEY` in `~/.dsh/.credentials.yaml`); the **key never reaches the browser** ### :brain: dsh-reasoning-levels โ€” Third-party reasoning levels - Offers five tiers โ€” **low / medium / high / xhigh / max** โ€” for third-party (pi-ai) models in the **official model selector**; models with tier support default to **Max** (highlighted on selection; requests go out as Max unless changed) - On boot, automatically declares the five tiers for undeclared third-party models (idempotent); supported and unsupported models can **mix inside one vendor** โ€” `reasoningEfforts: false` models show no tier UI, send no effort parameter, and keep the vendor default - Official models keep their official three tiers (low / high / max) and are never touched - Ships host-side helpers: `getSessionModel` / `setReasoning` / `setModel` / `levels` (model selection, tier diagnostics and switching) ### :wastebasket: dsh-session-delete โ€” Delete sessions - Adds **Delete session** to the session list โ‹ฎ menu, removing the session **thoroughly**: JSONL session log, workspace registration and archive collection - **Only cold sessions are deleted**: running sessions are refused (stop/close first) to avoid races with the persistence write path - Strict session-ID validation; on-disk paths use the exact same encoding as the core backend, deletion targets are verified inside the storage root (including symlink protection); a missing storage root refuses deletion instead of silently succeeding - Duplicate titles refuse to guess (no wrong-session deletion); a confirm dialog shows the session ID ### :dna: dsh-session-nav โ€” Conversation node navigation - An always-resident bar at the **right edge, between the text column and the scrollbar**: **one pill per user turn** (9ร—3 fully-rounded capsule, white in dark mode / black in light mode, theme-aware), **max 6 visible at once** โ€” wheel over the bar scrolls the rest like a bicycle chain - **Hover**: pill smoothly lengthens + preview card with the round's **full content** (internally scrollable); **single click**: smooth jump to that round + the **top box** shows its full content; **double click**: **pin / unpin** (highlight only, no dot, **unlimited pins**, persisted in localStorage); the active pill (DeepSeek blue) follows your reading position and auto-scrolls into view - **Follows the current session**: switching sessions shows that session's turn count immediately; uncompressed content shows right away, compacted history **preloads slowly in the background** (one page per 2.8 s, only when idle, never queued); clicking an unloaded round page-loads it on demand - **Top box**: frosted transparent glass (`blur(24px)` + 40% theme background), width = text column **+ 2.5 cm on each side**, height grows with content (up to 70vh), keeps its frost while scrolling - Pure client plugin: only reads official DOM contracts (`data-chat-flow` / `data-conversation-scroll` etc.) + the `sessions` service โ€” **no host API route, no core state touched**, uninstall fully restores ### :art: dsh-softui-skin โ€” Neumorphism soft-UI skin > **Derived from [Lhy723/dsh-neu-theme](https://github.com/Lhy723/dsh-neu-theme) (MIT)**: the skin styles and palettes follow the original project; this plugin turns its three-way selector into a **system-native toggle** and adds robustness fixes. - A **system-native toggle** in **Settings โ†’ General โ†’ Appearance** (right below the built-in Appearance row), styled with the harness's own design tokens (`role="switch"`, theme-aware in both schemes) - **ON**: applies the skin โ€” **light (cream) / dark (ink-blue) follows the native appearance** โ€” native dark gives the dark skin; when the native preference is "system", the skin follows OS light/dark switches automatically - **OFF**: the page is exactly as the harness ships it โ€” no injected styles, no body marker, no leftover token overrides - **Persists**: the toggle lives in localStorage (`dsh-softui:enabled`, legacy key auto-migrated and cleaned up); refresh / close / restart never revert to the native look while the toggle is on - **No core changes**: colors stack as a token override layer via the built-in ThemeRuntime `overrideTokens()` (never writes the `ui-theme` preference or `settings.yaml`); shadow/frost/grain styles are plugin-owned `