dsh-context 0.56.0 → 0.56.2
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/lib/client.js +35 -28
- package/package.json +1 -1
package/lib/client.js
CHANGED
|
@@ -1751,6 +1751,31 @@ window.__ModuleLoader__.load({
|
|
|
1751
1751
|
}
|
|
1752
1752
|
};
|
|
1753
1753
|
}
|
|
1754
|
+
/**
|
|
1755
|
+
* Jump to one session — the harness's own session-selection verb (issue #90).
|
|
1756
|
+
* Every supported line selects through the view owner (`uiWorkspace`
|
|
1757
|
+
* .openSession, the sidebar row click's own verb); the sessions service's own
|
|
1758
|
+
* `open` is the retired spelling (still served through the 0.1.5 line, gone
|
|
1759
|
+
* since the 0.1.6 selection refactor) and stays as the degradation path for a
|
|
1760
|
+
* composition without the workspace module. Both faces are re-proved per call
|
|
1761
|
+
* (a service can land or be revoked across an HMR reload) and the verb is
|
|
1762
|
+
* invoked bound (the service instance reads its own state); a generation
|
|
1763
|
+
* serving neither, or a hostile face, swallows — the jump is best-effort by
|
|
1764
|
+
* nature.
|
|
1765
|
+
*/
|
|
1766
|
+
function openSessionVia(ctx, id) {
|
|
1767
|
+
try {
|
|
1768
|
+
const workspace = asRecord(ctx.get("uiWorkspace"));
|
|
1769
|
+
const open = workspace?.openSession;
|
|
1770
|
+
if (typeof open === "function") {
|
|
1771
|
+
open.call(workspace, id);
|
|
1772
|
+
return;
|
|
1773
|
+
}
|
|
1774
|
+
const sessions = asRecord(ctx.get("sessions"));
|
|
1775
|
+
const legacy = sessions?.open;
|
|
1776
|
+
if (typeof legacy === "function") legacy.call(sessions, id);
|
|
1777
|
+
} catch {}
|
|
1778
|
+
}
|
|
1754
1779
|
//#endregion
|
|
1755
1780
|
//#region src/client/historyPage.ts
|
|
1756
1781
|
/**
|
|
@@ -6248,18 +6273,6 @@ window.__ModuleLoader__.load({
|
|
|
6248
6273
|
return days;
|
|
6249
6274
|
}
|
|
6250
6275
|
/**
|
|
6251
|
-
* Jump to one session: the harness's own selection verb (`sessions.open`,
|
|
6252
|
-
* the sidebar row click's mechanism). The face is re-proved per call and a
|
|
6253
|
-
* hostile or absent service swallows silently — the panel still closes, so
|
|
6254
|
-
* the gesture never dead-ends on an error.
|
|
6255
|
-
*/
|
|
6256
|
-
function openSession(ctx, id) {
|
|
6257
|
-
try {
|
|
6258
|
-
const sessions = ctx.get("sessions");
|
|
6259
|
-
if (sessions !== void 0 && typeof sessions.open === "function") sessions.open(id);
|
|
6260
|
-
} catch {}
|
|
6261
|
-
}
|
|
6262
|
-
/**
|
|
6263
6276
|
* Re-pull the session-list baseline so host-side projection backfills
|
|
6264
6277
|
* (host/backfill.ts) reach a long-connected browser. Fire-and-forget: the
|
|
6265
6278
|
* verb is re-proved and every failure swallows — the panel renders off the
|
|
@@ -7074,7 +7087,7 @@ window.__ModuleLoader__.load({
|
|
|
7074
7087
|
* column (search, group chips, and the card grid); the heatmap keeps its own
|
|
7075
7088
|
* fixed 8-week window and PINs the list to a picked day (the panel's
|
|
7076
7089
|
* drill-down gesture). A session card click jumps to that session through
|
|
7077
|
-
* the harness's own
|
|
7090
|
+
* the harness's own selection verb (openSessionVia) and closes the panel.
|
|
7078
7091
|
*/
|
|
7079
7092
|
const RANGES = [
|
|
7080
7093
|
"24h",
|
|
@@ -7157,7 +7170,7 @@ window.__ModuleLoader__.load({
|
|
|
7157
7170
|
const kpi = kpisOf(ranged, allRows.length, prices, currency);
|
|
7158
7171
|
const days = aggregateDays(allRows);
|
|
7159
7172
|
const openOne = (id) => {
|
|
7160
|
-
|
|
7173
|
+
openSessionVia(ctx, id);
|
|
7161
7174
|
overviewStore.set(false);
|
|
7162
7175
|
};
|
|
7163
7176
|
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
@@ -9077,13 +9090,6 @@ window.__ModuleLoader__.load({
|
|
|
9077
9090
|
});
|
|
9078
9091
|
return segs;
|
|
9079
9092
|
}
|
|
9080
|
-
/** Session-switch navigation, fail-soft: a stale row (list rebuilt between snapshot and click) loses its open() race and is ignored. */
|
|
9081
|
-
function openAgentSession(face, id) {
|
|
9082
|
-
if (face === null || typeof face.open !== "function") return;
|
|
9083
|
-
try {
|
|
9084
|
-
face.open(id);
|
|
9085
|
-
} catch {}
|
|
9086
|
-
}
|
|
9087
9093
|
/** Narrow `ctx.get('sessions')` to the card's face (null = harness without the outward sessions service). */
|
|
9088
9094
|
function sessionsFaceOf(ctx) {
|
|
9089
9095
|
const rec = asRecord(ctx.get("sessions"));
|
|
@@ -9207,7 +9213,7 @@ window.__ModuleLoader__.load({
|
|
|
9207
9213
|
for (const n of forest.nodes) totalTokens += n.head !== null ? n.head.tokens : 0;
|
|
9208
9214
|
const open = (id) => {
|
|
9209
9215
|
if (id === current.id) return;
|
|
9210
|
-
|
|
9216
|
+
openSessionVia(ctx, id);
|
|
9211
9217
|
};
|
|
9212
9218
|
const keyOpen = (id) => (ev) => {
|
|
9213
9219
|
if (ev.key !== "Enter" && ev.key !== " ") return;
|
|
@@ -9986,7 +9992,7 @@ window.__ModuleLoader__.load({
|
|
|
9986
9992
|
return function PluginInfo() {
|
|
9987
9993
|
const [latest, setLatest] = (0, react.useState)(null);
|
|
9988
9994
|
(0, react.useEffect)(() => {
|
|
9989
|
-
if ("0.56.
|
|
9995
|
+
if ("0.56.2".includes("-dev")) return;
|
|
9990
9996
|
let on = true;
|
|
9991
9997
|
fetchLatestVersion().then((v) => {
|
|
9992
9998
|
if (on && v) setLatest(v);
|
|
@@ -9995,8 +10001,8 @@ window.__ModuleLoader__.load({
|
|
|
9995
10001
|
on = false;
|
|
9996
10002
|
};
|
|
9997
10003
|
}, []);
|
|
9998
|
-
const update = latest !== null && isNewerVersion(latest, "0.56.
|
|
9999
|
-
const nameText = "dsh-context (v0.56.
|
|
10004
|
+
const update = latest !== null && isNewerVersion(latest, "0.56.2") ? latest : null;
|
|
10005
|
+
const nameText = "dsh-context (v0.56.2)";
|
|
10000
10006
|
const nameValue = [nameText];
|
|
10001
10007
|
if (update) nameValue.push(/* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
|
|
10002
10008
|
className: "lc-pi-update",
|
|
@@ -11127,8 +11133,9 @@ window.__ModuleLoader__.load({
|
|
|
11127
11133
|
* Scroll an element's nearest scrollable ancestor so the element tops that
|
|
11128
11134
|
* scrollport. The jump's landing reveal needs this host-agnostic: the
|
|
11129
11135
|
* conversation tab scrolls the shared `[data-conversation-scroll]` container
|
|
11130
|
-
* while the right Sidebar
|
|
11131
|
-
* no stable attribute
|
|
11136
|
+
* while the right Sidebar's scroller differs per generation (dockkit's pane
|
|
11137
|
+
* body — a CSS-module class with no stable attribute — on the 0.1.5 line, the
|
|
11138
|
+
* tab root itself on the 0.1.7 line), so the walk takes whichever ancestor
|
|
11132
11139
|
* actually scrolls — the rect delta lands the anchor flush regardless of the
|
|
11133
11140
|
* container's current position. `document.body` ends the walk: the page
|
|
11134
11141
|
* itself never scrolls. False — never a throw — when no ancestor scrolls (the
|
|
@@ -11786,7 +11793,7 @@ window.__ModuleLoader__.load({
|
|
|
11786
11793
|
}
|
|
11787
11794
|
//#endregion
|
|
11788
11795
|
//#region \0dsh-global-css:/home/runner/work/dsh-context/dsh-context/src/client/styles/base.css.mjs
|
|
11789
|
-
const css$14 = ".lc-root{box-sizing:border-box;height:100%;color:var(--dsw-alias-label-primary);padding:16px 20px 32px;font-size:13px;overflow-y:auto}[data-sidebar-right-open] .lc-root,[data-sidebar-right-float-host] .lc-root{
|
|
11796
|
+
const css$14 = ".lc-root{box-sizing:border-box;height:100%;color:var(--dsw-alias-label-primary);padding:16px 20px 32px;font-size:13px;overflow-y:auto}[data-sidebar-right-open] .lc-root,[data-sidebar-right-float-host] .lc-root{padding:12px}.lc-title-icon{flex:none}.lc-title-label{padding-right:30px}.lc-card{background:var(--dsw-alias-bg-layer-1);border:1px solid var(--dsw-alias-border-l2);border-radius:10px;margin-bottom:14px;padding:14px 16px}.lc-root .lc-card{box-sizing:border-box;margin-bottom:7px;padding:7px 8px;container:lc-card/inline-size}.lc-root .lc-cols{gap:7px;margin-bottom:7px}.lc-card-title{flex-wrap:wrap;align-items:baseline;gap:8px;margin-bottom:10px;font-weight:600;display:flex}.lc-card-title-text{white-space:nowrap;flex:none}.lc-gran,.lc-kinds{background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l2);border-radius:6px;gap:2px;margin-left:auto;padding:1px;display:flex}.lc-trend-ctl,.lc-heat-ctl{align-items:center;gap:6px;margin-left:auto;display:flex}.lc-trend-ctl .lc-gran,.lc-heat-ctl .lc-gran,.lc-heat-ctl .lc-card-sub{margin-left:0}.lc-trend-adaptive{flex:none;margin-left:0}.lc-gran-btn{color:var(--dsw-alias-label-secondary);cursor:pointer;transition:color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);background:0 0;border:0;border-radius:5px;padding:3px 8px;font-family:inherit;font-size:11px;line-height:1}.lc-gran-btn:hover{color:var(--dsw-alias-label-primary)}.lc-gran-on,.lc-gran-on:hover{background:var(--dsw-alias-button-primary-fill);color:var(--dsw-alias-label-primary-foreground)}.lc-kind-n{font-variant-numeric:tabular-nums;opacity:.65;margin-left:4px}.lc-gran-on .lc-kind-n{opacity:.85}.lc-tip{z-index:6;background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);width:max-content;color:var(--dsw-alias-label-primary);box-shadow:var(--dsw-shadow-lv3,0 2px 8px #0000002e);pointer-events:none;opacity:0;transition:opacity var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:6px;padding:6px 10px;font-size:12px;position:absolute}.lc-events,.lc-fa-list{flex-direction:column;gap:2px;height:320px;display:flex;overflow-y:auto}.lc-cols{flex-wrap:wrap;gap:14px;margin-bottom:14px;display:flex}.lc-cols>.lc-card,.lc-col>.lc-card:last-child{margin-bottom:0}.lc-col-browser{flex-direction:column;display:flex}.lc-col-browser>.lc-card{flex:1}.lc-head>.lc-card:has(.lc-stats){flex-direction:column;display:flex}.lc-head .lc-stats{flex:1;align-content:stretch}.lc-head .lc-stat{justify-content:center}.lc-empty{color:var(--dsw-alias-label-secondary);text-align:center;padding:18px 0}.lc-error{flex-direction:column;align-items:center;gap:8px;padding:40px 16px;display:flex}.lc-error-msg{font-family:var(--ds-font-family-code,ui-monospace, SFMono-Regular, Menlo, monospace);color:var(--dsw-alias-state-error-primary);background:var(--dsw-alias-bg-layer-2);border:1px solid var(--dsw-alias-border-l1);overflow-wrap:anywhere;border-radius:6px;max-width:100%;padding:4px 8px;font-size:12px}.lc-error-retry{border:1px solid var(--dsw-alias-border-l2);background:var(--dsw-alias-bg-layer-2);color:var(--dsw-alias-label-primary);font:inherit;cursor:pointer;transition:border-color var(--ds-transition-duration,.2s) var(--ds-ease-in-out,ease-in-out);border-radius:6px;padding:4px 14px;font-size:12px}.lc-foot{color:var(--dsw-alias-label-secondary);margin-top:4px;font-size:12px}[data-conversation-scroll]:has(.lc-root)>[data-composer-seat]:not(:has([data-approval-key],[data-question-key],[data-plan-review-key])),[data-conversation-scroll]:has(.lc-root,.lc-modal-backdrop)~[data-width-handle]{display:none}";
|
|
11790
11797
|
const tagId$14 = "dsh-context/base.css";
|
|
11791
11798
|
if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId$14) + "]") === null) {
|
|
11792
11799
|
const tag = document.createElement("style");
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-context",
|
|
3
|
-
"version": "0.56.
|
|
3
|
+
"version": "0.56.2",
|
|
4
4
|
"description": "A DeepSeek Harness plugin for context insight and management, with context dashboard and context command, for understanding how the context is made of, and how it evolves.",
|
|
5
5
|
"icon": "icon.svg",
|
|
6
6
|
"author": "bowenliang123",
|