@lmzhen/dsh-evolution-skill-history 0.14.1 → 0.15.1
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 +2 -2
- package/lib/client.js +486 -293
- package/lib/index.js +24 -8
- package/lib/types/client/Panel.d.ts +13 -19
- package/lib/types/client/api.d.ts +33 -2
- package/lib/types/client/atoms.d.ts +73 -0
- package/lib/types/client/chrome.d.ts +73 -0
- package/lib/types/client/document.d.ts +71 -0
- package/lib/types/client/styles.d.ts +0 -21
- package/lib/types/client/tokens.d.ts +25 -0
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -42,9 +42,9 @@ The row is **inert without a web server** (`ctx.get('webServer')`, not a declare
|
|
|
42
42
|
|
|
43
43
|
While nothing is selected the pane says so — a line pointing at the left column, or the empty listing when no skill has a history yet.
|
|
44
44
|
|
|
45
|
-
**The panel owns no rule and no arithmetic.** The host reports every row with its whole verdict — `undoable` (evolution-core's `entryTarget` classification against the live bytes), `actionKind` (a closed vocabulary key), `age` (a bucket plus a count), `charsDelta`, `summary` — and
|
|
45
|
+
**The panel owns no rule and no arithmetic.** The host reports every row with its whole verdict — `undoable` (evolution-core's `entryTarget` classification against the live bytes), `actionKind` (a closed vocabulary key), `age` (a bucket plus a count), `charsDelta`, `summary` — **and the row's cells**: `evolution-core`'s `skill-row-cells.ts` decides what the row says, in which order and in which slot (`lead` / `meta` / `aside`), and the host ships that list with the row, because a browser half cannot import core at runtime. This half substitutes words from its locale dictionary and renders by slot, so a decision fact (`aside`) can no longer be eaten by the browser's ellipsis. The time, the action words and the sentences are therefore localized; the facts are computed once, host-side, so the panel and the slash commands cannot drift.
|
|
46
46
|
|
|
47
|
-
**Appearance follows the platform's tokens
|
|
47
|
+
**Appearance follows the platform's tokens and the family's own scale.** The panel carries its own stylesheet (`src/client/styles.ts`, injected once behind `data-plugin-css`), split into two prefixed faces: `.evo-hist-*` is the tool face (the list, its rows, its controls) and `.evo-doc-*` is the reading face (one version as a document — one measure, page-like spacing, no inner scroll), so neither face's comfort can be overruled by the other's rules. Every type step, space, radius, hairline, tone, focus ring and container cap is a token from `packages/scripts/client-tokens.json`, generated into `src/client/tokens.ts` in both client halves (identical bytes; `verify-client-tokens` is a gate step), and N25/N26/N27 in the family's guard keep literals, borrowed interaction colours and off-scale geometry out. It copies its metrics from the platform's own components — the command card's `<pre>` for the diff block, the sidebar row's hover and focus ring for the controls, and the theme's semantic state pair (`--dsw-alias-state-success-primary` / `--dsw-alias-state-error-primary`) for the diff's added and removed lines — while type follows the shell rather than the conversation: the panel is one relative step below the shell's chrome size (`calc(1em - 1px)`, never the conversation-content setting) and steps again inside itself — `calc(1em + 2px)` for the title, `calc(1em - 1px)` for a group label. Only the diff block takes the platform's code-block token — it renders content, not chrome. The setting behind `--dsh-content-font-size*` is documented as affecting conversation content only, so the panel deliberately does not follow it. Two platform seams are reached differently, and the difference is deliberate. **Controls and styles are drawn here**, because a STATIC import of the platform's control package cannot compile from this tree: the workspace tsconfig maps the specifier to platform sources (`TS6059`/`TS6307`) and this package's `react.d.ts` shadows the real React types (`TS2305`); an ambient `declare module` for that specifier loses to the paths mapping. **The Markdown renderer is borrowed at runtime instead**: `src/client/markdown.ts` is the one seam, taking `MarkdownText` from `@deepseek-ai/dsh-client-ui-primitives` — a `PLATFORM_MODULES` row every dynamic bundle can `require`, exactly like `react` — through the loader-provided `require` (the bundler keeps `@deepseek-ai/*` external, so nothing is inlined and no dependency is installed). It renders with the platform's own mdast pipeline and the shell's own stylesheet, and when the row is absent the seam reports `{ok: false}` and every caller falls back to plain text: a missing renderer degrades a view, never the panel. `verify-arch-guards` rule **N24** keeps the drawn half honest — no literal `font-size`/`font`/`font-family` and no literal colour under `src/client`, only `var(--…)`, `calc(…)` or a CSS-wide keyword. The roll call of what the panel deliberately does not do is in `## Known limitations and deferred work`.
|
|
48
48
|
|
|
49
49
|
## Where the boundaries are
|
|
50
50
|
|