@linxiraos/pi-tui 1.4.7 → 1.4.10

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 (181) hide show
  1. package/CHANGELOG.md +154 -231
  2. package/README.md +7 -1
  3. package/dist/types/app-keybindings.d.ts +5 -0
  4. package/dist/types/charts/table-data.d.ts +4 -2
  5. package/dist/types/chat/bash-execution.d.ts +4 -1
  6. package/dist/types/chat/eval-execution.d.ts +2 -0
  7. package/dist/types/chat/execution-shared.d.ts +14 -8
  8. package/dist/types/chat/figure-markdown.d.ts +2 -0
  9. package/dist/types/chat/svg-figure.d.ts +5 -0
  10. package/dist/types/chat/table-chart.d.ts +2 -0
  11. package/dist/types/chat/transcript-render-helpers.d.ts +11 -3
  12. package/dist/types/chrome/dynamic-border.d.ts +6 -0
  13. package/dist/types/chrome/transcript-status.d.ts +2 -2
  14. package/dist/types/components/editor.d.ts +15 -6
  15. package/dist/types/components/image.d.ts +6 -0
  16. package/dist/types/components/loader.d.ts +2 -0
  17. package/dist/types/keybinding-matchers.d.ts +7 -0
  18. package/dist/types/native/describe.d.ts +4 -2
  19. package/dist/types/native/node.d.ts +2 -3
  20. package/dist/types/native/overlay.d.ts +42 -2
  21. package/dist/types/native/state.d.ts +4 -0
  22. package/dist/types/overlays/btw-history-panel.d.ts +15 -0
  23. package/dist/types/overlays/btw-history.d.ts +24 -0
  24. package/dist/types/overlays/btw-inject.d.ts +22 -0
  25. package/dist/types/overlays/btw-panel.d.ts +7 -0
  26. package/dist/types/overlays/hook-editor.d.ts +2 -0
  27. package/dist/types/overlays/jobs-panel.d.ts +4 -0
  28. package/dist/types/overlays/model-browser.d.ts +1 -1
  29. package/dist/types/overlays/session-selector.d.ts +11 -2
  30. package/dist/types/prompt/composer.d.ts +13 -5
  31. package/dist/types/render/render-utils.d.ts +23 -1
  32. package/dist/types/setup/scenes/language.d.ts +3 -0
  33. package/dist/types/setup/scenes/types.d.ts +5 -0
  34. package/dist/types/setup/setup-version.d.ts +1 -1
  35. package/dist/types/setup/wizard.d.ts +1 -1
  36. package/dist/types/status-line/startup.d.ts +0 -15
  37. package/dist/types/terminal-capabilities.d.ts +1 -1
  38. package/dist/types/theme/symbols.d.ts +3 -1
  39. package/dist/types/theme/theme-class.d.ts +1 -0
  40. package/dist/types/theme/theme.d.ts +1 -1
  41. package/dist/types/theme/tui-adapters.d.ts +2 -0
  42. package/dist/types/thinking.d.ts +8 -6
  43. package/dist/types/tools/ast-grep.d.ts +2 -0
  44. package/dist/types/tools/eval.d.ts +2 -0
  45. package/dist/types/tools/find.d.ts +1 -1
  46. package/dist/types/tools/grouped-file-output.d.ts +100 -19
  47. package/dist/types/tools/hashline-format.d.ts +5 -0
  48. package/dist/types/tools/native-view.d.ts +2 -0
  49. package/dist/types/tools/output-meta.d.ts +27 -0
  50. package/dist/types/tools/read.d.ts +14 -4
  51. package/dist/types/tools/task.d.ts +4 -3
  52. package/dist/types/tools/wait.d.ts +2 -0
  53. package/dist/types/tui.d.ts +12 -0
  54. package/dist/types/utils.d.ts +4 -0
  55. package/package.json +9 -9
  56. package/src/app-keybindings.d.ts +5 -0
  57. package/src/app-keybindings.ts +5 -0
  58. package/src/apps/git/git-tui.ts +10 -17
  59. package/src/apps/git/sidebar.ts +21 -35
  60. package/src/apps/ps-top.ts +4 -12
  61. package/src/charts/chart-plan.ts +0 -29
  62. package/src/charts/table-data.d.ts +4 -2
  63. package/src/charts/table-data.ts +55 -6
  64. package/src/chat/bash-execution.d.ts +4 -1
  65. package/src/chat/bash-execution.ts +20 -9
  66. package/src/chat/chat-transcript-builder.ts +5 -2
  67. package/src/chat/eval-execution.d.ts +2 -0
  68. package/src/chat/eval-execution.ts +14 -7
  69. package/src/chat/execution-shared.d.ts +14 -8
  70. package/src/chat/execution-shared.ts +39 -18
  71. package/src/chat/figure-markdown.d.ts +2 -0
  72. package/src/chat/figure-markdown.ts +6 -4
  73. package/src/chat/read-tool-group.ts +56 -36
  74. package/src/chat/svg-figure.d.ts +5 -0
  75. package/src/chat/svg-figure.ts +55 -16
  76. package/src/chat/table-chart.d.ts +2 -0
  77. package/src/chat/table-chart.ts +19 -2
  78. package/src/chat/transcript-render-helpers.d.ts +11 -3
  79. package/src/chat/transcript-render-helpers.ts +70 -22
  80. package/src/chrome/dynamic-border.d.ts +6 -0
  81. package/src/chrome/dynamic-border.ts +28 -2
  82. package/src/chrome/transcript-status.d.ts +2 -2
  83. package/src/chrome/transcript-status.ts +5 -3
  84. package/src/components/editor.d.ts +15 -6
  85. package/src/components/editor.ts +123 -24
  86. package/src/components/image.d.ts +6 -0
  87. package/src/components/image.ts +13 -0
  88. package/src/components/key-value-list.ts +9 -9
  89. package/src/components/loader.d.ts +2 -0
  90. package/src/components/loader.ts +7 -0
  91. package/src/components/section.ts +1 -9
  92. package/src/components/table.ts +1 -9
  93. package/src/keybinding-matchers.d.ts +7 -0
  94. package/src/keybinding-matchers.ts +13 -0
  95. package/src/native/backend.ts +7 -3
  96. package/src/native/describe.d.ts +4 -2
  97. package/src/native/describe.ts +9 -4
  98. package/src/native/node.d.ts +2 -3
  99. package/src/native/node.ts +2 -3
  100. package/src/native/overlay.d.ts +42 -2
  101. package/src/native/overlay.ts +124 -16
  102. package/src/native/state.d.ts +4 -0
  103. package/src/native/state.ts +25 -5
  104. package/src/overlays/btw-history-panel.ts +106 -14
  105. package/src/overlays/btw-history.ts +65 -0
  106. package/src/overlays/btw-inject.ts +91 -0
  107. package/src/overlays/btw-panel.ts +53 -12
  108. package/src/overlays/extensions/extension-dashboard.ts +7 -8
  109. package/src/overlays/hook-editor.ts +6 -0
  110. package/src/overlays/jobs-panel.ts +82 -22
  111. package/src/overlays/login-dialog.ts +8 -26
  112. package/src/overlays/model-browser.ts +69 -10
  113. package/src/overlays/session-selector.ts +25 -5
  114. package/src/overlays/settings-defs.ts +2 -2
  115. package/src/overlays/settings-selector.ts +113 -11
  116. package/src/overlays/tree-selector.ts +83 -27
  117. package/src/overlays/usage-dashboard.ts +4 -6
  118. package/src/prompt/composer.ts +17 -5
  119. package/src/render/code-cell.ts +1 -1
  120. package/src/render/file-list.ts +4 -7
  121. package/src/render/render-utils.d.ts +23 -1
  122. package/src/render/render-utils.ts +38 -6
  123. package/src/setup/scenes/glyph.ts +1 -1
  124. package/src/setup/scenes/language.ts +122 -0
  125. package/src/setup/scenes/types.ts +6 -0
  126. package/src/setup/setup-version.ts +1 -1
  127. package/src/setup/wizard.ts +2 -0
  128. package/src/status-line/startup.ts +36 -70
  129. package/src/terminal-capabilities.d.ts +1 -1
  130. package/src/terminal-capabilities.ts +5 -0
  131. package/src/theme/symbols.d.ts +3 -1
  132. package/src/theme/symbols.ts +16 -9
  133. package/src/theme/theme-class.d.ts +1 -0
  134. package/src/theme/theme-class.ts +15 -3
  135. package/src/theme/theme.d.ts +1 -1
  136. package/src/theme/theme.ts +1 -0
  137. package/src/theme/tui-adapters.d.ts +2 -0
  138. package/src/theme/tui-adapters.ts +8 -3
  139. package/src/thinking.d.ts +8 -6
  140. package/src/thinking.ts +17 -11
  141. package/src/tmux.ts +1 -0
  142. package/src/tools/agent-tree.ts +13 -11
  143. package/src/tools/ask.ts +24 -37
  144. package/src/tools/ast-edit.ts +48 -93
  145. package/src/tools/ast-grep.d.ts +2 -0
  146. package/src/tools/ast-grep.ts +31 -67
  147. package/src/tools/bash.ts +7 -0
  148. package/src/tools/default-renderer.ts +1 -1
  149. package/src/tools/edit.ts +50 -43
  150. package/src/tools/eval.d.ts +2 -0
  151. package/src/tools/eval.ts +2 -0
  152. package/src/tools/fetch.ts +2 -1
  153. package/src/tools/find.d.ts +1 -1
  154. package/src/tools/find.ts +13 -5
  155. package/src/tools/github.ts +14 -46
  156. package/src/tools/glob.ts +2 -1
  157. package/src/tools/grep.ts +47 -277
  158. package/src/tools/grouped-file-output.d.ts +100 -19
  159. package/src/tools/grouped-file-output.ts +414 -103
  160. package/src/tools/hashline-format.d.ts +5 -0
  161. package/src/tools/hashline-format.ts +5 -0
  162. package/src/tools/json-tree.ts +1 -5
  163. package/src/tools/lsp.ts +210 -32
  164. package/src/tools/native-view.d.ts +2 -0
  165. package/src/tools/native-view.ts +11 -5
  166. package/src/tools/output-meta.d.ts +27 -0
  167. package/src/tools/output-meta.ts +68 -4
  168. package/src/tools/proc-render.ts +3 -3
  169. package/src/tools/read.d.ts +14 -4
  170. package/src/tools/read.ts +20 -5
  171. package/src/tools/task.d.ts +4 -3
  172. package/src/tools/task.ts +41 -81
  173. package/src/tools/vibe.ts +4 -4
  174. package/src/tools/wait.d.ts +2 -0
  175. package/src/tools/wait.ts +8 -5
  176. package/src/tools/write.ts +17 -27
  177. package/src/tools/yield.ts +1 -1
  178. package/src/tui.d.ts +12 -0
  179. package/src/tui.ts +91 -9
  180. package/src/utils.d.ts +4 -0
  181. package/src/utils.ts +10 -0
