@xmoon76/dsh-pi-tui 0.5.7 → 0.5.8

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.
Files changed (33) hide show
  1. package/README.en.md +13 -11
  2. package/README.md +13 -11
  3. package/dist/{bootstrap-C9nl6e13.mjs → bootstrap-CMIjGyuk.mjs} +532 -416
  4. package/dist/builtins.mjs +2 -2
  5. package/dist/{client-bootstrap-CGezi85O.mjs → client-bootstrap-BjGPc-DM.mjs} +826 -3
  6. package/dist/{daemon-launcher-H_1r5Cqs.mjs → daemon-launcher-Dult7Jxv.mjs} +121 -4
  7. package/dist/daemon-launcher.mjs +1 -1
  8. package/dist/{entry-control-jBfKn1qO.mjs → entry-control-DjNsE3I0.mjs} +1 -1
  9. package/dist/{extensions-6a5vvJUT.mjs → extensions-B4uLpSTv.mjs} +1 -4
  10. package/dist/extensions.mjs +1 -1
  11. package/dist/{host-foundation-probe-DK7n5jDu.mjs → host-foundation-probe-DMNTmNrH.mjs} +1 -1
  12. package/dist/index.mjs +532 -298
  13. package/dist/{local-acp-listener-CNkguN5-.mjs → local-acp-listener-B65J0Bx4.mjs} +561 -12
  14. package/dist/local-client.mjs +442 -45
  15. package/dist/{local-daemon-control-Cu_4FIdd.mjs → local-daemon-control-C14q9KnD.mjs} +5 -2
  16. package/dist/{local-daemon-control-Bg9s2aYi.mjs → local-daemon-control-TCnERL7n.mjs} +3 -3
  17. package/dist/{local-discovery-Bq3jLAn1.mjs → local-discovery-DOSsCh9q.mjs} +1 -1
  18. package/dist/{local-discovery-BMoNXZjJ.mjs → local-discovery-egN4_gsQ.mjs} +1 -1
  19. package/dist/{local-discovery-BPZw1wEd.mjs → local-discovery-uOBfFq5j.mjs} +1 -1
  20. package/dist/local-host.mjs +24 -6
  21. package/dist/local-profile-daemon-admin-BmQSdzT0.mjs +210 -0
  22. package/dist/{local-scope-DEuGAy8l.mjs → local-scope-DamiMqPd.mjs} +118 -1
  23. package/dist/{local-transport-X4ZCe2uE.mjs → local-transport-Iwo0mtu3.mjs} +2 -2
  24. package/dist/{local-web-control-DKWtXIkr.mjs → local-web-control-DMrjwCkl.mjs} +2 -2
  25. package/dist/{session-DC0XQr5O.mjs → session-C6tSs86s.mjs} +2 -2
  26. package/dist/{session-Cihe8PPS.mjs → session-CstInGIA.mjs} +1 -1
  27. package/dist/{startup-CARqn3kV.mjs → startup-EG5UqIcd.mjs} +3 -3
  28. package/dist/startup.mjs +1 -1
  29. package/dist/{terminal-progress-source-D4DHyXDo.mjs → terminal-progress-source-CpfpQO_h.mjs} +3 -6
  30. package/dist/{transcript-view-hvNVkPtv.mjs → transcript-view-C1YtJ49Y.mjs} +191 -192
  31. package/dist/{transcript-view-a7cROAaI.mjs → transcript-view-CuJYWkhp.mjs} +190 -191
  32. package/package.json +6 -6
  33. package/dist/local-profile-daemon-admin-AXgVH-6y.mjs +0 -91
@@ -1,7 +1,7 @@
1
1
  import { A as discoverForQuery, F as resolvePathQuery, I as separatorOfRaw, M as createBoundedFinderCandidateCollector, N as rankPathCandidates, P as reattachDisplayBase, j as escapeFinderRegex, k as createFinderRecordStream } from "./prompt-sections-DUKmWb8g.mjs";
2
2
  import { i as StepUsageAccumulator, s as totalTokens } from "./performance-view-CfGvLZyD.mjs";
3
3
  import { C as chartHumanText, E as chartValueRows, I as humanFacingVisualResult, L as isVisualToolName, M as CHART_TOOL_NAME, N as PRESENT_VISUAL_TOOL_NAME, P as SVG_TOOL_NAME, c as visualParts, g as svgDetailRows, u as visualPartsFromText, w as chartProjection, x as chartDisplayTitle } from "./runtime-status-v-FTnWcD.mjs";
4
- import { Et as resolveCommandFooterFallback, I as CombinedAutocompleteProvider, Tt as parseFooterLayout, _t as sliceByColumn, bt as visibleWidth, rt as fuzzyFilter, wt as isFooterLayout, xt as wrapTextWithAnsi, yt as truncateToWidth } from "./extensions-6a5vvJUT.mjs";
4
+ import { Et as resolveCommandFooterFallback, I as CombinedAutocompleteProvider, Tt as parseFooterLayout, _t as sliceByColumn, bt as visibleWidth, rt as fuzzyFilter, wt as isFooterLayout, xt as wrapTextWithAnsi, yt as truncateToWidth } from "./extensions-B4uLpSTv.mjs";
5
5
  import { accessSync, appendFileSync, constants, existsSync, mkdirSync, readFileSync, readdirSync, statSync } from "node:fs";
6
6
  import { homedir } from "node:os";
7
7
  import { delimiter, dirname, join } from "node:path";
@@ -12,8 +12,8 @@ import { ToolCallId, expandAssistantStream } from "@deepseek-ai/dsh-llm";
12
12
  import { open, readdir, stat } from "node:fs/promises";
13
13
  import { formatFileMention } from "@deepseek-ai/dsh-file-reference/grammar";
14
14
  import { spawn } from "node:child_process";
15
- import { Chalk } from "chalk";
16
15
  import { Marked } from "marked";
16
+ import { Chalk } from "chalk";
17
17
  import { html, ui } from "@stencil-hq/tern";
18
18
  //#region src/client/history/store.ts
19
19
  /**
@@ -7526,193 +7526,6 @@ async function suggestPathArgument(argumentText, cwd, localFdPath = void 0) {
7526
7526
  * AND get the matching `getArgumentCompletions` wiring. */
