dsh-context 0.54.4 → 0.56.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -3
- package/icon.svg +12 -0
- package/lib/client.js +686 -468
- package/lib/index.d.ts +115 -81
- package/lib/index.js +280 -192
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +33 -15
package/README.md
CHANGED
|
@@ -16,6 +16,14 @@
|
|
|
16
16
|
|
|
17
17
|
## Install / Update
|
|
18
18
|
|
|
19
|
+
### Install on DeekSeek Harness web or desktop
|
|
20
|
+
|
|
21
|
+
Fill `dsh-context` in the **Add plugin** wizard's search box, and click **Install**:
|
|
22
|
+
|
|
23
|
+

|
|
24
|
+
|
|
25
|
+
### Install with `dsh` cli
|
|
26
|
+
|
|
19
27
|
Install [`dsh-context`](https://www.npmjs.com/package/dsh-context) plugin from [DeepSeek Harness](https://www.npmjs.com/package/@deepseek-ai/dsh):
|
|
20
28
|
|
|
21
29
|
```sh
|
|
@@ -39,7 +47,7 @@ Four surfaces, one story — what your agent is carrying, how it got there, and
|
|
|
39
47
|
| **Context Dashboard** | Every session at a glance: usage, cost, cache hit, daily activity, and per-session context profiles — filtered by range, day, group, or search, one click to jump in. |
|
|
40
48
|
| **Context tab** | The full dashboard: stats, composition, per-request trend, events, file activity, and the agent network — in every session. |
|
|
41
49
|
| **`/context` command** | A centered modal with the same composition and context browser, without leaving the chat. |
|
|
42
|
-
| **
|
|
50
|
+
| **Preferences card** | Per-user defaults: view placement, trend granularity & mode, File Activity sort, and more. |
|
|
43
51
|
|
|
44
52
|
## 🗂️ The Context Dashboard
|
|
45
53
|
|
|
@@ -51,6 +59,7 @@ Click **Context Dashboard / 上下文仪表盘** at the bottom-left of the sideb
|
|
|
51
59
|
| --- | --- |
|
|
52
60
|
| **KPI band** | How much am I using — sessions, billed tokens, estimated cost, and cache-hit rate over the picked range (7d / 30d / all). |
|
|
53
61
|
| **Activity heatmap** | When do I actually work — the last 8 weeks of daily billed tokens; click a day to filter the sessions that were active on it. |
|
|
62
|
+
| **Settings entry** | One row under the heatmap — the same guarded jump to this plugin's preferences as the Context tab's Plugin Info card. |
|
|
54
63
|
| **Context Composition** | Where the context windows went, summed over the range's sessions. |
|
|
55
64
|
| **Session cards** | Each session's profile: composition ring, billed tokens, turns, cost, and its workspace-group / project breadcrumb — sorted by recency, tokens, or context size, searchable, grouped by workspace. A card click opens the session. |
|
|
56
65
|
|
|
@@ -160,14 +169,19 @@ A centered dialog opens with the **Current Composition** card and the **Context
|
|
|
160
169
|
|
|
161
170
|
## ⚙️ Settings
|
|
162
171
|
|
|
163
|
-
|
|
172
|
+
The **Context** preferences card holds this plugin's per-user settings — default placement, trend granularity (Step/Turn), trend mode (Total/Delta), tool and File Activity sort, and the sidebar insights entry. Where it lives depends on your dsh release:
|
|
173
|
+
|
|
174
|
+
- **dsh 0.1.7+** — the sidebar **Plugins** entry → the **dsh-context** bundle's page → its **Configuration** section (the card is served by the entry's live Config form).
|
|
175
|
+
- **older releases** — **Settings → Plugins → Plugin configuration** → the **Context** card.
|
|
176
|
+
|
|
177
|
+
In-chart and in-card toggles stay per-view and never overwrite the stored preference.
|
|
164
178
|
|
|
165
179
|

|
|
166
180
|
|
|
167
181
|
## Good to know
|
|
168
182
|
|
|
169
183
|
- **Estimates vs actuals** — category figures use dsh's own fixed-density heuristic (the same one as its built-in token meter); the pinned trend details show provider-reported actuals next to them, and the Token card pairs its ≈-estimated composition shares with the provider-exact billed total.
|
|
170
|
-
- **Compatibility** — works on `@deepseek-ai/dsh` **0.1.
|
|
184
|
+
- **Compatibility** — works on `@deepseek-ai/dsh` **0.1.5-rc.1+** (the `0.1.5` line from rc.1, the `0.1.7` line from rc.2), across the V3 (`0.1.5-alpha.x+`) and V4 (`0.1.6/0.1.7+`) session-log generations, from one shape-driven code path. The per-release matrix and how it is verified: [docs/compatibility.md](docs/compatibility.md).
|
|
171
185
|
- **I18n** — UI in English and 简体中文.
|
|
172
186
|
|
|
173
187
|
## Like it?
|
package/icon.svg
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
|
|
2
|
+
<path d="M899.984 19.873h-3.452c-26.123 0-47.296 21.172-47.296 47.296v888.508c0 26.127 21.173 47.298 47.296 47.298h3.452c26.119 0 47.297-21.171 47.297-47.298V67.169c0-26.124-21.177-47.296-47.297-47.296z" fill="#4A5699"/>
|
|
3
|
+
<path d="M132.643 19.873h-3.449c-26.12 0-47.296 21.172-47.296 47.296v888.508c0 26.127 21.177 47.298 47.296 47.298h3.449c26.123 0 47.299-21.171 47.299-47.298V67.169c0-26.124-21.176-47.296-47.299-47.296z" fill="#C45FA0"/>
|
|
4
|
+
<path d="M899.463 19.873H129.194c-26.12 0-47.296 21.172-47.296 47.296v3.377c0 26.12 21.177 47.299 47.296 47.299h770.269c26.123 0 47.296-21.179 47.296-47.299v-3.377c0-26.124-21.173-47.296-47.296-47.296z" fill="#6277BA"/>
|
|
5
|
+
<path d="M899.463 905.006H129.194c-26.12 0-47.296 21.17-47.296 47.29v3.381c0 26.127 21.177 47.298 47.296 47.298h770.269c26.123 0 47.296-21.171 47.296-47.298v-3.381c0-26.12-21.173-47.29-47.296-47.29z" fill="#C45FA0"/>
|
|
6
|
+
<path d="M717.962 543.153H542.047c-26.121 0-47.298 21.175-47.298 47.297v3.724c0 26.123 21.177 47.293 47.298 47.293h175.915c26.121 0 47.297-21.17 47.297-47.293v-3.724c0-26.122-21.176-47.297-47.297-47.297z" fill="#E5594F"/>
|
|
7
|
+
<path d="M689.268 198.849H513.355c-26.122 0-47.298 21.175-47.298 47.297v3.722c0 26.12 21.176 47.297 47.298 47.297h175.912c26.122 0 47.298-21.177 47.298-47.297v-3.722c0-26.122-21.175-47.297-47.297-47.297z" fill="#F0D043"/>
|
|
8
|
+
<path d="M757.789 353.081H261.17c-26.121 0-47.297 21.172-47.297 47.296v3.377c0 26.121 21.177 47.299 47.297 47.299h496.619c26.121 0 47.296-21.178 47.296-47.299v-3.377c0-26.125-21.175-47.296-47.296-47.296z" fill="#E5594F"/>
|
|
9
|
+
<path d="M762.638 726.225h-496.62c-26.12 0-47.294 21.18-47.294 47.301v3.377c0 26.12 21.174 47.3 47.294 47.3h496.62c26.122 0 47.296-21.18 47.296-47.3v-3.377c0-26.122-21.174-47.301-47.296-47.301z" fill="#6277BA"/>
|
|
10
|
+
<path d="M355.734 543.328H281.41c-26.122 0-47.297 21.17-47.297 47.293v3.378c0 26.118 21.175 47.297 47.297 47.297h74.324c26.123 0 47.296-21.179 47.296-47.297v-3.378c0-26.123-21.174-47.293-47.296-47.293z" fill="#F39A2B"/>
|
|
11
|
+
<path d="M334.85 248.006m-48.986 0a48.986 48.986 0 1 0 97.972 0 48.986 48.986 0 1 0-97.972 0Z" fill="#F39A2B"/>
|
|
12
|
+
</svg>
|