@@ -49,6 +49,8 @@ export declare const PREVIEW_LIMITS: {
49
49
  readonly EXPANDED_LINES: 12;
50
50
  /** Items (files, results) shown in collapsed view */
51
51
  readonly COLLAPSED_ITEMS: 8;
52
+ /** Definition, type-definition and implementation locations shown in collapsed view */
53
+ readonly LOCATIONS_COLLAPSED: 2;
52
54
  /** Output preview lines in collapsed view */
53
55
  readonly OUTPUT_COLLAPSED: 3;
54
56
  /** Output preview lines in expanded view */
@@ -188,11 +190,31 @@ export declare function formatErrorMessage(message: string | undefined, theme: T
188
190
  export declare function formatErrorDetail(message: string | undefined, theme: Theme): string;
189
191
  /** Render a muted empty-state message with a warning icon. */
190
192
  export declare function formatEmptyMessage(message: string, theme: Theme): string;
193
+ /**
194
+ * Color of a file's name, or a whole URL, in tool bodies: it keeps paths apart
195
+ * from the tool titles above them (bronze in titanium).
196
+ */
197
+ export declare const FILE_NAME_COLOR = "customMessageLabel";
198
+ /**
199
+ * Where a display path's final segment (file or folder name) starts, past its
200
+ * last `/` or `\` separator; a trailing-slash directory keeps its slash on the
201
+ * name. Shared by the terminal ({@link formatStyledPath}) and Tern file rows.
202
+ */
203
+ export declare function pathNameStart(filePath: string): number;
204
+ /**
205
+ * A file path in a tool body: the directory (with its trailing separator) dim,
206
+ * the final segment in {@link FILE_NAME_COLOR}. Tool headers keep paths in
207
+ * their plain subject color instead.
208
+ */
209
+ export declare function formatStyledPath(filePath: string, theme: Theme): string;
191
210
  /** Marker displayed in the gutter of a code frame. */
192
211
  export type CodeFrameMarker = "" | " " | "*" | "+" | "-" | ">";
193
212
  /** Format a code-frame row with a padded line-number gutter. */
194
213
  export declare function formatCodeFrameLine(marker: CodeFrameMarker, lineNumber: string | number, content: string, lineNumberWidth: number): string;
195
- /** Status states supported by shared tool renderer icons. */
214
+ /**
215
+ * Status states supported by shared tool renderer icons. `done` is a deprecated
216
+ * alias of `success`, kept for extension renderers.
217
+ */
196
218
  export type ToolUIStatus = "success" | "done" | "error" | "warning" | "info" | "pending" | "running" | "aborted";
197
219
  /** Semantic foreground colors used by tool renderer labels. */
198
220
  export type ToolUIColor = "success" | "error" | "warning" | "accent" | "muted";
@@ -13,7 +13,7 @@ import { expandWindowsLongPath, getWindowsShortPath } from "@linxiraos/pi-native
13
13
  import { pluralize, sanitizeText } from "@linxiraos/pi-utils";
14
14
  import { formatKeyHint, type KeyId } from "../app-keybindings";
15
15
  import { getKeybindings } from "../keybindings";
16
- import type { Theme } from "../theme/theme";
16
+ import type { Theme, ThemeColor } from "../theme/theme";
17
17
  import type { Component } from "../tui";
18
18
  import { replaceTabs, sliceByColumn, truncateToWidth, visibleWidth, wrapTextWithAnsi } from "../utils";
19
19
  import { Hasher } from "./utils";
@@ -103,6 +103,8 @@ export const PREVIEW_LIMITS = {
103
103
  EXPANDED_LINES: 12,
104
104
  /** Items (files, results) shown in collapsed view */
105
105
  COLLAPSED_ITEMS: 8,
106
+ /** Definition, type-definition and implementation locations shown in collapsed view */
107
+ LOCATIONS_COLLAPSED: 2,
106
108
  /** Output preview lines in collapsed view */
107
109
  OUTPUT_COLLAPSED: 3,
108
110
  /** Output preview lines in expanded view */
@@ -291,9 +293,8 @@ export { formatAge, formatBytes, formatCount, formatDuration, formatNumber, plur
291
293
  export function formatStatusIcon(status: ToolUIStatus, theme: Theme, spinnerFrame?: number): string {
292
294
  switch (status) {
293
295
  case "success":
294
- return theme.styledSymbol("status.success", "success");
295
296
  case "done":
296
- return theme.styledSymbol("status.done", "success");
297
+ return theme.styledSymbol("status.success", "success");
297
298
  case "error":
298
299
  return theme.styledSymbol("status.error", "error");
299
300
  case "warning":
@@ -433,6 +434,34 @@ export function formatEmptyMessage(message: string, theme: Theme): string {
433
434
  return `${theme.styledSymbol("status.warning", "warning")} ${theme.fg("muted", message)}`;
434
435
  }
435
436
 
437
+ /**
438
+ * Color of a file's name, or a whole URL, in tool bodies: it keeps paths apart
439
+ * from the tool titles above them (bronze in titanium).
440
+ */
441
+ export const FILE_NAME_COLOR = "customMessageLabel" satisfies ThemeColor;
442
+
443
+ /**
444
+ * Where a display path's final segment (file or folder name) starts, past its
445
+ * last `/` or `\` separator; a trailing-slash directory keeps its slash on the
446
+ * name. Shared by the terminal ({@link formatStyledPath}) and Tern file rows.
447
+ */
448
+ export function pathNameStart(filePath: string): number {
449
+ let end = filePath.length;
450
+ while (end > 0 && (filePath[end - 1] === "/" || filePath[end - 1] === "\\")) end--;
451
+ return end === 0 ? 0 : Math.max(filePath.lastIndexOf("/", end - 1), filePath.lastIndexOf("\\", end - 1)) + 1;
452
+ }
453
+
454
+ /**
455
+ * A file path in a tool body: the directory (with its trailing separator) dim,
456
+ * the final segment in {@link FILE_NAME_COLOR}. Tool headers keep paths in
457
+ * their plain subject color instead.
458
+ */
459
+ export function formatStyledPath(filePath: string, theme: Theme): string {
460
+ const cut = pathNameStart(filePath);
461
+ const name = theme.fg(FILE_NAME_COLOR, filePath.slice(cut));
462
+ return cut > 0 ? `${theme.fg("dim", filePath.slice(0, cut))}${name}` : name;
463
+ }
464
+
436
465
  // =============================================================================
437
466
  // Code Frame Formatting
438
467
  // =============================================================================
@@ -457,7 +486,10 @@ export function formatCodeFrameLine(
457
486
  // Tool UI Helpers
458
487
  // =============================================================================
459
488
 
460
- /** Status states supported by shared tool renderer icons. */
489
+ /**
490
+ * Status states supported by shared tool renderer icons. `done` is a deprecated
491
+ * alias of `success`, kept for extension renderers.
492
+ */
461
493
  export type ToolUIStatus = "success" | "done" | "error" | "warning" | "info" | "pending" | "running" | "aborted";
462
494
  /** Semantic foreground colors used by tool renderer labels. */
463
495
  export type ToolUIColor = "success" | "error" | "warning" | "accent" | "muted";
@@ -598,7 +630,7 @@ export function formatDiagnostics(
598
630
  const fileBranch = isLastFileNode ? theme.tree.last : theme.tree.branch;
599
631
 
600
632
  const fileIcon = theme.fg("muted", getLangIcon(filePath));
601
- output += `\n ${theme.fg("dim", fileBranch)} ${fileIcon} ${theme.fg("accent", filePath)}`;
633
+ output += `\n ${theme.fg("dim", fileBranch)} ${fileIcon} ${formatStyledPath(filePath, theme)}`;
602
634
 
603
635
  for (let di = 0; di < diagnostics.length && diagsShown < maxDiags; di++) {
604
636
  const d = diagnostics[di];
@@ -622,7 +654,7 @@ export function formatDiagnostics(
622
654
  : d.severity === "warning"
623
655
  ? theme.styledSymbol("status.warning", "warning")
624
656
  : theme.styledSymbol("status.info", "muted");
625
- const location = theme.fg("dim", `:${d.line}:${d.col}`);
657
+ const location = theme.fg("muted", `:${d.line}:${d.col}`);
626
658
  const codeTag = d.code ? theme.fg("dim", ` (${d.code})`) : "";
627
659
  const msgColor = d.severity === "error" ? "error" : d.severity === "warning" ? "warning" : "toolOutput";
628
660
 
@@ -21,7 +21,7 @@ const GLYPH_LABELS: Readonly<Record<SymbolPreset, string>> = {
21
21
  const GLYPH_SAMPLES: Readonly<Record<SymbolPreset, string>> = {
22
22
  nerd: "   󰉋 ",
23
23
  unicode: "✔ ✖ 📁 ⬢ ╭─╮ ├─ • ⠋ →",
24
- ascii: "[ok] [x] > + [D] +-+ |-- * ->",
24
+ ascii: "[+] [-] > + [D] +-+ |-- * ->",
25
25
  };
26
26
 
27
27
  /** One picker row per preset; the description column shows live sample glyphs instead of prose. */
@@ -0,0 +1,122 @@
1
+ import { type SelectItem, SelectList } from "../../components/select-list";
2
+ import { Text } from "../../components/text";
3
+ import { WizardStep } from "../../components/wizard-step";
4
+ import { getSelectListTheme } from "../../theme/theme";
5
+ import { tuiText } from "../../i18n";
6
+ import { col, span, text } from "../../native/describe";
7
+ import type { NativeNode } from "../../native/node";
8
+ import { Memo } from "../../native/memo";
9
+ import type { SetupLanguage, SetupScene, SetupSceneController, SetupSceneHost } from "./types";
10
+
11
+ /** The two catalogues shipped by the coding agent. Values match `cfgLanguage`. */
12
+ const LANGUAGE_ITEMS: readonly SelectItem[] = [
13
+ { value: "en", label: "English", description: "English interface" },
14
+ { value: "zh", label: "简体中文", description: "Chinese interface" },
15
+ ];
16
+
17
+ class LanguageSceneController implements SetupSceneController {
18
+ get title(): string {
19
+ return tuiText("setupLanguageTitle", "Choose language");
20
+ }
21
+
22
+ get subtitle(): string {
23
+ return tuiText("setupLanguageSubtitle", "Choose the language for the CLI and settings.");
24
+ }
25
+
26
+ readonly #host: SetupSceneHost;
27
+ readonly #selectList: SelectList;
28
+ readonly #native = new Memo();
29
+ #step: WizardStep | undefined;
30
+ #committing = false;
31
+
32
+ constructor(host: SetupSceneHost) {
33
+ this.#host = host;
34
+ this.#selectList = new SelectList(LANGUAGE_ITEMS, LANGUAGE_ITEMS.length, getSelectListTheme());
35
+ const currentIndex = LANGUAGE_ITEMS.findIndex(item => item.value === host.ctx.language);
36
+ this.#selectList.setSelectedIndex(currentIndex >= 0 ? currentIndex : 0);
37
+ this.#selectList.onSelect = item => {
38
+ void this.#commit(item.value as SetupLanguage);
39
+ };
40
+ this.#selectList.onCancel = () => host.finish("skipped");
41
+ }
42
+
43
+ invalidate(): void {
44
+ this.#native.clear();
45
+ if (this.#step) this.#step.invalidate();
46
+ else this.#selectList.invalidate();
47
+ }
48
+
49
+ handleInput(data: string): void {
50
+ if (this.#committing) return;
51
+ if (this.#step) this.#step.handleInput(data);
52
+ else this.#selectList.handleInput(data);
53
+ }
54
+
55
+ routeMouse(event: Parameters<SelectList["routeMouse"]>[0], line: number, col: number): void {
56
+ if (this.#committing) return;
57
+ this.#step?.routeMouse(event, line, col);
58
+ }
59
+
60
+ render(width: number, maxLines?: number): readonly string[] {
61
+ if (!this.#step) {
62
+ this.#step = new WizardStep({
63
+ kind: "choice",
64
+ intro: new Text(
65
+ tuiText("setupLanguageHint", "The choice applies to the rest of onboarding immediately."),
66
+ 0,
67
+ 0,
68
+ ),
69
+ content: this.#selectList,
70
+ minContentLines: LANGUAGE_ITEMS.length,
71
+ fitContent: () => {
72
+ this.#selectList.setMaxVisible(LANGUAGE_ITEMS.length);
73
+ },
74
+ });
75
+ }
76
+ this.#step.setMaxHeight(maxLines);
77
+ return this.#step.render(width);
78
+ }
79
+
80
+ describe(): NativeNode {
81
+ return this.#native.get([this.#selectList], () =>
82
+ col(
83
+ [
84
+ text([
85
+ span(
86
+ tuiText("setupLanguageHint", "The choice applies to the rest of onboarding immediately."),
87
+ "muted",
88
+ ),
89
+ ]),
90
+ this.#selectList,
91
+ ],
92
+ { gap: "sm", role: "zeta.setup.language" },
93
+ ),
94
+ );
95
+ }
96
+
97
+ async #commit(language: SetupLanguage): Promise<void> {
98
+ if (this.#committing) return;
99
+ this.#committing = true;
100
+ try {
101
+ await this.#host.ctx.saveLanguage(language);
102
+ this.#host.ctx.ui.invalidate();
103
+ this.#host.requestRender();
104
+ this.#host.finish("done");
105
+ } catch (error) {
106
+ this.#committing = false;
107
+ this.#host.ctx.showError(`Could not save the language: ${error instanceof Error ? error.message : error}`);
108
+ this.#host.requestRender();
109
+ }
110
+ }
111
+ }
112
+
113
+ /** Pick the UI and settings language before the provider/model scenes run. */
114
+ export const languageSetupScene: SetupScene = {
115
+ id: "language",
116
+ get title(): string {
117
+ return tuiText("setupLanguageTitle", "Choose language");
118
+ },
119
+ step: "Language",
120
+ minVersion: 3,
121
+ mount: host => new LanguageSceneController(host),
122
+ };
@@ -13,6 +13,9 @@ export interface StyledLine {
13
13
  readonly color: ThemeColor;
14
14
  }
15
15
 
16
+ /** Catalogue tag selectable during onboarding. */
17
+ export type SetupLanguage = "en" | "zh";
18
+
16
19
  /** Terminal capabilities used by setup overlays and the startup splash. */
17
20
  export interface SetupUiHost {
18
21
  readonly ui: Pick<TUI, "showOverlay" | "setFocus" | "requestRender" | "invalidate"> & {
@@ -27,6 +30,8 @@ export interface SetupHost extends SetupUiHost {
27
30
  readonly symbolPreset: SymbolPreset;
28
31
  readonly colorBlindMode: boolean;
29
32
  readonly disabledProviders: readonly string[];
33
+ /** Effective UI/settings language; the onboarding language scene starts here. */
34
+ readonly language: SetupLanguage;
30
35
  readonly authStorage: AuthStorage;
31
36
  readonly modelSource: ModelBrowserSource;
32
37
  /** Available and catalog models of every kind; role chips resolve over all of them, rows list chat models. */
@@ -36,6 +41,7 @@ export interface SetupHost extends SetupUiHost {
36
41
  refreshProvider(provider: string): Promise<void>;
37
42
  saveComposerShape(shape: ComposerShape): Promise<void>;
38
43
  saveSymbolPreset(preset: SymbolPreset): void;
44
+ saveLanguage(language: SetupLanguage): Promise<void> | void;
39
45
  saveColorBlindMode(enabled: boolean): void;
40
46
  saveTheme(mode: "dark" | "light", name: string): void;
41
47
  captureBrowserSession(request: OAuthBrowserSessionRequest, signal?: AbortSignal): Promise<string>;
@@ -8,4 +8,4 @@
8
8
  * the overlay component and their TUI deps. MUST equal `max(scene.minVersion)`
9
9
  * across `ALL_SCENES`; the setup scene selection tests guard this invariant.
10
10
  */
11
- export const CURRENT_SETUP_VERSION = 2;
11
+ export const CURRENT_SETUP_VERSION = 3;
@@ -2,6 +2,7 @@ import { CURRENT_SETUP_VERSION } from "./setup-version";
2
2
  import type { SetupHost } from "./scenes/types";
3
3
  import { composerSetupScene } from "./scenes/composer";
4
4
  import { glyphSetupScene } from "./scenes/glyph";
5
+ import { languageSetupScene } from "./scenes/language";
5
6
  import { modelSetupScene } from "./scenes/model";
6
7
  import { providersSetupScene } from "./scenes/sign-in";
7
8
  import { themeSetupScene } from "./scenes/theme";
@@ -15,6 +16,7 @@ export { CURRENT_SETUP_VERSION };
15
16
 
16
17
  /** Ordered onboarding scenes with independent version gates. */
17
18
  export const ALL_SCENES = [
19
+ languageSetupScene,
18
20
  providersSetupScene,
19
21
  modelSetupScene,
20
22
  glyphSetupScene,
@@ -13,9 +13,9 @@
13
13
  * statusLine.attachToEditor(editor, getComposerStyle(shape));
14
14
  * ```
15
15
  */
16
+ import { type } from "@linxiraos/pi-omptype";
16
17
  import type { ThinkingLevel } from "@linxiraos/pi-agent-core";
17
18
  import type { Model } from "@linxiraos/pi-catalog/types";
18
- import { isRecord } from "@linxiraos/pi-utils/type-guards";
19
19
  import { parseThinkingLevel } from "../thinking";
20
20
  import { StatusLineComponent } from "./component";
21
21
  import type { CompactionBoundaries } from "./context-usage";
@@ -100,82 +100,48 @@ export function createStartupStatusLine(data: StatusLineStartupData): StatusLine
100
100
  return statusLine;
101
101
  }
102
102
 
103
- function isOneOf<T extends string>(values: readonly T[], value: unknown): value is T {
104
- return typeof value === "string" && values.some(candidate => candidate === value);
105
- }
106
-
107
- function isOptionalBoolean(value: unknown): boolean {
108
- return value === undefined || typeof value === "boolean";
109
- }
110
-
111
- function isSegmentList(value: unknown): boolean {
112
- return value === undefined || (Array.isArray(value) && value.every(id => isOneOf(STATUS_LINE_SEGMENT_IDS, id)));
113
- }
103
+ const SegmentIds = type.enumerated(...STATUS_LINE_SEGMENT_IDS).array();
114
104
 
115
105
  /** Shallow check of persisted settings; nested segment options are trusted as written by this version. */
116
- function isStatusLineSettings(value: unknown): value is StatusLineSettings {
117
- return (
118
- isRecord(value) &&
119
- (value.preset === undefined || isOneOf(STATUS_LINE_PRESET_VALUES, value.preset)) &&
120
- isSegmentList(value.leftSegments) &&
121
- isSegmentList(value.rightSegments) &&
122
- (value.separator === undefined || isOneOf(STATUS_LINE_SEPARATOR_VALUES, value.separator)) &&
123
- (value.segmentOptions === undefined || isRecord(value.segmentOptions)) &&
124
- (value.contextLine === undefined || isOneOf(CONTEXT_LINE_MODE_VALUES, value.contextLine)) &&
125
- isOptionalBoolean(value.showHookStatus) &&
126
- isOptionalBoolean(value.sessionAccent) &&
127
- isOptionalBoolean(value.transparent) &&
128
- isOptionalBoolean(value.compactThinkingLevel)
129
- );
130
- }
131
-
132
- /** Check the model fields the status line reads; the rest is trusted as serialized by this version. */
133
- function isPersistedModel(value: unknown): value is Model {
134
- return (
135
- isRecord(value) &&
136
- typeof value.id === "string" &&
137
- typeof value.name === "string" &&
138
- typeof value.provider === "string" &&
139
- typeof value.api === "string" &&
140
- typeof value.contextWindow === "number"
141
- );
142
- }
106
+ const StatusLineSettingsShape = type({
107
+ "preset?": type.enumerated(...STATUS_LINE_PRESET_VALUES),
108
+ "leftSegments?": SegmentIds,
109
+ "rightSegments?": SegmentIds,
110
+ "separator?": type.enumerated(...STATUS_LINE_SEPARATOR_VALUES),
111
+ "segmentOptions?": "Record<string, unknown>",
112
+ "contextLine?": type.enumerated(...CONTEXT_LINE_MODE_VALUES),
113
+ "showHookStatus?": "boolean",
114
+ "sessionAccent?": "boolean",
115
+ "transparent?": "boolean",
116
+ "compactThinkingLevel?": "boolean",
117
+ });
143
118
 
144
- function readCompactionBoundaries(value: unknown): CompactionBoundaries | null | undefined {
145
- if (value === null) return null;
146
- if (!isRecord(value) || typeof value.thresholdPercent !== "number") return undefined;
147
- const speculationPercent = value.speculationPercent;
148
- if (speculationPercent !== null && typeof speculationPercent !== "number") return undefined;
149
- return { thresholdPercent: value.thresholdPercent, speculationPercent };
150
- }
119
+ const StartupDataShape = type({
120
+ "+": "delete",
121
+ settings: StatusLineSettingsShape,
122
+ gitEnabled: "boolean",
123
+ // Only the fields the status line reads; the rest is trusted as serialized by this version.
124
+ "model?": { id: "string", name: "string", provider: "string", api: "string", contextWindow: "number" },
125
+ "thinkingLevel?": "string",
126
+ autoThinking: "boolean",
127
+ fastMode: "boolean",
128
+ usingSubscription: "boolean",
129
+ autoCompactEnabled: "boolean",
130
+ compactionBoundaries: type({ "+": "delete", thresholdPercent: "number", speculationPercent: "number | null" }).or(
131
+ "null",
132
+ ),
133
+ });
151
134
 
152
135
  /** Validate persisted {@link StatusLineStartupData}; `undefined` for anything malformed. */
153
136
  export function readStatusLineStartupData(value: unknown): StatusLineStartupData | undefined {
154
- if (!isRecord(value) || !isStatusLineSettings(value.settings)) return undefined;
155
- const model = value.model;
156
- if (model !== undefined && !isPersistedModel(model)) return undefined;
157
- const thinkingLevel = typeof value.thinkingLevel === "string" ? parseThinkingLevel(value.thinkingLevel) : undefined;
158
- if (value.thinkingLevel !== undefined && thinkingLevel === undefined) return undefined;
159
- const compactionBoundaries = readCompactionBoundaries(value.compactionBoundaries);
160
- if (
161
- typeof value.gitEnabled !== "boolean" ||
162
- typeof value.autoThinking !== "boolean" ||
163
- typeof value.fastMode !== "boolean" ||
164
- typeof value.usingSubscription !== "boolean" ||
165
- typeof value.autoCompactEnabled !== "boolean" ||
166
- compactionBoundaries === undefined
167
- ) {
168
- return undefined;
169
- }
137
+ const data = StartupDataShape(value);
138
+ if (data instanceof type.errors) return undefined;
139
+ const thinkingLevel = data.thinkingLevel === undefined ? undefined : parseThinkingLevel(data.thinkingLevel);
140
+ if (data.thinkingLevel !== undefined && thinkingLevel === undefined) return undefined;
170
141
  return {
171
- settings: value.settings,
172
- gitEnabled: value.gitEnabled,
173
- model,
142
+ ...data,
143
+ settings: data.settings as StatusLineSettings,
144
+ model: data.model as Model | undefined,
174
145
  thinkingLevel,
175
- autoThinking: value.autoThinking,
176
- fastMode: value.fastMode,
177
- usingSubscription: value.usingSubscription,
178
- autoCompactEnabled: value.autoCompactEnabled,
179
- compactionBoundaries,
180
146
  };
181
147
  }
@@ -18,7 +18,7 @@ export declare enum NotifyProtocol {
18
18
  Osc99 = "\u001B]99;;",
19
19
  Osc9 = "\u001B]9;"
20
20
  }
21
- export type TerminalId = "kitty" | "ghostty" | "wezterm" | "iterm2" | "vscode" | "alacritty" | "warp" | "orca" | "otty" | "rio" | "tern" | "monstar" | "zetawork" | "base" | "trueColor";
21
+ export type TerminalId = "kitty" | "ghostty" | "wezterm" | "iterm2" | "vscode" | "alacritty" | "warp" | "orca" | "otty" | "rio" | "tern" | "monstar" | "rex" | "zetawork" | "base" | "trueColor";
22
22
  /** Terminal capability details used for rendering and protocol selection. */
23
23
  export declare class TerminalInfo {
24
24
  readonly id: TerminalId;
@@ -67,6 +67,7 @@ export type TerminalId =
67
67
  | "rio"
68
68
  | "tern"
69
69
  | "monstar"
70
+ | "rex"
70
71
  | "zetawork"
71
72
  | "base"
72
73
  | "trueColor";
@@ -644,6 +645,8 @@ const KNOWN_TERMINALS = Object.freeze({
644
645
  // OSC 99, and OSC 66 text sizing are outside rio's supported set and keep
645
646
  // the conservative defaults.
646
647
  rio: new TerminalInfo("rio", ImageProtocol.Kitty, true, true),
648
+ // Rex (TERM_PROGRAM=rex / TERM=xterm-rex): only Kitty graphics is confirmed.
649
+ rex: new TerminalInfo("rex", ImageProtocol.Kitty, true, false),
647
650
  // Tern (Stencil's terminal, `stencil-term`) sets TERM_PROGRAM=tern and
648
651
  // implements Kitty graphics, OSC 8 and OSC 9/99 notifications. Whether zeta
649
652
  // renders natively (Tern Surface Protocol) is decided by the `hello`
@@ -693,6 +696,7 @@ export function detectTerminalId(env: NodeJS.ProcessEnv = Bun.env): TerminalId {
693
696
  if (caseEq(program, "rio")) return "rio";
694
697
  if (caseEq(program, "tern")) return "tern";
695
698
  if (caseEq(program, "monstar")) return "monstar";
699
+ if (caseEq(program, "rex")) return "rex";
696
700
  if (caseEq(program, "zetawork")) return "zetawork";
697
701
  return null;
698
702
  }
@@ -745,6 +749,7 @@ export function detectTerminalId(env: NodeJS.ProcessEnv = Bun.env): TerminalId {
745
749
 
746
750
  if (TERM?.toLowerCase().includes("ghostty")) return "ghostty";
747
751
  if (TERM && caseEq(TERM, "monstar")) return "monstar";
752
+ if (TERM && caseEq(TERM, "xterm-rex")) return "rex";
748
753
 
749
754
  if (COLORTERM) {
750
755
  if (caseEq(COLORTERM, "truecolor") || caseEq(COLORTERM, "24bit")) return "trueColor";
@@ -2,7 +2,9 @@ export type SymbolPreset = "unicode" | "nerd" | "ascii";
2
2
  /**
3
3
  * All available symbol keys organized by category.
4
4
  */
5
- export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted" | "status.done" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "progress.filled" | "progress.empty" | "context.speculation" | "context.compaction" | "context.content" | "context.messages" | "context.buffer" | "context.free" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxDotted.horizontal" | "boxDotted.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.powerlineCapLeft" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.prewalk" | "icon.goal" | "icon.pause" | "icon.loop" | "icon.folder" | "icon.worktree" | "icon.search" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.pin" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.subscription" | "icon.advisor" | "icon.advisorClosed" | "icon.time" | "icon.omp" | "icon.ghost" | "icon.agents" | "icon.job" | "icon.cache" | "icon.cacheMiss" | "icon.input" | "icon.output" | "icon.throughput" | "icon.intelligence" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.vimNormal" | "icon.vimInsert" | "icon.vimVisual" | "icon.vimVisualLine" | "icon.vimReplace" | "cmd.action" | "cmd.prompt" | "cmd.extension" | "cmd.settings" | "cmd.gear" | "cmd.shield" | "cmd.wave" | "cmd.compass" | "cmd.inbox" | "cmd.swap" | "cmd.expand" | "cmd.computer" | "cmd.eye" | "cmd.todo" | "cmd.stats" | "cmd.news" | "cmd.keyboard" | "cmd.export" | "cmd.clipboard" | "cmd.share" | "cmd.broadcast" | "cmd.globe" | "cmd.copy" | "cmd.plus" | "cmd.restart" | "cmd.eraser" | "cmd.trash" | "cmd.compress" | "cmd.vibrate" | "cmd.handoff" | "cmd.history" | "cmd.question" | "cmd.rocket" | "cmd.stethoscope" | "cmd.redo" | "cmd.bug" | "cmd.memory" | "cmd.pencil" | "cmd.folderMove" | "cmd.folderPlus" | "cmd.folderMinus" | "cmd.hammer" | "cmd.power" | "cmd.cart" | "icon.mic" | "icon.camera" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.max" | "thinking.autoPending" | "checkbox.checked" | "checkbox.unchecked" | "radio.selected" | "radio.unselected" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "md.colorSwatch" | "advisor.rail" | "skill.rail" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.julia" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "chip.image" | "chip.video" | "chip.paste" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.files" | "tab.shell" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tool.write" | "tool.edit" | "tool.bash" | "tool.ssh" | "tool.lsp" | "tool.gh" | "tool.webSearch" | "tool.exa" | "tool.browser" | "tool.eval" | "tool.debug" | "tool.mcp" | "tool.job" | "tool.launch" | "tool.task" | "tool.todo" | "tool.memory" | "tool.ask" | "tool.resolve" | "tool.review" | "tool.goal" | "tool.irc" | "tool.delete" | "tool.move" | "key.ctrl" | "key.ctrlMac" | "key.shift" | "key.alt" | "key.altMac" | "key.super" | "key.superMac" | "key.joiner" | "key.enter" | "key.esc" | "key.tab" | "key.backspace" | "key.delete" | "key.space" | "key.up" | "key.down" | "key.left" | "key.right";
5
+ export type SymbolKey = "status.success" | "status.error" | "status.warning" | "status.info" | "status.pending" | "status.disabled" | "status.enabled" | "status.running" | "status.shadowed" | "status.aborted"
6
+ /** @deprecated Alias of `status.success`; kept so extensions and theme overrides that name it keep working. */
7
+ | "status.done" | "nav.cursor" | "nav.selected" | "nav.expand" | "nav.collapse" | "nav.back" | "tree.branch" | "tree.last" | "tree.vertical" | "tree.horizontal" | "tree.hook" | "progress.filled" | "progress.empty" | "context.speculation" | "context.compaction" | "context.content" | "context.messages" | "context.buffer" | "context.free" | "boxRound.topLeft" | "boxRound.topRight" | "boxRound.bottomLeft" | "boxRound.bottomRight" | "boxRound.horizontal" | "boxRound.vertical" | "boxDotted.horizontal" | "boxDotted.vertical" | "boxSharp.topLeft" | "boxSharp.topRight" | "boxSharp.bottomLeft" | "boxSharp.bottomRight" | "boxSharp.horizontal" | "boxSharp.vertical" | "boxSharp.cross" | "boxSharp.teeDown" | "boxSharp.teeUp" | "boxSharp.teeRight" | "boxSharp.teeLeft" | "sep.powerline" | "sep.powerlineThin" | "sep.powerlineLeft" | "sep.powerlineRight" | "sep.powerlineThinLeft" | "sep.powerlineThinRight" | "sep.powerlineCapLeft" | "sep.block" | "sep.space" | "sep.asciiLeft" | "sep.asciiRight" | "sep.dot" | "sep.slash" | "sep.pipe" | "icon.model" | "icon.plan" | "icon.prewalk" | "icon.goal" | "icon.pause" | "icon.loop" | "icon.folder" | "icon.worktree" | "icon.search" | "icon.scratchFolder" | "icon.file" | "icon.git" | "icon.branch" | "icon.pr" | "icon.pin" | "icon.tokens" | "icon.context" | "icon.cost" | "icon.subscription" | "icon.advisor" | "icon.advisorClosed" | "icon.time" | "icon.omp" | "icon.ghost" | "icon.agents" | "icon.job" | "icon.cache" | "icon.cacheMiss" | "icon.input" | "icon.output" | "icon.throughput" | "icon.intelligence" | "icon.host" | "icon.session" | "icon.package" | "icon.warning" | "icon.rewind" | "icon.auto" | "icon.fast" | "icon.extensionSkill" | "icon.extensionTool" | "icon.extensionSlashCommand" | "icon.extensionMcp" | "icon.extensionRule" | "icon.extensionHook" | "icon.extensionPrompt" | "icon.extensionContextFile" | "icon.extensionInstruction" | "icon.vimNormal" | "icon.vimInsert" | "icon.vimVisual" | "icon.vimVisualLine" | "icon.vimReplace" | "cmd.action" | "cmd.prompt" | "cmd.extension" | "cmd.settings" | "cmd.gear" | "cmd.shield" | "cmd.wave" | "cmd.compass" | "cmd.inbox" | "cmd.swap" | "cmd.expand" | "cmd.computer" | "cmd.eye" | "cmd.todo" | "cmd.stats" | "cmd.news" | "cmd.keyboard" | "cmd.export" | "cmd.clipboard" | "cmd.share" | "cmd.broadcast" | "cmd.globe" | "cmd.copy" | "cmd.plus" | "cmd.restart" | "cmd.eraser" | "cmd.trash" | "cmd.compress" | "cmd.vibrate" | "cmd.handoff" | "cmd.history" | "cmd.question" | "cmd.rocket" | "cmd.stethoscope" | "cmd.redo" | "cmd.bug" | "cmd.memory" | "cmd.pencil" | "cmd.folderMove" | "cmd.folderPlus" | "cmd.folderMinus" | "cmd.hammer" | "cmd.power" | "cmd.cart" | "icon.mic" | "icon.camera" | "thinking.minimal" | "thinking.low" | "thinking.medium" | "thinking.high" | "thinking.xhigh" | "thinking.max" | "thinking.autoPending" | "checkbox.checked" | "checkbox.unchecked" | "radio.selected" | "radio.unselected" | "format.bullet" | "format.dash" | "format.bracketLeft" | "format.bracketRight" | "md.quoteBorder" | "md.hrChar" | "md.bullet" | "md.colorSwatch" | "advisor.rail" | "skill.rail" | "btw.rail" | "lang.default" | "lang.typescript" | "lang.javascript" | "lang.python" | "lang.rust" | "lang.go" | "lang.java" | "lang.c" | "lang.cpp" | "lang.csharp" | "lang.ruby" | "lang.julia" | "lang.php" | "lang.swift" | "lang.kotlin" | "lang.shell" | "lang.html" | "lang.css" | "lang.json" | "lang.yaml" | "lang.markdown" | "lang.sql" | "lang.docker" | "lang.lua" | "lang.text" | "lang.env" | "lang.toml" | "lang.xml" | "lang.ini" | "lang.conf" | "lang.log" | "lang.csv" | "lang.tsv" | "lang.image" | "lang.pdf" | "lang.archive" | "lang.binary" | "chip.image" | "chip.video" | "chip.paste" | "tab.appearance" | "tab.model" | "tab.interaction" | "tab.context" | "tab.files" | "tab.shell" | "tab.tools" | "tab.memory" | "tab.tasks" | "tab.providers" | "tool.write" | "tool.edit" | "tool.bash" | "tool.ssh" | "tool.lsp" | "tool.gh" | "tool.webSearch" | "tool.exa" | "tool.browser" | "tool.eval" | "tool.debug" | "tool.mcp" | "tool.job" | "tool.launch" | "tool.task" | "tool.todo" | "tool.memory" | "tool.ask" | "tool.resolve" | "tool.review" | "tool.goal" | "tool.irc" | "tool.delete" | "tool.move" | "key.ctrl" | "key.ctrlMac" | "key.shift" | "key.alt" | "key.altMac" | "key.super" | "key.superMac" | "key.joiner" | "key.enter" | "key.esc" | "key.tab" | "key.backspace" | "key.delete" | "key.space" | "key.up" | "key.down" | "key.left" | "key.right";
6
8
  export type SymbolMap = Record<SymbolKey, string>;
7
9
  /**
8
10
  * Icon vocabulary for slash-command autocomplete type indicators. Each name
@@ -19,6 +19,7 @@ export type SymbolKey =
19
19
  | "status.running"
20
20
  | "status.shadowed"
21
21
  | "status.aborted"
22
+ /** @deprecated Alias of `status.success`; kept so extensions and theme overrides that name it keep working. */
22
23
  | "status.done"
23
24
  // Navigation
24
25
  | "nav.cursor"
@@ -212,6 +213,8 @@ export type SymbolKey =
212
213
  | "advisor.rail"
213
214
  // Skill callout rail (user turn that opened with a skill chip)
214
215
  | "skill.rail"
216
+ // /btw steering-prompt rail (the <inject> block a side answer drafted)
217
+ | "btw.rail"
215
218
  // Language/file type icons
216
219
  | "lang.default"
217
220
  | "lang.typescript"
@@ -404,7 +407,7 @@ const UNICODE_SYMBOLS: SymbolMap = {
404
407
  "status.running": "⟳",
405
408
  "status.shadowed": "○",
406
409
  "status.aborted": "⏹",
407
- "status.done": "•",
410
+ "status.done": "✔",
408
411
  // Navigation
409
412
  "nav.cursor": "❯",
410
413
  "nav.selected": "➤",
@@ -598,6 +601,7 @@ const UNICODE_SYMBOLS: SymbolMap = {
598
601
  // Advisor note rail (heavier than md.quoteBorder so notes read as a distinct voice)
599
602
  "advisor.rail": "▎",
600
603
  "skill.rail": "▎",
604
+ "btw.rail": "▎",
601
605
  // Language/file icons (emoji-centric, no Nerd Font required)
602
606
  "lang.default": "⌘",
603
607
  "lang.typescript": "🟦",
@@ -721,8 +725,8 @@ const NERD_SYMBOLS: SymbolMap = {
721
725
  "status.shadowed": "\uf10c",
722
726
  // pick:  | alt:  
723
727
  "status.aborted": "\uf04d",
724
- // pick: • | alt: ● ·
725
- "status.done": "•",
728
+ // alias of status.success
729
+ "status.done": "\uf00c",
726
730
  // Navigation
727
731
  // pick:  | alt:  
728
732
  "nav.cursor": "\uf054",
@@ -1072,6 +1076,7 @@ const NERD_SYMBOLS: SymbolMap = {
1072
1076
  // pick: ▎ | alt: ┃ │
1073
1077
  "advisor.rail": "▎",
1074
1078
  "skill.rail": "▎",
1079
+ "btw.rail": "▎",
1075
1080
  // Language icons (nerd font devicons)
1076
1081
  "lang.default": "",
1077
1082
  "lang.typescript": "\u{E628}",
@@ -1186,17 +1191,17 @@ const NERD_SYMBOLS: SymbolMap = {
1186
1191
 
1187
1192
  const ASCII_SYMBOLS: SymbolMap = {
1188
1193
  // Status Indicators
1189
- "status.success": "[ok]",
1190
- "status.error": "[!!]",
1194
+ "status.success": "[+]",
1195
+ "status.error": "[-]",
1191
1196
  "status.warning": "[!]",
1192
1197
  "status.info": "[i]",
1193
- "status.pending": "[*]",
1198
+ "status.pending": "[ ]",
1194
1199
  "status.disabled": "[ ]",
1195
1200
  "status.enabled": "[x]",
1196
1201
  "status.running": "[~]",
1197
1202
  "status.shadowed": "[/]",
1198
- "status.aborted": "[-]",
1199
- "status.done": "*",
1203
+ "status.aborted": "[#]",
1204
+ "status.done": "[+]",
1200
1205
  // Navigation
1201
1206
  "nav.cursor": ">",
1202
1207
  "nav.selected": "->",
@@ -1386,6 +1391,7 @@ const ASCII_SYMBOLS: SymbolMap = {
1386
1391
  "md.colorSwatch": "[]",
1387
1392
  "advisor.rail": "|",
1388
1393
  "skill.rail": "|",
1394
+ "btw.rail": "|",
1389
1395
  // Language icons (ASCII uses abbreviations)
1390
1396
  "lang.default": "code",
1391
1397
  "lang.typescript": "ts",
@@ -1502,7 +1508,8 @@ export const SPINNER_FRAMES: Record<SymbolPreset, Record<SpinnerType, string[]>>
1502
1508
  activity: ["⠋", "⠙", "⠹", "⠸", "⠼", "⠴", "⠦", "⠧", "⠇", "⠏"],
1503
1509
  },
1504
1510
  ascii: {
1505
- status: ["|", "/", "-", "\\"],
1511
+ // Bracketed like the `status.*` glyphs, so a settling call keeps its column width.
1512
+ status: ["[|]", "[/]", "[-]", "[\\]"],
1506
1513
  activity: ["-", "\\", "|", "/"],
1507
1514
  },
1508
1515
  };
@@ -129,6 +129,7 @@ export declare class Theme {
129
129
  running: string;
130
130
  shadowed: string;
131
131
  aborted: string;
132
+ /** @deprecated Alias of `success`. */
132
133
  done: string;
133
134
  };
134
135
  get nav(): {