7527
7527
  const FILE_ARGUMENT_COMMANDS = /* @__PURE__ */ new Set(["attach", "image"]);
7528
7528
  //#endregion
7529
- //#region src/tui/theme/runtime.ts
7530
- /**
7531
- * The live terminal palette + ANSI/TUI theme objects (TS8-E): the ONE owner
7532
- * of the mutable current palette and of the chalk-backed style helpers,
7533
- * searchable-picker/settings-list/editor/markdown themes and the host
7534
- * markdown options. Every TUI renderer and every terminal-rendering
7535
- * extension adapter (`extension/internal/component-compiler.ts`,
7536
- * `slot-outlet.ts`) consumes this owner; the neutral palette vocabulary and
7537
- * built-in palettes live in `domain/display/theme.ts`.
7538
- * @module @xmoon76/dsh-pi-tui/tui/theme/runtime
7539
- */
7540
- /** The active palette; style helpers read it on every call, so swapping is live. */
7541
- let currentPalette = darkColors;
7542
- /**
7543
- * Switch the active palette; callers must invalidate rendered components.
7544
- * `custom` uses the full palette in `customPalette`, or falls back to dark.
7545
- * @param theme - the palette family.
7546
- * @param custom - the resolved custom palette when `theme` is `custom`.
7547
- */
7548
- function setTheme(theme, custom) {
7549
- if (theme === "custom" && custom !== void 0) currentPalette = withSearchCurrentTokens(custom);
7550
- else currentPalette = theme === "light" ? lightColors : darkColors;
7551
- }
7552
- const chalk = new Chalk({ level: 3 });
7553
- const hex = (token) => chalk.hex(currentPalette[token] ?? currentPalette.text);
7554
- /** Paint text with an explicit hex colour. Brand assets (the welcome whale
7555
- * gradient) use a fixed ramp that is NOT a semantic token: it must not
7556
- * follow the active palette, and custom themes do not override it. */
7557
- const hexPaint = (hexValue, text) => chalk.hex(hexValue)(text);
7558
- /** Style helpers by token name. The strong/dim/italic helpers accept an
7559
- * optional TONE OVERRIDE (the footer layout's semantic tone override):
7560
- * the override replaces the token, the style stays. */
7561
- const color = {
7562
- primary: (text) => hex("primary")(text),
7563
- accent: (text) => hex("accent")(text),
7564
- text: (text) => hex("text")(text),
7565
- textStrong: (text, tone) => chalk.bold.hex(currentPalette[tone ?? "textStrong"] ?? currentPalette.textStrong)(text),
7566
- textDim: (text, tone) => hex(tone ?? "textDim")(text),
7567
- textMuted: (text) => hex("textMuted")(text),
7568
- border: (text) => hex("border")(text),
7569
- borderFocus: (text) => hex("borderFocus")(text),
7570
- success: (text) => hex("success")(text),
7571
- warning: (text) => hex("warning")(text),
7572
- error: (text) => hex("error")(text),
7573
- diffAdded: (text) => hex("diffAdded")(text),
7574
- diffRemoved: (text) => hex("diffRemoved")(text),
7575
- diffAddedStrong: (text) => chalk.bold.hex(currentPalette.diffAddedStrong)(text),
7576
- diffRemovedStrong: (text) => chalk.bold.hex(currentPalette.diffRemovedStrong)(text),
7577
- diffGutter: (text) => hex("diffGutter")(text),
7578
- diffMeta: (text) => hex("diffMeta")(text),
7579
- roleUser: (text) => hex("roleUser")(text),
7580
- /** User-bubble background paint (dsh-web `--dsw-specific-bubble`
7581
- * parity): the whole user row reads as a floating block. The token is
7582
- * optional — an absent `roleUserBg` makes this an identity function. */
7583
- roleUserBg: (text) => currentPalette.roleUserBg === void 0 ? text : chalk.bgHex(currentPalette.roleUserBg)(text),
7584
- shellMode: (text) => hex("shellMode")(text),
7585
- /** Ordinary visible transcript-search occurrence: explicit themed ink on a
7586
- * yellow block, separate from the current occurrence. */
7587
- searchMatch: (text) => chalk.hex(currentPalette.searchMatchFg ?? currentPalette.text).bgHex(currentPalette.searchMatchBg ?? currentPalette.warning)(text),
7588
- /** The current card's REAL visible title/anchor when the exact source cells
7589
- * cannot be proven. Same orange role as the current block but deliberately not
7590
- * bold: the bold current style is reserved for a Full source-proven cell or
7591
- * View's current mounted rendered occurrence. */
7592
- searchCardAnchor: (text) => chalk.hex(currentPalette.searchCurrentFg ?? currentPalette.textStrong).bgHex(currentPalette.searchCurrentBg ?? currentPalette.primary)(text),
7593
- /** The current search occurrence (Full source-proven, or View's current
7594
- * mounted rendered occurrence): bold with an explicit themed
7595
- * foreground AND background. NEVER the terminal's inverse attribute — a
7596
- * palette that omits the tokens has them filled at apply time
7597
- * ({@link withSearchCurrentTokens}), and this helper's own derivation stays
7598
- * inside the palette. */
7599
- searchCurrent: (text) => chalk.bold.hex(currentPalette.searchCurrentFg ?? currentPalette.textStrong).bgHex(currentPalette.searchCurrentBg ?? currentPalette.primary)(text),
7600
- /** The LEGACY anchor-only ROW wash used when no visible card-anchor geometry
7601
- * (header or first visible non-image text row) is available: it marks only the
7602
- * owning row, never a proven occurrence, and ordinary query words on that row
7603
- * keep their yellow block. A card with visible anchor geometry uses
7604
- * {@link searchCardAnchor} instead. */
7605
- searchAnchorBg: (text) => chalk.bgHex(currentPalette.searchAnchorBg ?? currentPalette.border)(text),
7606
- /** Plain italics (kimi thinking parity); an optional tone override
7607
- * colors the italic run. */
7608
- italic: (text, tone) => tone === void 0 ? chalk.italic(text) : chalk.italic.hex(currentPalette[tone] ?? currentPalette.text)(text),
7609
- /** Dim + italic for reasoning: intermediate thinking never reads like output. */
7610
- textDimItalic: (text) => chalk.italic.hex(currentPalette.textDim)(text)
7611
- };
7612
- /** SearchablePicker palette from the semantic tokens (a structural
7613
- * superset of the upstream SelectListTheme, so it still satisfies the
7614
- * Editor's autocomplete theme slot). */
7615
- const selectListTheme = {
7616
- selectedPrefix: (text) => color.primary(text),
7617
- selectedText: (text) => chalk.bold.hex(currentPalette.textStrong)(text),
7618
- description: (text) => color.textDim(text),
7619
- scrollInfo: (text) => color.textMuted(text),
7620
- noMatch: (text) => color.textMuted(text),
7621
- groupHeader: (text) => color.textDim(text)
7622
- };
7623
- /**
7624
- * The readable half of a task/job state: the Title Case status WORD that
7625
- * carries the shared `‣` marker (design language `docs/architecture/design-language.md`
7626
- * §3.2 role 9 — colour is never the only signal, §3.3.3). The word is paired
7627
- * with {@link taskStatusColor}'s token; the two must stay one vocabulary, so
7628
- * this map lives beside the colour map (`docs/architecture/design-language.md` §10) and
7629
- * is never forked.
7630
- *
7631
- * A status the map does not name is Title-cased verbatim: the surface may not
7632
- * rename a real state it does not know, and a future wire status must still
7633
- * paint a readable word.
7634
- */
7635
- function taskStatusWord(status) {
7636
- switch (status) {
7637
- case "running": return "Running";
7638
- case "stopping": return "Stopping";
7639
- case "completed": return "Completed";
7640
- case "failed": return "Failed";
7641
- case "killed": return "Killed";
7642
- case "timed_out": return "Timed out";
7643
- case "lost": return "Lost";
7644
- case "inactive": return "Inactive";
7645
- case "awaiting answer": return "Awaiting answer";
7646
- default: return status.charAt(0).toUpperCase() + status.slice(1);
7647
- }
7648
- }
7649
- /**
7650
- * Status-dot colour for a job status (dsh-web StateDot parity:
7651
- * running = ongoing/primary, stopping/killed = warning, completed = done/dim,
7652
- * failed/timed-out/lost = error). Unknown statuses fall back to the
7653
- * muted token so a future wire status never crashes the renderer.
7654
- */
7655
- function taskStatusColor(status) {
7656
- switch (status) {
7657
- case "running": return color.primary;
7658
- case "stopping": return color.warning;
7659
- case "completed": return color.textDim;
7660
- case "failed":
7661
- case "killed": return color.warning;
7662
- case "timed_out":
7663
- case "lost": return color.error;
7664
- default: return color.textMuted;
7665
- }
7666
- }
7667
- /**
7668
- * SettingsList palette from the semantic tokens. A FUNCTION, not a
7669
- * module-level constant: `cursor` is a pre-rendered ANSI string, so a
7670
- * constant would freeze the cursor colour at module load and never follow
7671
- * a live theme switch. Call it fresh for every overlay/settings open.
7672
- */
7673
- function settingsListTheme() {
7674
- return {
7675
- label: (text, selected) => selected ? chalk.bold.hex(currentPalette.textStrong)(text) : color.text(text),
7676
- value: (text, selected) => selected ? color.primary(text) : color.textDim(text),
7677
- description: (text) => color.textDim(text),
7678
- cursor: color.primary("> "),
7679
- hint: (text) => color.textMuted(text)
7680
- };
7681
- }
7682
- /** Editor palette: focused border uses the brand token. */
7683
- const editorTheme = {
7684
- borderColor: (text) => color.border(text),
7685
- selectList: selectListTheme
7686
- };
7687
- /**
7688
- * Markdown rendering options shared by EVERY host transcript renderer
7689
- * (assistant cards, thinking blocks, plugin component compilation).
7690
- * LaTeX-to-Unicode rendering is deliberately OFF (the kimi-host parity
7691
- * choice): the Earendil 0.84.4 re-vendor introduced `renderLatex`
7692
- * defaulting to true, which silently changed how `$...$`/`$$...$$`
7693
- * segments in assistant output render. Keep the pre-re-vendor rendering;
7694
- * revisit as an explicit setting if LaTeX output ever becomes a product
7695
- * requirement.
7696
- */
7697
- const HOST_MARKDOWN_OPTIONS = { renderLatex: false };
7698
- /** Markdown palette for assistant messages. */
7699
- const markdownTheme = {
7700
- heading: (text) => chalk.bold.hex(currentPalette.textStrong)(text),
7701
- link: (text) => color.primary(text),
7702
- linkUrl: (text) => color.textMuted(text),
7703
- code: (text) => color.primary(text),
7704
- codeBlock: (text) => text,
7705
- codeBlockBorder: (text) => color.textMuted(text),
7706
- quote: (text) => color.textDim(text),
7707
- quoteBorder: (text) => color.textDim(text),
7708
- hr: (text) => color.border(text),
7709
- listBullet: (text) => color.text(text.replace(/^-/, "•")),
7710
- bold: (text) => chalk.bold(text),
7711
- italic: (text) => chalk.italic(text),
7712
- strikethrough: (text) => chalk.strikethrough(text),
7713
- underline: (text) => chalk.underline(text)
7714
- };
7715
- //#endregion
7716
7529
  //#region src/tui/presentation/terminal-text.ts
7717
7530
  /**
7718
7531
  * Untrusted-text projections for terminal-bound presentation.
@@ -8030,6 +7843,193 @@ function sanitizedPhysicalLine(text) {
8030
7843
  return sanitizeDisplayText(text).replace(/[\t\r\n]+/g, " ");
8031
7844
  }
8032
7845
  //#endregion
7846
+ //#region src/tui/theme/runtime.ts
7847
+ /**
7848
+ * The live terminal palette + ANSI/TUI theme objects (TS8-E): the ONE owner
7849
+ * of the mutable current palette and of the chalk-backed style helpers,
7850
+ * searchable-picker/settings-list/editor/markdown themes and the host
7851
+ * markdown options. Every TUI renderer and every terminal-rendering
7852
+ * extension adapter (`extension/internal/component-compiler.ts`,
7853
+ * `slot-outlet.ts`) consumes this owner; the neutral palette vocabulary and
7854
+ * built-in palettes live in `domain/display/theme.ts`.
7855
+ * @module @xmoon76/dsh-pi-tui/tui/theme/runtime
7856
+ */
7857
+ /** The active palette; style helpers read it on every call, so swapping is live. */
7858
+ let currentPalette = darkColors;
7859
+ /**
7860
+ * Switch the active palette; callers must invalidate rendered components.
7861
+ * `custom` uses the full palette in `customPalette`, or falls back to dark.
7862
+ * @param theme - the palette family.
7863
+ * @param custom - the resolved custom palette when `theme` is `custom`.
7864
+ */
7865
+ function setTheme(theme, custom) {
7866
+ if (theme === "custom" && custom !== void 0) currentPalette = withSearchCurrentTokens(custom);
7867
+ else currentPalette = theme === "light" ? lightColors : darkColors;
7868
+ }
7869
+ const chalk = new Chalk({ level: 3 });
7870
+ const hex = (token) => chalk.hex(currentPalette[token] ?? currentPalette.text);
7871
+ /** Paint text with an explicit hex colour. Brand assets (the welcome whale
7872
+ * gradient) use a fixed ramp that is NOT a semantic token: it must not
7873
+ * follow the active palette, and custom themes do not override it. */
7874
+ const hexPaint = (hexValue, text) => chalk.hex(hexValue)(text);
7875
+ /** Style helpers by token name. The strong/dim/italic helpers accept an
7876
+ * optional TONE OVERRIDE (the footer layout's semantic tone override):
7877
+ * the override replaces the token, the style stays. */
7878
+ const color = {
7879
+ primary: (text) => hex("primary")(text),
7880
+ accent: (text) => hex("accent")(text),
7881
+ text: (text) => hex("text")(text),
7882
+ textStrong: (text, tone) => chalk.bold.hex(currentPalette[tone ?? "textStrong"] ?? currentPalette.textStrong)(text),
7883
+ textDim: (text, tone) => hex(tone ?? "textDim")(text),
7884
+ textMuted: (text) => hex("textMuted")(text),
7885
+ border: (text) => hex("border")(text),
7886
+ borderFocus: (text) => hex("borderFocus")(text),
7887
+ success: (text) => hex("success")(text),
7888
+ warning: (text) => hex("warning")(text),
7889
+ error: (text) => hex("error")(text),
7890
+ diffAdded: (text) => hex("diffAdded")(text),
7891
+ diffRemoved: (text) => hex("diffRemoved")(text),
7892
+ diffAddedStrong: (text) => chalk.bold.hex(currentPalette.diffAddedStrong)(text),
7893
+ diffRemovedStrong: (text) => chalk.bold.hex(currentPalette.diffRemovedStrong)(text),
7894
+ diffGutter: (text) => hex("diffGutter")(text),
7895
+ diffMeta: (text) => hex("diffMeta")(text),
7896
+ roleUser: (text) => hex("roleUser")(text),
7897
+ /** User-bubble background paint (dsh-web `--dsw-specific-bubble`
7898
+ * parity): the whole user row reads as a floating block. The token is
7899
+ * optional — an absent `roleUserBg` makes this an identity function. */
7900
+ roleUserBg: (text) => currentPalette.roleUserBg === void 0 ? text : chalk.bgHex(currentPalette.roleUserBg)(text),
7901
+ shellMode: (text) => hex("shellMode")(text),
7902
+ /** Ordinary visible transcript-search occurrence: explicit themed ink on a
7903
+ * yellow block, separate from the current occurrence. */
7904
+ searchMatch: (text) => chalk.hex(currentPalette.searchMatchFg ?? currentPalette.text).bgHex(currentPalette.searchMatchBg ?? currentPalette.warning)(text),
7905
+ /** The current card's REAL visible title/anchor when the exact source cells
7906
+ * cannot be proven. Same orange role as the current block but deliberately not
7907
+ * bold: the bold current style is reserved for a Full source-proven cell or
7908
+ * View's current mounted rendered occurrence. */
7909
+ searchCardAnchor: (text) => chalk.hex(currentPalette.searchCurrentFg ?? currentPalette.textStrong).bgHex(currentPalette.searchCurrentBg ?? currentPalette.primary)(text),
7910
+ /** The current search occurrence (Full source-proven, or View's current
7911
+ * mounted rendered occurrence): bold with an explicit themed
7912
+ * foreground AND background. NEVER the terminal's inverse attribute — a
7913
+ * palette that omits the tokens has them filled at apply time
7914
+ * ({@link withSearchCurrentTokens}), and this helper's own derivation stays
7915
+ * inside the palette. */
7916
+ searchCurrent: (text) => chalk.bold.hex(currentPalette.searchCurrentFg ?? currentPalette.textStrong).bgHex(currentPalette.searchCurrentBg ?? currentPalette.primary)(text),
7917
+ /** The LEGACY anchor-only ROW wash used when no visible card-anchor geometry
7918
+ * (header or first visible non-image text row) is available: it marks only the
7919
+ * owning row, never a proven occurrence, and ordinary query words on that row
7920
+ * keep their yellow block. A card with visible anchor geometry uses
7921
+ * {@link searchCardAnchor} instead. */
7922
+ searchAnchorBg: (text) => chalk.bgHex(currentPalette.searchAnchorBg ?? currentPalette.border)(text),
7923
+ /** Plain italics (kimi thinking parity); an optional tone override
7924
+ * colors the italic run. */
7925
+ italic: (text, tone) => tone === void 0 ? chalk.italic(text) : chalk.italic.hex(currentPalette[tone] ?? currentPalette.text)(text),
7926
+ /** Dim + italic for reasoning: intermediate thinking never reads like output. */
7927
+ textDimItalic: (text) => chalk.italic.hex(currentPalette.textDim)(text)
7928
+ };
7929
+ /** SearchablePicker palette from the semantic tokens (a structural
7930
+ * superset of the upstream SelectListTheme, so it still satisfies the
7931
+ * Editor's autocomplete theme slot). */
7932
+ const selectListTheme = {
7933
+ selectedPrefix: (text) => color.primary(text),
7934
+ selectedText: (text) => chalk.bold.hex(currentPalette.textStrong)(text),
7935
+ description: (text) => color.textDim(text),
7936
+ scrollInfo: (text) => color.textMuted(text),
7937
+ noMatch: (text) => color.textMuted(text),
7938
+ groupHeader: (text) => color.textDim(text)
7939
+ };
7940
+ /**
7941
+ * The readable half of a task/job state: the Title Case status WORD that
7942
+ * carries the shared `‣` marker (design language `docs/architecture/design-language.md`
7943
+ * §3.2 role 9 — colour is never the only signal, §3.3.3). The word is paired
7944
+ * with {@link taskStatusColor}'s token; the two must stay one vocabulary, so
7945
+ * this map lives beside the colour map (`docs/architecture/design-language.md` §10) and
7946
+ * is never forked.
7947
+ *
7948
+ * A status the map does not name is Title-cased verbatim: the surface may not
7949
+ * rename a real state it does not know, and a future wire status must still
7950
+ * paint a readable word.
7951
+ */
7952
+ function taskStatusWord(status) {
7953
+ switch (status) {
7954
+ case "running": return "Running";
7955
+ case "stopping": return "Stopping";
7956
+ case "completed": return "Completed";
7957
+ case "failed": return "Failed";
7958
+ case "killed": return "Killed";
7959
+ case "timed_out": return "Timed out";
7960
+ case "lost": return "Lost";
7961
+ case "inactive": return "Inactive";
7962
+ case "awaiting answer": return "Awaiting answer";
7963
+ default: return status.charAt(0).toUpperCase() + status.slice(1);
7964
+ }
7965
+ }
7966
+ /**
7967
+ * Status-dot colour for a job status (dsh-web StateDot parity:
7968
+ * running = ongoing/primary, stopping/killed = warning, completed = done/dim,
7969
+ * failed/timed-out/lost = error). Unknown statuses fall back to the
7970
+ * muted token so a future wire status never crashes the renderer.
7971
+ */
7972
+ function taskStatusColor(status) {
7973
+ switch (status) {
7974
+ case "running": return color.primary;
7975
+ case "stopping": return color.warning;
7976
+ case "completed": return color.textDim;
7977
+ case "failed":
7978
+ case "killed": return color.warning;
7979
+ case "timed_out":
7980
+ case "lost": return color.error;
7981
+ default: return color.textMuted;
7982
+ }
7983
+ }
7984
+ /**
7985
+ * SettingsList palette from the semantic tokens. A FUNCTION, not a
7986
+ * module-level constant: `cursor` is a pre-rendered ANSI string, so a
7987
+ * constant would freeze the cursor colour at module load and never follow
7988
+ * a live theme switch. Call it fresh for every overlay/settings open.
7989
+ */
7990
+ function settingsListTheme() {
7991
+ return {
7992
+ label: (text, selected) => selected ? chalk.bold.hex(currentPalette.textStrong)(text) : color.text(text),
7993
+ value: (text, selected) => selected ? color.primary(text) : color.textDim(text),
7994
+ description: (text) => color.textDim(text),
7995
+ cursor: color.primary("> "),
7996
+ hint: (text) => color.textMuted(text)
7997
+ };
7998
+ }
7999
+ /** Editor palette: focused border uses the brand token. */
8000
+ const editorTheme = {
8001
+ borderColor: (text) => color.border(text),
8002
+ selectList: selectListTheme
8003
+ };
8004
+ /**
8005
+ * Markdown rendering options shared by EVERY host transcript renderer
8006
+ * (assistant cards, thinking blocks, plugin component compilation).
8007
+ * LaTeX-to-Unicode rendering is deliberately OFF (the kimi-host parity
8008
+ * choice): the Earendil 0.84.4 re-vendor introduced `renderLatex`
8009
+ * defaulting to true, which silently changed how `$...$`/`$$...$$`
8010
+ * segments in assistant output render. Keep the pre-re-vendor rendering;
8011
+ * revisit as an explicit setting if LaTeX output ever becomes a product
8012
+ * requirement.
8013
+ */
8014
+ const HOST_MARKDOWN_OPTIONS = { renderLatex: false };
8015
+ /** Markdown palette for assistant messages. */
8016
+ const markdownTheme = {
8017
+ heading: (text) => chalk.bold.hex(currentPalette.textStrong)(text),
8018
+ link: (text) => color.primary(text),
8019
+ linkUrl: (text) => color.textMuted(text),
8020
+ code: (text) => color.primary(text),
8021
+ codeBlock: (text) => text,
8022
+ codeBlockBorder: (text) => color.textMuted(text),
8023
+ quote: (text) => color.textDim(text),
8024
+ quoteBorder: (text) => color.textDim(text),
8025
+ hr: (text) => color.border(text),
8026
+ listBullet: (text) => color.text(text.replace(/^-/, "•")),
8027
+ bold: (text) => chalk.bold(text),
8028
+ italic: (text) => chalk.italic(text),
8029
+ strikethrough: (text) => chalk.strikethrough(text),
8030
+ underline: (text) => chalk.underline(text)
8031
+ };
8032
+ //#endregion
8033
8033
  //#region src/tui/pickers/model-directory.ts
8034
8034
  const IDENTITY_SEP = "\0";
8035
8035
  const PROVIDER_DEFAULT = `${IDENTITY_SEP}provider-default`;
@@ -10058,8 +10058,7 @@ function sanitizeTerminalText(value) {
10058
10058
  function sessionBrowserErrorNotice(kind, message) {
10059
10059
  const safe = sanitizeTerminalText(message).replace(/\s+\(raw log: .*\)$/u, "");
10060
10060
  const unknownEvent = /contains event type "([^"]+)"/u.exec(safe)?.[1];
10061
- const text = unknownEvent === void 0 ? `${kind === "search" ? "Search failed" : "Session details unavailable"}: ${safe}` : `unknown event ${unknownEvent}`;
10062
- return truncateToWidth(text, 40, "…");
10061
+ return unknownEvent === void 0 ? `${kind === "search" ? "Search failed" : "Session details unavailable"}: ${safe}` : `unknown event ${unknownEvent}`;
10063
10062
  }
10064
10063
  //#endregion
10065
10064
  //#region src/tui/icons.ts
@@ -20824,4 +20823,4 @@ const EMPTY_TURN_SET = /* @__PURE__ */ new Set();
20824
20823
  const EMPTY_TURN_ACTIVITIES = /* @__PURE__ */ new Map();
20825
20824
  const EMPTY_ASSISTANT_STATS = /* @__PURE__ */ new Map();
20826
20825
  //#endregion
20827
- export { effectiveWorkflowRunOpen as $, TSP_SEARCH_CHORD as $n, customItemName as $r, isCompactActionTool as $t, summarizeWorkSpan as A, appendHistoryRecord as Ai, findSessionMatch as An, FILE_ARGUMENT_COMMANDS as Ar, isTaskItemActive as At, FocusActivityComponent as B, createBuiltinFooterRegistry as Bn, SessionScopeSupersededError as Br, FOLDED_JSON_RESULT_TOOLS as Bt, proveCaretEdit as C, isSurfacedContext as Ci, iconPrefix as Cn, editorTheme as Cr, setAssistantVisualPresentation as Ct, contextClusterSummaryParts as D, openOpaqueBlockFallbackText as Di, workspaceKey as Dn, settingsListTheme as Dr, currentWorkspaceOf as Dt, FocusTimingStore as E, finalizedBlockFallbackText as Ei, sessionBrowserErrorNotice as En, setTheme as Er, buildSessionWorkspaceView as Et, clusterByMemberOf as F, pickWelcomeWhaleVariant as Fn, attachmentCountLabel as Fr, subagentJobViewHint as Ft, compactActionSlotLine as G, DELIVERED_FILES_CHORDS as Gn, withSearchCurrentTokens as Gr, compactToolPresentation as Gt, formatCompactDuration as H, tasksItem as Hn, darkColors as Hr, askAnswersLines as Ht, isFoldableWorkContext as I, renderWelcomeWhaleLines as In, queueManagerCommandResult as Ir, taskRowLabel as It, compactSlotLine as J, QUEUE_CHORDS as Jn, CUSTOM_FOOTER_ITEM_PREFIX as Jr, foldedResultSummaryFor as Jt, compactActionStatsSignature as K, HISTORY_CHORDS as Kn, TSP_FOOTER_NOTICES as Kr, firstLine as Kt, projectTranscriptStructure as L, welcomeWhaleGradientColors as Ln, formatBytes as Lr, taskRowSelectionDisposition as Lt, consecutiveTurnGroup as M, loadHistoryFile as Mi, sessionRowMatchesQuery as Mn, ClientLocalDiscoveryDriver as Mr, projectTaskItems as Mt, focusProjectionTurnOf as N, loadHistoryRecords as Ni, shortSessionId as Nn, clientPathQueryEnvironment as Nr, rowGroup as Nt, activityClockOf as O, textWithAttachmentMarkers as Oi, canonicalFullSessionId as On, taskStatusColor as Or, visibleWorkspaceBrowserRows as Ot, projectFocus as P, WELCOME_WHALE_WIDTH as Pn, QueueManagerController as Pr, subagentJobTranscriptId as Pt, effectiveWorkflowPhaseOpen as Q, TSP_CONTINUED_INSPECTION_LABEL as Qn, customItemId as Qr, imageFoldedPreview as Qt, workByMemberOf as R, welcomeWhalePlainLines as Rn, SessionOperationBarrier as Rr, taskTreePrefix as Rt, pastedBodySpan as S, recentTurnThreshold as Si, iconLead as Sn, color as Sr, clearAssistantVisualPresentation as St, isLocalShellCard as T, latestLine as Ti, sanitizeTerminalText as Tn, selectListTheme as Tr, SESSION_SOURCE_LABEL as Tt, compactActionPresentation as U, FooterItemRegistry as Un, detectThemeFromBackground as Ur, askAnswersSummary as Ut, compactActionStatParts as V, modelItem as Vn, createSessionScopeAuthority as Vr, GOAL_TOOL_NAMES as Vt, compactActionSignature as W, shortCwd as Wn, lightColors as Wr, compactToolExpandedLines as Wt, createDisplayProjection as X, SVG_VIEWER_CHORDS as Xn, activeFooterItemIds as Xr, goalResultLines as Xt, compactThinkSlotLine as Y, SESSION_WORKSPACE_CHORDS as Yn, DEFAULT_CUSTOM_COMMAND_REFRESH_MS as Yr, genericRawInputLines as Yt, advanceWorkflowDisclosureState as Z, SVG_VIEWER_SCROLL_LABEL as Zn, customCommandConfigOf as Zr, goalResultSummary as Zt, VISUAL_COPY_ROLE as _, TranscriptWindowController as _i, writeFoldedPreview as _n, singlePhysicalLine as _r, FileHistorySearchSource as _t, dockDraftImageNodes as a, parseFooterCommandConfig as ai, readFoldedPreview as an, formatKeyId as ar, eligibleFinalAssistant as at, publishedVisualTitle as b, transcriptSearchSourceKey as bi, thinkingPreviewTail as bn, sanitizeDisplayText as br, assistantVisualPresentation as bt, imageRefProblem as c, resolveUserCommandItemFallbackActivationIds as ci, skillFoldedPreview as cn, parseShellWords as cr, stripAtQuotes as ct, visibleTranscriptMembers as d, TranscriptFolder as di, toolCardHeader as dn, PROVIDER_DEFAULT as dr, splitTokenRemainder as dt, effectiveCustomCommandRefreshMs as ei, parseCallPreview as en, TSP_SEARCH_CHORD_LABEL as er, workflowCountsText as et, TSP_WORKFLOW_BROWSE_ACTION as f, assistantPresentationRevision as fi, toolIconSemantic as fn, effortChoicesOf as fr, extractInlineSkillPrefix as ft, VISUAL_COPY_KEY as g, textOf as gi, webCardLines as gn, sanitizedPhysicalLine as gr, shellPrefixForMode as gt, VISUAL_COPY_ACTION as h, subCallDisplayStatus as hi, toolTitle as hn, projectModelDirectory as hr, serializedDraftHasPayload as ht, describeTranscriptMainBlocksForPreset as i, parseFooterCustomItems as ii, parseWriteEnvelope as in, formatHintKeys as ir, workflowStatusCounts as it, projectCompact as j, historyFilePath as ji, sanitizeSessionSearchInput as jn, suggestPathArgument as jr, isTaskItemFailure as jt, resolveWorkLifetimes as k, userBlocksVisibleNow as ki, chooseListedSession as kn, taskStatusWord as kr, workspaceRowStatusLabel as kt, toolRowImageBlocks as l, resolveUserLayerFooterMode as li, subagentModelDisplay as ln, isBuiltInPresetRow as lr, isOpenQuotedToken as lt, transcriptCopyPayload as m, childOwnEvents as mi, toolSummaryKeys as mn, modelIdentity as mr, serializeEditorInput as mt, TranscriptNodeKeys as n, executableCommandItemIds as ni, parseReadEnvelopes as nn, TSP_VISUAL_COPY_LABEL as nr, workflowRunSummaryText as nt, imageDisplayName as o, resolveTrustedFooterCommand as oi, relativizeToCwd as on, formatLeaderSequence as or, createInstalledAutocompleteProvider as ot, TRANSCRIPT_COPY_ACTION as p, assistantStepOf as pi, toolPresenterFrom as pn, initialEffortOf as pr, editorModeFromHistoryEntry as pt, compactPreparingSummary as q, JOB_LOCAL_KEYS as qn, resolveTspNativeFooterConfig as qr, foldedCallPreview as qt, describeTranscriptMainBlocks as r, parseFooterCustomItem as ri, parseSkillEnvelope as rn, TSP_VISUAL_SELECT_LABEL as rr, workflowRunViewAllVisible as rt, imageIdentityText as s, resolveUserCommandItemActivationIds as si, resultTextLines as sn, matchesKeyId as sr, classifyFileCompletionContext as st, MAX_IMAGE_BLOB_BYTES as t, effectiveCustomCommandTimeoutMs as ti, parseImageEnvelope as tn, TSP_VISUAL_CHORDS as tr, workflowPhasePresentations as tt, toolRowProjectsImages as u, MAX_COMMAND_TIMEOUT_MS as ui, systemContextBody as un, presetDisplayText as ur, splitQueryRemainder as ut, VISUAL_FIGURE_KEY_PREFIX as v, rawSourceRangeForNormalizedMatch as vi, fileAttachmentSummary as vn, sanitizeDisplayLog as vr, createHistoryRecallScope as vt, candidateImagePathFromPaste as w, isSurfacedInteractionTool as wi, formatSessionAge as wn, markdownTheme as wr, SESSION_PENDING_LABEL as wt, PasteRangeTracker as x, workflowReadablePhase as xi, iconFor as xn, HOST_MARKDOWN_OPTIONS as xr, assistantVisualPresentationRevision as xt, VISUAL_FIGURE_ROLE as y, transcriptSearchMatchKey as yi, imageProtocolPreference as yn, sanitizeDisplaySegment as yr, planVisualPlacement as yt, contextPresentationKind as z, FooterCustomItemCatalog as zn, TransitionInProgressError as zr, viewerAccessHint as zt };
20826
+ export { effectiveWorkflowRunOpen as $, TSP_SEARCH_CHORD as $n, customItemName as $r, isCompactActionTool as $t, summarizeWorkSpan as A, appendHistoryRecord as Ai, findSessionMatch as An, FILE_ARGUMENT_COMMANDS as Ar, isTaskItemActive as At, FocusActivityComponent as B, createBuiltinFooterRegistry as Bn, SessionScopeSupersededError as Br, FOLDED_JSON_RESULT_TOOLS as Bt, proveCaretEdit as C, isSurfacedContext as Ci, iconPrefix as Cn, taskStatusColor as Cr, setAssistantVisualPresentation as Ct, contextClusterSummaryParts as D, openOpaqueBlockFallbackText as Di, workspaceKey as Dn, sanitizeDisplayLog as Dr, currentWorkspaceOf as Dt, FocusTimingStore as E, finalizedBlockFallbackText as Ei, sessionBrowserErrorNotice as En, singlePhysicalLine as Er, buildSessionWorkspaceView as Et, clusterByMemberOf as F, pickWelcomeWhaleVariant as Fn, attachmentCountLabel as Fr, subagentJobViewHint as Ft, compactActionSlotLine as G, DELIVERED_FILES_CHORDS as Gn, withSearchCurrentTokens as Gr, compactToolPresentation as Gt, formatCompactDuration as H, tasksItem as Hn, darkColors as Hr, askAnswersLines as Ht, isFoldableWorkContext as I, renderWelcomeWhaleLines as In, queueManagerCommandResult as Ir, taskRowLabel as It, compactSlotLine as J, QUEUE_CHORDS as Jn, CUSTOM_FOOTER_ITEM_PREFIX as Jr, foldedResultSummaryFor as Jt, compactActionStatsSignature as K, HISTORY_CHORDS as Kn, TSP_FOOTER_NOTICES as Kr, firstLine as Kt, projectTranscriptStructure as L, welcomeWhaleGradientColors as Ln, formatBytes as Lr, taskRowSelectionDisposition as Lt, consecutiveTurnGroup as M, loadHistoryFile as Mi, sessionRowMatchesQuery as Mn, ClientLocalDiscoveryDriver as Mr, projectTaskItems as Mt, focusProjectionTurnOf as N, loadHistoryRecords as Ni, shortSessionId as Nn, clientPathQueryEnvironment as Nr, rowGroup as Nt, activityClockOf as O, textWithAttachmentMarkers as Oi, canonicalFullSessionId as On, sanitizeDisplaySegment as Or, visibleWorkspaceBrowserRows as Ot, projectFocus as P, WELCOME_WHALE_WIDTH as Pn, QueueManagerController as Pr, subagentJobTranscriptId as Pt, effectiveWorkflowPhaseOpen as Q, TSP_CONTINUED_INSPECTION_LABEL as Qn, customItemId as Qr, imageFoldedPreview as Qt, workByMemberOf as R, welcomeWhalePlainLines as Rn, SessionOperationBarrier as Rr, taskTreePrefix as Rt, pastedBodySpan as S, recentTurnThreshold as Si, iconLead as Sn, settingsListTheme as Sr, clearAssistantVisualPresentation as St, isLocalShellCard as T, latestLine as Ti, sanitizeTerminalText as Tn, sanitizedPhysicalLine as Tr, SESSION_SOURCE_LABEL as Tt, compactActionPresentation as U, FooterItemRegistry as Un, detectThemeFromBackground as Ur, askAnswersSummary as Ut, compactActionStatParts as V, modelItem as Vn, createSessionScopeAuthority as Vr, GOAL_TOOL_NAMES as Vt, compactActionSignature as W, shortCwd as Wn, lightColors as Wr, compactToolExpandedLines as Wt, createDisplayProjection as X, SVG_VIEWER_CHORDS as Xn, activeFooterItemIds as Xr, goalResultLines as Xt, compactThinkSlotLine as Y, SESSION_WORKSPACE_CHORDS as Yn, DEFAULT_CUSTOM_COMMAND_REFRESH_MS as Yr, genericRawInputLines as Yt, advanceWorkflowDisclosureState as Z, SVG_VIEWER_SCROLL_LABEL as Zn, customCommandConfigOf as Zr, goalResultSummary as Zt, VISUAL_COPY_ROLE as _, TranscriptWindowController as _i, writeFoldedPreview as _n, color as _r, FileHistorySearchSource as _t, dockDraftImageNodes as a, parseFooterCommandConfig as ai, readFoldedPreview as an, formatKeyId as ar, eligibleFinalAssistant as at, publishedVisualTitle as b, transcriptSearchSourceKey as bi, thinkingPreviewTail as bn, selectListTheme as br, assistantVisualPresentation as bt, imageRefProblem as c, resolveUserCommandItemFallbackActivationIds as ci, skillFoldedPreview as cn, parseShellWords as cr, stripAtQuotes as ct, visibleTranscriptMembers as d, TranscriptFolder as di, toolCardHeader as dn, PROVIDER_DEFAULT as dr, splitTokenRemainder as dt, effectiveCustomCommandRefreshMs as ei, parseCallPreview as en, TSP_SEARCH_CHORD_LABEL as er, workflowCountsText as et, TSP_WORKFLOW_BROWSE_ACTION as f, assistantPresentationRevision as fi, toolIconSemantic as fn, effortChoicesOf as fr, extractInlineSkillPrefix as ft, VISUAL_COPY_KEY as g, textOf as gi, webCardLines as gn, HOST_MARKDOWN_OPTIONS as gr, shellPrefixForMode as gt, VISUAL_COPY_ACTION as h, subCallDisplayStatus as hi, toolTitle as hn, projectModelDirectory as hr, serializedDraftHasPayload as ht, describeTranscriptMainBlocksForPreset as i, parseFooterCustomItems as ii, parseWriteEnvelope as in, formatHintKeys as ir, workflowStatusCounts as it, projectCompact as j, historyFilePath as ji, sanitizeSessionSearchInput as jn, suggestPathArgument as jr, isTaskItemFailure as jt, resolveWorkLifetimes as k, userBlocksVisibleNow as ki, chooseListedSession as kn, sanitizeDisplayText as kr, workspaceRowStatusLabel as kt, toolRowImageBlocks as l, resolveUserLayerFooterMode as li, subagentModelDisplay as ln, isBuiltInPresetRow as lr, isOpenQuotedToken as lt, transcriptCopyPayload as m, childOwnEvents as mi, toolSummaryKeys as mn, modelIdentity as mr, serializeEditorInput as mt, TranscriptNodeKeys as n, executableCommandItemIds as ni, parseReadEnvelopes as nn, TSP_VISUAL_COPY_LABEL as nr, workflowRunSummaryText as nt, imageDisplayName as o, resolveTrustedFooterCommand as oi, relativizeToCwd as on, formatLeaderSequence as or, createInstalledAutocompleteProvider as ot, TRANSCRIPT_COPY_ACTION as p, assistantStepOf as pi, toolPresenterFrom as pn, initialEffortOf as pr, editorModeFromHistoryEntry as pt, compactPreparingSummary as q, JOB_LOCAL_KEYS as qn, resolveTspNativeFooterConfig as qr, foldedCallPreview as qt, describeTranscriptMainBlocks as r, parseFooterCustomItem as ri, parseSkillEnvelope as rn, TSP_VISUAL_SELECT_LABEL as rr, workflowRunViewAllVisible as rt, imageIdentityText as s, resolveUserCommandItemActivationIds as si, resultTextLines as sn, matchesKeyId as sr, classifyFileCompletionContext as st, MAX_IMAGE_BLOB_BYTES as t, effectiveCustomCommandTimeoutMs as ti, parseImageEnvelope as tn, TSP_VISUAL_CHORDS as tr, workflowPhasePresentations as tt, toolRowProjectsImages as u, MAX_COMMAND_TIMEOUT_MS as ui, systemContextBody as un, presetDisplayText as ur, splitQueryRemainder as ut, VISUAL_FIGURE_KEY_PREFIX as v, rawSourceRangeForNormalizedMatch as vi, fileAttachmentSummary as vn, editorTheme as vr, createHistoryRecallScope as vt, candidateImagePathFromPaste as w, isSurfacedInteractionTool as wi, formatSessionAge as wn, taskStatusWord as wr, SESSION_PENDING_LABEL as wt, PasteRangeTracker as x, workflowReadablePhase as xi, iconFor as xn, setTheme as xr, assistantVisualPresentationRevision as xt, VISUAL_FIGURE_ROLE as y, transcriptSearchMatchKey as yi, imageProtocolPreference as yn, markdownTheme as yr, planVisualPlacement as yt, contextPresentationKind as z, FooterCustomItemCatalog as zn, TransitionInProgressError as zr, viewerAccessHint as zt };