@linghun/tui 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (208) hide show
  1. package/dist/agent-completion-finalizer.js +3 -3
  2. package/dist/background-control-runtime.js +56 -55
  3. package/dist/cache-command-runtime.js +3 -3
  4. package/dist/capability-runtime.js +35 -34
  5. package/dist/{chunk-TJLC3QAS.js → chunk-36ZWUJQS.js} +1 -1
  6. package/dist/{chunk-JDWXC2OQ.js → chunk-3MRYQO7X.js} +4 -4
  7. package/dist/{chunk-2FVEKTKN.js → chunk-3PG7I3LA.js} +4 -4
  8. package/dist/{chunk-J7ZE2JKP.js → chunk-42ZZUF7P.js} +3 -3
  9. package/dist/{chunk-DTK5NBTV.js → chunk-4BFCUJX6.js} +95 -11
  10. package/dist/{chunk-YH6UIHNF.js → chunk-4QWCNMP6.js} +2 -2
  11. package/dist/{chunk-WKMBK5UP.js → chunk-4TO2LDMP.js} +1 -1
  12. package/dist/chunk-4UER2AKI.js +636 -0
  13. package/dist/{chunk-WHFDDZHY.js → chunk-5IFNLTOF.js} +4 -4
  14. package/dist/{chunk-W3KHJNSH.js → chunk-6CHUZ2NF.js} +2 -2
  15. package/dist/{chunk-I3NTAIMF.js → chunk-6DBBXNEG.js} +3 -3
  16. package/dist/{chunk-GDQQNPBP.js → chunk-6GXIGN5W.js} +1 -1
  17. package/dist/{chunk-QLRTQHTR.js → chunk-6JGRNES6.js} +2 -2
  18. package/dist/{chunk-D7TCSOAZ.js → chunk-7BHMBWG2.js} +3 -3
  19. package/dist/{chunk-KO64OFSG.js → chunk-7C6T7RKJ.js} +1 -1
  20. package/dist/{chunk-4WHZ6JKD.js → chunk-7R4YXN7Z.js} +335 -63
  21. package/dist/{chunk-LDABZV5V.js → chunk-7RZE45OT.js} +1 -1
  22. package/dist/{chunk-MLUIOBKL.js → chunk-7ZMDQZ22.js} +4 -4
  23. package/dist/{chunk-X7A22JHP.js → chunk-A4H3UTJZ.js} +1 -1
  24. package/dist/{chunk-LVIM2PA7.js → chunk-AGI6GFFL.js} +3 -3
  25. package/dist/{chunk-D3UTL2QX.js → chunk-ATY7WBIT.js} +1 -1
  26. package/dist/{chunk-ZOSK2UEU.js → chunk-BBK5BA5C.js} +99 -117
  27. package/dist/{chunk-SRZIA6B4.js → chunk-BNC4F63N.js} +1 -1
  28. package/dist/{chunk-WQMSRO4D.js → chunk-CJRJR7TP.js} +5 -5
  29. package/dist/{chunk-OEYW3JE3.js → chunk-DIDRFIIW.js} +2 -2
  30. package/dist/{chunk-AKPXMCVF.js → chunk-EKYXI6C7.js} +11 -7
  31. package/dist/{chunk-GMUCSNUD.js → chunk-FGGY5KNM.js} +7 -7
  32. package/dist/{chunk-APJIC2O5.js → chunk-GTIZNO5O.js} +84 -0
  33. package/dist/{chunk-UOHZQIVL.js → chunk-GXFYUZAM.js} +1 -1
  34. package/dist/{chunk-DDXS2RDZ.js → chunk-HGCTHBUY.js} +1 -1
  35. package/dist/{chunk-QTDGRZMZ.js → chunk-HJOC5WUV.js} +1 -1
  36. package/dist/{chunk-ECFLCY5V.js → chunk-HPIHFENG.js} +2 -2
  37. package/dist/{chunk-SYBNJZEL.js → chunk-HPMBSOQ4.js} +1 -1
  38. package/dist/{chunk-QB4VWH7W.js → chunk-HPQ2IHOW.js} +4 -4
  39. package/dist/{chunk-RVY34HK4.js → chunk-HZ5XNKWS.js} +5 -2
  40. package/dist/{chunk-4K6UB524.js → chunk-IPZZGDUU.js} +1 -1
  41. package/dist/{chunk-JHGWGH2C.js → chunk-J6CYFWSW.js} +89 -7
  42. package/dist/{chunk-6CI6TKLN.js → chunk-JAVRQ3LM.js} +1 -1
  43. package/dist/{chunk-VCSRBS47.js → chunk-JLAJZPOC.js} +1 -1
  44. package/dist/{chunk-THZBFYAH.js → chunk-JY3LI63F.js} +2 -2
  45. package/dist/{chunk-RMLTVKOY.js → chunk-L4YVE3RG.js} +2 -2
  46. package/dist/{chunk-P277M7Z5.js → chunk-LBC75QAB.js} +1 -1
  47. package/dist/{chunk-F6TVBCZV.js → chunk-LWW2IAFC.js} +1 -1
  48. package/dist/{chunk-64MJP6FK.js → chunk-NK4NMYF5.js} +52 -10
  49. package/dist/{chunk-DNQN74CC.js → chunk-NL4M3V5D.js} +33 -0
  50. package/dist/{chunk-OF3K3CU5.js → chunk-O2U4XQVM.js} +2 -2
  51. package/dist/{chunk-LQTVYUT3.js → chunk-OJTMM5CV.js} +2 -2
  52. package/dist/{chunk-HW2TBXVK.js → chunk-OPVRII63.js} +1 -1
  53. package/dist/{chunk-ZZ2CNCXJ.js → chunk-OSFBVVEP.js} +4 -4
  54. package/dist/{chunk-F43AMWLZ.js → chunk-PDTJVJVD.js} +1 -1
  55. package/dist/{chunk-UDQT5CWK.js → chunk-PI6T2AGS.js} +1 -1
  56. package/dist/{chunk-JO5ANTMR.js → chunk-PPUOHBAK.js} +84 -37
  57. package/dist/{chunk-N7G2X2LK.js → chunk-QD4SCW4A.js} +235 -198
  58. package/dist/{chunk-SOPYWTFV.js → chunk-RRUI3VWQ.js} +1 -1
  59. package/dist/{chunk-IN42UISW.js → chunk-SRJ4XWOR.js} +10 -5
  60. package/dist/{chunk-6RJVTUWI.js → chunk-T6UOCF5D.js} +5 -1
  61. package/dist/{chunk-VTQL23UM.js → chunk-TVNWAEJR.js} +1 -1
  62. package/dist/chunk-TY4KIVA6.js +50 -0
  63. package/dist/{chunk-UT2TYK2A.js → chunk-TYTVAFGB.js} +1 -1
  64. package/dist/{chunk-OMZYPQVA.js → chunk-UGYFQF6M.js} +1 -1
  65. package/dist/{chunk-TYF4GJR3.js → chunk-UIKN3CDF.js} +4 -4
  66. package/dist/{chunk-JGDIO2NF.js → chunk-UO3KYTBU.js} +1 -1
  67. package/dist/{chunk-KI7C6ZOD.js → chunk-VIJ7GDKI.js} +1 -1
  68. package/dist/{chunk-NKFKOEYX.js → chunk-WCMHJ6SS.js} +1 -1
  69. package/dist/{chunk-EORRZP3F.js → chunk-WX2OTJXL.js} +1 -1
  70. package/dist/{chunk-BOV4K7FP.js → chunk-WXTHKLNH.js} +9 -1
  71. package/dist/{chunk-CRQORMFF.js → chunk-X37FSYAX.js} +1 -1
  72. package/dist/{chunk-JQCRCDOC.js → chunk-X7E34LKV.js} +15 -15
  73. package/dist/chunk-X7HMDZZQ.js +85 -0
  74. package/dist/{chunk-B4GQTZMT.js → chunk-YDTJ7UBG.js} +4 -4
  75. package/dist/{chunk-K56D3X7S.js → chunk-YKOXJQGX.js} +34 -2
  76. package/dist/{chunk-3GCIXKCI.js → chunk-YLOJWSHB.js} +9 -5
  77. package/dist/{chunk-GKZYTPN2.js → chunk-YMEMN5FG.js} +1 -1
  78. package/dist/chunk-YQNK7HK3.js +87 -0
  79. package/dist/{chunk-M4AIK2SP.js → chunk-Z265MCGC.js} +15 -11
  80. package/dist/{chunk-FTAEPAVY.js → chunk-ZF36LULR.js} +4 -4
  81. package/dist/{chunk-66BNE332.js → chunk-ZJDPYOTK.js} +4 -4
  82. package/dist/{chunk-RM5QMOFY.js → chunk-ZKPQ4KLK.js} +1 -1
  83. package/dist/command-panel-runtime.js +34 -33
  84. package/dist/compact-cache-command-runtime.js +56 -55
  85. package/dist/compact-preflight-runtime.js +21 -21
  86. package/dist/connector-runtime.js +36 -35
  87. package/dist/deep-compact-runtime.js +6 -6
  88. package/dist/deferred-tools-catalog.js +5 -5
  89. package/dist/details-status-runtime.js +34 -33
  90. package/dist/evidence-runtime.d.ts.map +1 -1
  91. package/dist/evidence-runtime.js +12 -12
  92. package/dist/extension-command-runtime.js +7 -7
  93. package/dist/extension-slash-runtime.js +35 -34
  94. package/dist/failure-learning-command-runtime.js +36 -35
  95. package/dist/failure-learning-presenter.js +4 -4
  96. package/dist/failure-learning-runtime.js +3 -3
  97. package/dist/final-answer-gate.js +2 -2
  98. package/dist/git-command-runtime.js +35 -34
  99. package/dist/handoff-session-runtime.js +8 -8
  100. package/dist/headless-bench-runtime.d.ts +108 -0
  101. package/dist/headless-bench-runtime.d.ts.map +1 -0
  102. package/dist/headless-bench-runtime.js +30 -0
  103. package/dist/index-result-presenter.js +5 -5
  104. package/dist/index-runtime.js +5 -5
  105. package/dist/index.d.ts +31 -0
  106. package/dist/index.d.ts.map +1 -1
  107. package/dist/index.js +531 -78
  108. package/dist/job-agent-command-runtime.d.ts +2 -1
  109. package/dist/job-agent-command-runtime.d.ts.map +1 -1
  110. package/dist/job-agent-command-runtime.js +34 -33
  111. package/dist/job-runner-presenter.js +3 -3
  112. package/dist/job-runtime.js +9 -9
  113. package/dist/mcp-index-command-runtime.js +5 -5
  114. package/dist/mcp-index-runtime.js +39 -38
  115. package/dist/mcp-sse-runtime.js +3 -3
  116. package/dist/mcp-stdio-runtime.js +4 -4
  117. package/dist/memory-command-runtime.js +36 -35
  118. package/dist/memory-extraction-runtime.js +3 -3
  119. package/dist/memory-rules-runtime.js +3 -3
  120. package/dist/meta-scheduler-runtime.d.ts +10 -0
  121. package/dist/meta-scheduler-runtime.d.ts.map +1 -1
  122. package/dist/meta-scheduler-runtime.js +2 -1
  123. package/dist/model-command-runtime.js +35 -34
  124. package/dist/model-loop-runtime.d.ts +1 -1
  125. package/dist/model-loop-runtime.d.ts.map +1 -1
  126. package/dist/model-loop-runtime.js +1 -1
  127. package/dist/model-prompt-runtime.d.ts.map +1 -1
  128. package/dist/model-prompt-runtime.js +10 -10
  129. package/dist/model-stream-runtime.d.ts +4 -0
  130. package/dist/model-stream-runtime.d.ts.map +1 -1
  131. package/dist/model-stream-runtime.js +56 -55
  132. package/dist/model-tool-runtime.d.ts +3 -2
  133. package/dist/model-tool-runtime.d.ts.map +1 -1
  134. package/dist/model-tool-runtime.js +58 -55
  135. package/dist/pending-details-presenter.js +3 -3
  136. package/dist/permission-approval-runtime.js +56 -55
  137. package/dist/permission-continuation-runtime.d.ts.map +1 -1
  138. package/dist/permission-continuation-runtime.js +4 -4
  139. package/dist/process-command-runtime.d.ts.map +1 -1
  140. package/dist/process-command-runtime.js +4 -4
  141. package/dist/process-guard.d.ts +3 -0
  142. package/dist/process-guard.d.ts.map +1 -1
  143. package/dist/process-guard.js +1 -1
  144. package/dist/provider-loop-runtime.js +3 -3
  145. package/dist/remote-command-runtime.js +35 -34
  146. package/dist/runner-runtime.js +8 -8
  147. package/dist/runtime-status-presenter.js +3 -3
  148. package/dist/runtime-status-snapshot.js +4 -4
  149. package/dist/shell/components/AgentProgressTree.js +2 -2
  150. package/dist/shell/components/BackgroundTaskOverlay.js +2 -2
  151. package/dist/shell/components/BtwPanel.js +2 -2
  152. package/dist/shell/components/CommandPanel.js +2 -2
  153. package/dist/shell/components/Composer.d.ts +16 -2
  154. package/dist/shell/components/Composer.d.ts.map +1 -1
  155. package/dist/shell/components/Composer.js +9 -7
  156. package/dist/shell/components/ConfigPanel.js +2 -2
  157. package/dist/shell/components/HelpPanel.js +2 -2
  158. package/dist/shell/components/HistorySearchPanel.js +2 -2
  159. package/dist/shell/components/MessageMarkdown.d.ts +23 -0
  160. package/dist/shell/components/MessageMarkdown.d.ts.map +1 -1
  161. package/dist/shell/components/MessageMarkdown.js +5 -3
  162. package/dist/shell/components/MouseInputRouter.js +5 -80
  163. package/dist/shell/components/OutputLine.d.ts.map +1 -1
  164. package/dist/shell/components/OutputLine.js +5 -3
  165. package/dist/shell/components/ProductBlock.d.ts.map +1 -1
  166. package/dist/shell/components/ProductBlock.js +5 -5
  167. package/dist/shell/components/ScrollViewport.js +3 -82
  168. package/dist/shell/components/SessionsPanel.js +2 -2
  169. package/dist/shell/components/ShellApp.d.ts.map +1 -1
  170. package/dist/shell/components/ShellApp.js +29 -24
  171. package/dist/shell/components/SlashSuggestions.js +2 -2
  172. package/dist/shell/components/StatusFooter.js +2 -2
  173. package/dist/shell/components/StatusTray.d.ts.map +1 -1
  174. package/dist/shell/components/StatusTray.js +2 -1
  175. package/dist/shell/components/StructuredDiff.js +2 -2
  176. package/dist/shell/components/TaskListView.js +2 -2
  177. package/dist/shell/components/TaskSuggestionBar.js +2 -2
  178. package/dist/shell/components/WorkflowProgressView.js +2 -2
  179. package/dist/shell/components/useAnchoredCursor.d.ts +6 -9
  180. package/dist/shell/components/useAnchoredCursor.d.ts.map +1 -1
  181. package/dist/shell/components/useAnchoredCursor.js +1 -1
  182. package/dist/shell/ink-renderer.d.ts.map +1 -1
  183. package/dist/shell/ink-renderer.js +29 -24
  184. package/dist/shell/models/transcript-selection-state.js +2 -2
  185. package/dist/shell/plain-renderer.d.ts.map +1 -1
  186. package/dist/shell/plain-renderer.js +2 -2
  187. package/dist/shell/text-utils.d.ts +16 -0
  188. package/dist/shell/text-utils.d.ts.map +1 -1
  189. package/dist/shell/text-utils.js +3 -1
  190. package/dist/shell/view-model.js +14 -14
  191. package/dist/slash-command-runtime.js +56 -55
  192. package/dist/slash-dispatch.js +4 -4
  193. package/dist/startup-runtime.js +2 -2
  194. package/dist/tool-output-presenter.d.ts.map +1 -1
  195. package/dist/tool-output-presenter.js +1 -1
  196. package/dist/tui-agent-job-runtime.js +11 -11
  197. package/dist/tui-data-types.d.ts +10 -0
  198. package/dist/tui-data-types.d.ts.map +1 -1
  199. package/dist/tui-details-runtime.js +10 -10
  200. package/dist/tui-memory-runtime.js +5 -5
  201. package/dist/tui-output-surface.js +15 -15
  202. package/dist/tui-permission-runtime.js +5 -5
  203. package/dist/tui-state-runtime.js +4 -4
  204. package/dist/verification-command-runtime.js +12 -12
  205. package/dist/workflow-command-runtime.d.ts.map +1 -1
  206. package/dist/workflow-command-runtime.js +34 -33
  207. package/package.json +5 -5
  208. package/dist/chunk-GW5YDCRZ.js +0 -42
@@ -1,54 +1,60 @@
1
- import {
2
- WorkflowProgressView
3
- } from "./chunk-KO64OFSG.js";
4
1
  import {
5
2
  StatusFooter
6
- } from "./chunk-SOPYWTFV.js";
3
+ } from "./chunk-RRUI3VWQ.js";
7
4
  import {
8
5
  StatusTray
9
- } from "./chunk-6RJVTUWI.js";
6
+ } from "./chunk-T6UOCF5D.js";
10
7
  import {
11
8
  TaskListView
12
- } from "./chunk-JGDIO2NF.js";
9
+ } from "./chunk-UO3KYTBU.js";
13
10
  import {
14
11
  TaskSuggestionBar
15
- } from "./chunk-CRQORMFF.js";
12
+ } from "./chunk-X37FSYAX.js";
16
13
  import {
17
14
  UnseenMessagePill
18
15
  } from "./chunk-SQIBPLLV.js";
16
+ import {
17
+ WorkflowProgressView
18
+ } from "./chunk-7C6T7RKJ.js";
19
19
  import {
20
20
  NotificationStack
21
21
  } from "./chunk-JLCPHVBN.js";
22
22
  import {
23
23
  ProductBlock
24
- } from "./chunk-M4AIK2SP.js";
25
- import {
26
- SessionsPanel
27
- } from "./chunk-YH6UIHNF.js";
24
+ } from "./chunk-Z265MCGC.js";
28
25
  import {
29
- BtwPanel
30
- } from "./chunk-F6TVBCZV.js";
26
+ TranscriptViewport
27
+ } from "./chunk-YQNK7HK3.js";
31
28
  import {
32
- CommandPanel
33
- } from "./chunk-UOHZQIVL.js";
29
+ SessionsPanel
30
+ } from "./chunk-4QWCNMP6.js";
34
31
  import {
35
32
  Composer
36
- } from "./chunk-ZOSK2UEU.js";
33
+ } from "./chunk-BBK5BA5C.js";
37
34
  import {
38
35
  ConfigPanel
39
- } from "./chunk-VCSRBS47.js";
36
+ } from "./chunk-JLAJZPOC.js";
40
37
  import {
41
38
  HelpPanel
42
- } from "./chunk-D3UTL2QX.js";
39
+ } from "./chunk-ATY7WBIT.js";
43
40
  import {
44
41
  StreamingMarkdown
45
- } from "./chunk-DTK5NBTV.js";
42
+ } from "./chunk-4BFCUJX6.js";
43
+ import {
44
+ MouseInputRouter
45
+ } from "./chunk-X7HMDZZQ.js";
46
46
  import {
47
47
  AgentProgressTree
48
- } from "./chunk-TJLC3QAS.js";
48
+ } from "./chunk-36ZWUJQS.js";
49
49
  import {
50
50
  BackgroundTaskOverlay
51
- } from "./chunk-6CI6TKLN.js";
51
+ } from "./chunk-JAVRQ3LM.js";
52
+ import {
53
+ BtwPanel
54
+ } from "./chunk-LWW2IAFC.js";
55
+ import {
56
+ CommandPanel
57
+ } from "./chunk-GXFYUZAM.js";
52
58
  import {
53
59
  bindTerminalInteractionSignals,
54
60
  createTerminalInteractionSession,
@@ -74,10 +80,10 @@ import {
74
80
  composerMaxWidth,
75
81
  fitText,
76
82
  taskComposerMaxWidth
77
- } from "./chunk-APJIC2O5.js";
83
+ } from "./chunk-GTIZNO5O.js";
78
84
 
79
85
  // src/shell/components/ShellApp.tsx
80
- import { Box, Static, Text } from "@linghun/ink-runtime";
86
+ import { Box, Text } from "@linghun/ink-runtime";
81
87
  import { useEffect, useMemo, useState } from "react";
82
88
 
83
89
  // src/shell/ink-renderer.tsx
@@ -95,6 +101,7 @@ function shouldUseInkShell(input, output) {
95
101
  }
96
102
  function renderInkShell(controller, options = {}) {
97
103
  const stdout = options.stdout;
104
+ const inkStdout = createInkStdout(stdout);
98
105
  const capability = detectTerminalCapability();
99
106
  const useAlternateScreen = resolveAlternateScreen(capability);
100
107
  const terminalInteractionModes = resolveTerminalInteractionModes({
@@ -114,7 +121,7 @@ function renderInkShell(controller, options = {}) {
114
121
  terminalInteractionSession.enable();
115
122
  instance = render(/* @__PURE__ */ jsx(ShellApp, { controller, capability }), {
116
123
  stdin: options.stdin,
117
- stdout,
124
+ stdout: inkStdout,
118
125
  stderr: options.stderr,
119
126
  exitOnCtrlC: false,
120
127
  alternateScreen: useAlternateScreen
@@ -177,11 +184,8 @@ function renderInkShell(controller, options = {}) {
177
184
  resizeTimer = setTimeout(() => {
178
185
  resizeTimer = void 0;
179
186
  if (unmounted) return;
180
- try {
181
- if (useAlternateScreen) {
182
- instance.clear();
183
- }
184
- } catch {
187
+ if (!useAlternateScreen) {
188
+ writeBestEffort(stdout, "\x1B[2J\x1B[H");
185
189
  }
186
190
  terminalInteractionSession.reassert();
187
191
  rerender();
@@ -209,16 +213,24 @@ function renderInkShell(controller, options = {}) {
209
213
  };
210
214
  }
211
215
  function resolveAlternateScreen(capability) {
212
- if (process.env.LINGHUN_FULLSCREEN === "1") {
213
- if (!capability.alternateScreen) return false;
214
- if (process.env.TMUX_PANE || process.env.TERM_PROGRAM === "tmux") return false;
215
- return true;
216
- }
217
- return false;
216
+ if (process.env.LINGHUN_FULLSCREEN === "0") return false;
217
+ if (!capability.alternateScreen) return false;
218
+ if (process.env.TMUX_PANE || process.env.TERM_PROGRAM === "tmux") return false;
219
+ return true;
218
220
  }
219
221
  function showTerminalCursor(stdout) {
220
222
  writeBestEffort(stdout, "\x1B[?25h");
221
223
  }
224
+ function createInkStdout(stdout) {
225
+ if (!stdout) return void 0;
226
+ const wrapped = Object.create(stdout);
227
+ wrapped.__linghunRawStdout = stdout;
228
+ wrapped.write = ((chunk, ...args) => {
229
+ const next = typeof chunk === "string" ? chunk.replace(/\x1B\[3J/g, "") : Buffer.isBuffer(chunk) ? Buffer.from(chunk.toString().replace(/\x1B\[3J/g, "")) : chunk;
230
+ return stdout.write.call(stdout, next, ...args);
231
+ });
232
+ return wrapped;
233
+ }
222
234
  function isNoColorTerminal() {
223
235
  return process.env.NO_COLOR === "1" || process.env.FORCE_COLOR === "0";
224
236
  }
@@ -269,7 +281,15 @@ function ShellApp({
269
281
  cacheTone: view.taskFooter.cacheTone
270
282
  }
271
283
  ) : null,
272
- /* @__PURE__ */ jsx2(Box, { height: 0, overflow: "hidden", children: /* @__PURE__ */ jsx2(Composer, { view, onInput: controller.onInput, capability }) })
284
+ /* @__PURE__ */ jsx2(Box, { height: 0, overflow: "hidden", children: /* @__PURE__ */ jsx2(
285
+ Composer,
286
+ {
287
+ view,
288
+ onInput: controller.onInput,
289
+ capability,
290
+ layout: taskComposerLayout(view.width)
291
+ }
292
+ ) })
273
293
  ]
274
294
  }
275
295
  );
@@ -301,7 +321,15 @@ function HomeLayout({
301
321
  /* @__PURE__ */ jsx2(Box, { flexDirection: "column", alignItems: "center", children: brandLines.map((line) => /* @__PURE__ */ jsx2(Text, { color: theme.brand, bold: true, children: line }, line || "empty")) }),
302
322
  view.homeVision ? /* @__PURE__ */ jsx2(Box, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx2(Text, { color: theme.muted, children: fitText(view.homeVision, cw - 2) }) }) : null,
303
323
  view.setupHint ? /* @__PURE__ */ jsx2(Box, { marginTop: 1, justifyContent: "center", width: cw, children: /* @__PURE__ */ jsx2(Text, { color: theme.warning, children: fitText(view.setupHint, cw - 2) }) }) : null,
304
- /* @__PURE__ */ jsx2(Box, { marginTop: 1, flexDirection: "column", width: cw, children: /* @__PURE__ */ jsx2(Composer, { view, onInput: controller.onInput, capability }) }),
324
+ /* @__PURE__ */ jsx2(Box, { marginTop: 1, flexDirection: "column", width: cw, children: /* @__PURE__ */ jsx2(
325
+ Composer,
326
+ {
327
+ view,
328
+ onInput: controller.onInput,
329
+ capability,
330
+ layout: homeComposerLayout(view.width)
331
+ }
332
+ ) }),
305
333
  /* @__PURE__ */ jsx2(Box, { marginTop: 1, justifyContent: "center", children: /* @__PURE__ */ jsx2(StatusTray, { status: view.status, theme, width: view.width }) }),
306
334
  view.blocks.length > 0 ? /* @__PURE__ */ jsx2(Box, { flexDirection: "column", marginTop: 1, width: cw, children: view.blocks.map((block) => /* @__PURE__ */ jsx2(
307
335
  ProductBlock,
@@ -327,8 +355,8 @@ function TaskLayout({
327
355
  }) {
328
356
  const noColor = view.themeMode === "no-color";
329
357
  const cw = taskComposerMaxWidth(view.width);
330
- const contentWidth = Math.max(8, view.width - 4);
331
- const nativeTranscript = useNativeTranscriptWindow(view.blocks);
358
+ const contentWidth = taskContentWidth(view.width);
359
+ const mouseRouterActive = resolveAlternateScreen(capability);
332
360
  const expandedTranscriptBlock = view.ctrlOExpand?.active && view.ctrlOExpand.blockId ? view.blocks.find((block) => block.id === view.ctrlOExpand?.blockId) : void 0;
333
361
  const [, setTick] = useState(0);
334
362
  const hasProgress = !!(view.agentProgressTree || view.workflowProgressView);
@@ -337,178 +365,185 @@ function TaskLayout({
337
365
  const timer = setInterval(() => setTick((t) => t + 1), 1e3);
338
366
  return () => clearInterval(timer);
339
367
  }, [hasProgress]);
340
- return /* @__PURE__ */ jsxs(Fragment, { children: [
341
- /* @__PURE__ */ jsx2(
342
- Static,
343
- {
344
- items: nativeTranscript.staticBlocks,
345
- children: (block) => /* @__PURE__ */ jsx2(Box, { flexDirection: "column", paddingX: 2, children: /* @__PURE__ */ jsx2(
346
- ProductBlock,
347
- {
348
- block,
349
- theme,
350
- width: contentWidth,
351
- language: view.language
352
- }
353
- ) }, block.id)
354
- }
355
- ),
356
- /* @__PURE__ */ jsxs(
357
- Box,
358
- {
359
- flexDirection: "column",
360
- width: view.width,
361
- height: view.height,
362
- children: [
363
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", flexGrow: 1, minHeight: 0, children: [
364
- /* @__PURE__ */ jsx2(Box, { flexGrow: 1, minHeight: 0 }),
365
- /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, children: [
366
- expandedTranscriptBlock ? /* @__PURE__ */ jsx2(Box, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsx2(
367
- ProductBlock,
368
- {
369
- block: { ...expandedTranscriptBlock, ctrlOCollapsed: false },
370
- theme,
371
- width: contentWidth,
372
- language: view.language
373
- }
374
- ) }) : nativeTranscript.liveBlocks.length > 0 ? /* @__PURE__ */ jsx2(Box, { flexDirection: "column", children: nativeTranscript.liveBlocks.map((block) => /* @__PURE__ */ jsx2(
375
- ProductBlock,
376
- {
377
- block,
378
- theme,
379
- width: contentWidth,
380
- language: view.language
381
- },
382
- block.id
383
- )) }) : null,
384
- view.streamingAssistantText ? /* @__PURE__ */ jsx2(
385
- Box,
386
- {
387
- marginTop: expandedTranscriptBlock || nativeTranscript.liveBlocks.length > 0 ? 1 : 0,
388
- children: /* @__PURE__ */ jsx2(
389
- StreamingMarkdown,
390
- {
391
- text: view.streamingAssistantText,
392
- theme,
393
- wrapWidth: contentWidth
394
- }
395
- )
396
- }
397
- ) : null,
398
- view.activity ? /* @__PURE__ */ jsx2(
399
- Box,
400
- {
401
- marginTop: expandedTranscriptBlock || nativeTranscript.liveBlocks.length > 0 || view.streamingAssistantText ? 1 : 0,
402
- children: /* @__PURE__ */ jsx2(
403
- ActivityIndicator,
404
- {
405
- activity: view.activity,
406
- theme,
407
- tokenCount: estimateStreamingTokens(view.streamingAssistantText)
408
- }
409
- )
410
- }
411
- ) : null,
412
- view.taskSuggestions && view.taskSuggestions.length > 0 ? /* @__PURE__ */ jsx2(
413
- TaskSuggestionBar,
414
- {
415
- suggestions: view.taskSuggestions,
416
- cursor: view.taskSuggestionCursor ?? 0,
417
- width: view.width,
418
- noColor
419
- }
420
- ) : null,
421
- view.limitations.length > 0 ? /* @__PURE__ */ jsx2(Box, { flexDirection: "column", marginTop: 1, children: view.limitations.map((item) => /* @__PURE__ */ jsx2(Text, { color: theme.muted, children: item }, item)) }) : null
422
- ] }),
423
- view.unseenMessageCount && view.unseenMessageCount > 0 ? /* @__PURE__ */ jsx2(
424
- UnseenMessagePill,
425
- {
426
- count: view.unseenMessageCount,
427
- language: view.language,
428
- width: view.width
429
- }
430
- ) : null
431
- ] }),
432
- /* @__PURE__ */ jsxs(Box, { flexShrink: 0, flexDirection: "column", children: [
433
- view.backgroundTaskOverlay && !view.permission ? /* @__PURE__ */ jsx2(
434
- BackgroundTaskOverlay,
368
+ return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", width: view.width, height: view.height, children: [
369
+ /* @__PURE__ */ jsxs(Box, { flexDirection: "column", flexGrow: 1, minHeight: 0, overflow: "hidden", children: [
370
+ /* @__PURE__ */ jsx2(
371
+ MouseInputRouter,
372
+ {
373
+ active: mouseRouterActive,
374
+ scroll: view.transcriptScroll,
375
+ onInput: controller.onInput
376
+ }
377
+ ),
378
+ /* @__PURE__ */ jsx2(
379
+ TranscriptViewport,
380
+ {
381
+ scroll: view.transcriptScroll,
382
+ virtualRange: view.transcriptVirtualRange,
383
+ onMeasure: ({ viewportHeight, contentHeight }) => controller.onInput({ type: "transcript-scroll-measure", viewportHeight, contentHeight }),
384
+ onGeometry: (geometry) => controller.onInput({ type: "transcript-viewport-geometry", geometry }),
385
+ children: /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 2, children: [
386
+ expandedTranscriptBlock ? /* @__PURE__ */ jsx2(Box, { flexDirection: "column", marginBottom: 1, children: /* @__PURE__ */ jsx2(
387
+ ProductBlock,
435
388
  {
436
- overlay: view.backgroundTaskOverlay,
389
+ block: { ...expandedTranscriptBlock, ctrlOCollapsed: false },
390
+ theme,
437
391
  width: contentWidth,
438
- noColor
439
- }
440
- ) : null,
441
- view.configPanel ? /* @__PURE__ */ jsx2(
442
- ConfigPanel,
443
- {
444
- panel: view.configPanel,
445
- controller,
446
- width: view.width,
447
- noColor,
448
392
  language: view.language
449
393
  }
450
- ) : null,
451
- /* @__PURE__ */ jsx2(NotificationStack, { notifications: view.notifications, theme }),
452
- view.taskRuntimeSummary ? /* @__PURE__ */ jsx2(Box, { width: cw, marginTop: 1, children: /* @__PURE__ */ jsx2(
394
+ ) }) : view.blocks.length > 0 ? /* @__PURE__ */ jsx2(Box, { flexDirection: "column", children: view.blocks.map((block) => /* @__PURE__ */ jsx2(
453
395
  ProductBlock,
454
396
  {
455
- block: view.taskRuntimeSummary,
397
+ block,
456
398
  theme,
457
- width: cw,
458
- language: view.language
459
- }
460
- ) }) : null,
461
- view.taskListView ? /* @__PURE__ */ jsx2(Box, { paddingX: 2, marginBottom: 1, children: /* @__PURE__ */ jsx2(
462
- TaskListView,
463
- {
464
- list: view.taskListView,
465
399
  width: contentWidth,
466
- noColor,
467
400
  language: view.language
468
- }
469
- ) }) : null,
470
- view.agentProgressTree ? /* @__PURE__ */ jsx2(Box, { width: view.width, paddingX: 2, children: /* @__PURE__ */ jsx2(
471
- AgentProgressTree,
401
+ },
402
+ block.id
403
+ )) }) : null,
404
+ view.streamingAssistantText ? /* @__PURE__ */ jsx2(Box, { marginTop: expandedTranscriptBlock || view.blocks.length > 0 ? 1 : 0, children: /* @__PURE__ */ jsx2(
405
+ StreamingMarkdown,
472
406
  {
473
- tree: view.agentProgressTree,
474
- width: contentWidth,
475
- noColor,
476
- language: view.language
407
+ text: view.streamingAssistantText,
408
+ theme,
409
+ wrapWidth: contentWidth
477
410
  }
478
411
  ) }) : null,
479
- view.workflowProgressView ? /* @__PURE__ */ jsx2(Box, { width: view.width, paddingX: 2, children: /* @__PURE__ */ jsx2(
480
- WorkflowProgressView,
412
+ view.activity ? /* @__PURE__ */ jsx2(
413
+ Box,
481
414
  {
482
- workflow: view.workflowProgressView,
483
- width: contentWidth,
484
- noColor,
485
- language: view.language
415
+ marginTop: expandedTranscriptBlock || view.blocks.length > 0 || view.streamingAssistantText ? 1 : 0,
416
+ children: /* @__PURE__ */ jsx2(
417
+ ActivityIndicator,
418
+ {
419
+ activity: view.activity,
420
+ theme,
421
+ width: contentWidth,
422
+ tokenCount: estimateStreamingTokens(view.streamingAssistantText)
423
+ }
424
+ )
486
425
  }
487
- ) }) : null,
488
- /* @__PURE__ */ jsx2(Box, { flexDirection: "column", width: cw, paddingTop: 1, children: /* @__PURE__ */ jsx2(Composer, { view, onInput: controller.onInput, capability }) }),
489
- view.taskFooter ? /* @__PURE__ */ jsx2(
490
- StatusFooter,
426
+ ) : null,
427
+ view.taskSuggestions && view.taskSuggestions.length > 0 ? /* @__PURE__ */ jsx2(
428
+ TaskSuggestionBar,
491
429
  {
492
- footer: view.taskFooter,
493
- theme,
430
+ suggestions: view.taskSuggestions,
431
+ cursor: view.taskSuggestionCursor ?? 0,
494
432
  width: view.width,
495
- language: view.language,
496
- modelDim: view.taskFooter.modelDim,
497
- cacheTone: view.taskFooter.cacheTone
433
+ noColor
498
434
  }
499
- ) : null
435
+ ) : null,
436
+ view.limitations.length > 0 ? /* @__PURE__ */ jsx2(Box, { flexDirection: "column", marginTop: 1, children: view.limitations.map((item) => /* @__PURE__ */ jsx2(Text, { color: theme.muted, children: item }, item)) }) : null
500
437
  ] })
501
- ]
502
- }
503
- )
438
+ }
439
+ ),
440
+ view.unseenMessageCount && view.unseenMessageCount > 0 ? /* @__PURE__ */ jsx2(
441
+ UnseenMessagePill,
442
+ {
443
+ count: view.unseenMessageCount,
444
+ language: view.language,
445
+ width: view.width
446
+ }
447
+ ) : null
448
+ ] }),
449
+ /* @__PURE__ */ jsxs(Box, { flexShrink: 0, flexDirection: "column", children: [
450
+ view.backgroundTaskOverlay && !view.permission ? /* @__PURE__ */ jsx2(
451
+ BackgroundTaskOverlay,
452
+ {
453
+ overlay: view.backgroundTaskOverlay,
454
+ width: contentWidth,
455
+ noColor
456
+ }
457
+ ) : null,
458
+ view.configPanel ? /* @__PURE__ */ jsx2(
459
+ ConfigPanel,
460
+ {
461
+ panel: view.configPanel,
462
+ controller,
463
+ width: view.width,
464
+ noColor,
465
+ language: view.language
466
+ }
467
+ ) : null,
468
+ /* @__PURE__ */ jsx2(NotificationStack, { notifications: view.notifications, theme }),
469
+ view.taskRuntimeSummary ? /* @__PURE__ */ jsx2(Box, { width: cw, marginTop: 1, children: /* @__PURE__ */ jsx2(
470
+ ProductBlock,
471
+ {
472
+ block: view.taskRuntimeSummary,
473
+ theme,
474
+ width: cw,
475
+ language: view.language
476
+ }
477
+ ) }) : null,
478
+ view.taskListView ? /* @__PURE__ */ jsx2(Box, { paddingX: 2, marginBottom: 1, children: /* @__PURE__ */ jsx2(
479
+ TaskListView,
480
+ {
481
+ list: view.taskListView,
482
+ width: contentWidth,
483
+ noColor,
484
+ language: view.language
485
+ }
486
+ ) }) : null,
487
+ view.agentProgressTree ? /* @__PURE__ */ jsx2(Box, { width: view.width, paddingX: 2, children: /* @__PURE__ */ jsx2(
488
+ AgentProgressTree,
489
+ {
490
+ tree: view.agentProgressTree,
491
+ width: contentWidth,
492
+ noColor,
493
+ language: view.language
494
+ }
495
+ ) }) : null,
496
+ view.workflowProgressView ? /* @__PURE__ */ jsx2(Box, { width: view.width, paddingX: 2, children: /* @__PURE__ */ jsx2(
497
+ WorkflowProgressView,
498
+ {
499
+ workflow: view.workflowProgressView,
500
+ width: contentWidth,
501
+ noColor,
502
+ language: view.language
503
+ }
504
+ ) }) : null,
505
+ /* @__PURE__ */ jsx2(Box, { flexDirection: "column", width: cw, paddingTop: 1, children: /* @__PURE__ */ jsx2(
506
+ Composer,
507
+ {
508
+ view,
509
+ onInput: controller.onInput,
510
+ capability,
511
+ layout: taskComposerLayout(view.width)
512
+ }
513
+ ) }),
514
+ view.taskFooter ? /* @__PURE__ */ jsx2(
515
+ StatusFooter,
516
+ {
517
+ footer: view.taskFooter,
518
+ theme,
519
+ width: view.width,
520
+ language: view.language,
521
+ modelDim: view.taskFooter.modelDim,
522
+ cacheTone: view.taskFooter.cacheTone
523
+ }
524
+ ) : null
525
+ ] })
504
526
  ] });
505
527
  }
506
- var NATIVE_TRANSCRIPT_LIVE_BLOCKS = 6;
507
- function useNativeTranscriptWindow(blocks) {
508
- const liveStart = Math.max(0, blocks.length - NATIVE_TRANSCRIPT_LIVE_BLOCKS);
528
+ function taskContentWidth(viewWidth) {
529
+ return Math.max(8, viewWidth - 4);
530
+ }
531
+ function homeComposerLayout(viewWidth) {
532
+ return {
533
+ width: composerMaxWidth(viewWidth),
534
+ paddingLeft: 2,
535
+ paddingRight: 2,
536
+ prefixWidth: 2,
537
+ minContentWidth: 4
538
+ };
539
+ }
540
+ function taskComposerLayout(viewWidth) {
509
541
  return {
510
- staticBlocks: blocks.slice(0, liveStart),
511
- liveBlocks: blocks.slice(liveStart)
542
+ width: taskComposerMaxWidth(viewWidth),
543
+ paddingLeft: 2,
544
+ paddingRight: 2,
545
+ prefixWidth: 2,
546
+ minContentWidth: 4
512
547
  };
513
548
  }
514
549
  function resolvePanel(view, controller, width, noColor) {
@@ -565,6 +600,7 @@ function resolvePanel(view, controller, width, noColor) {
565
600
  function ActivityIndicator({
566
601
  activity,
567
602
  theme,
603
+ width,
568
604
  tokenCount
569
605
  }) {
570
606
  const [frame, setFrame] = useState(0);
@@ -604,19 +640,19 @@ function ActivityIndicator({
604
640
  const showStats = activity.phase === "tool_running" && (activity.totalLines || activity.totalBytes);
605
641
  const isToolHeader = activity.phase === "tool_running" && activity.toolName;
606
642
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
607
- /* @__PURE__ */ jsxs(Box, { children: [
643
+ /* @__PURE__ */ jsxs(Box, { width, children: [
608
644
  isToolHeader ? /* @__PURE__ */ jsxs(Fragment, { children: [
609
- /* @__PURE__ */ jsxs(Text, { color: theme.toolRunning ?? color, children: [
645
+ /* @__PURE__ */ jsxs(Text, { wrap: "wrap", color: theme.toolRunning ?? color, children: [
610
646
  marker,
611
647
  " "
612
648
  ] }),
613
- /* @__PURE__ */ jsx2(Text, { bold: true, color: theme.toolRunning ?? color, children: activity.toolName }),
614
- activity.toolTarget ? /* @__PURE__ */ jsxs(Text, { color: theme.muted, children: [
649
+ /* @__PURE__ */ jsx2(Text, { wrap: "wrap", bold: true, color: theme.toolRunning ?? color, children: activity.toolName }),
650
+ activity.toolTarget ? /* @__PURE__ */ jsxs(Text, { wrap: "wrap", color: theme.muted, children: [
615
651
  "(",
616
652
  activity.toolTarget,
617
653
  ")"
618
654
  ] }) : null
619
- ] }) : /* @__PURE__ */ jsxs(Text, { color, bold: activity.phase === "thinking" && frame % 10 < 5, children: [
655
+ ] }) : /* @__PURE__ */ jsxs(Text, { wrap: "wrap", color, bold: activity.phase === "thinking" && frame % 10 < 5, children: [
620
656
  marker,
621
657
  " ",
622
658
  text
@@ -624,6 +660,7 @@ function ActivityIndicator({
624
660
  activity.elapsed ? /* @__PURE__ */ jsxs(
625
661
  Text,
626
662
  {
663
+ wrap: "wrap",
627
664
  color: slow ? theme.warning ?? theme.status.partial : theme.muted,
628
665
  dimColor: !slow,
629
666
  children: [
@@ -634,10 +671,10 @@ function ActivityIndicator({
634
671
  ]
635
672
  }
636
673
  ) : null,
637
- slowText ? /* @__PURE__ */ jsx2(Text, { color: theme.muted, dimColor: true, children: slowText }) : null,
638
- showTokenCount ? /* @__PURE__ */ jsx2(Text, { color: theme.muted, dimColor: true, children: activity.language === "en-US" ? ` \xB7 ${tokenCount} tokens` : ` \xB7 ${tokenCount} tokens` }) : null
674
+ slowText ? /* @__PURE__ */ jsx2(Text, { wrap: "wrap", color: theme.muted, dimColor: true, children: slowText }) : null,
675
+ showTokenCount ? /* @__PURE__ */ jsx2(Text, { wrap: "wrap", color: theme.muted, dimColor: true, children: activity.language === "en-US" ? ` \xB7 ${tokenCount} tokens` : ` \xB7 ${tokenCount} tokens` }) : null
639
676
  ] }),
640
- showStats ? /* @__PURE__ */ jsx2(Box, { children: /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
677
+ showStats ? /* @__PURE__ */ jsx2(Box, { width, children: /* @__PURE__ */ jsxs(Text, { dimColor: true, children: [
641
678
  " ",
642
679
  activity.totalLines ? activity.language === "en-US" ? `~${activity.totalLines} lines` : `~${activity.totalLines} \u884C` : null,
643
680
  activity.totalLines && activity.totalBytes ? " \xB7 " : null,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  fitText
3
- } from "./chunk-APJIC2O5.js";
3
+ } from "./chunk-GTIZNO5O.js";
4
4
 
5
5
  // src/shell/components/StatusFooter.tsx
6
6
  import { Box, Text } from "@linghun/ink-runtime";
@@ -9,7 +9,7 @@ import {
9
9
  displayWidth,
10
10
  taskComposerMaxWidth,
11
11
  wrapText
12
- } from "./chunk-APJIC2O5.js";
12
+ } from "./chunk-GTIZNO5O.js";
13
13
 
14
14
  // src/shell/plain-renderer.ts
15
15
  function renderPlainShell(view, capability) {
@@ -103,6 +103,7 @@ function renderPlainMarkdownLines(text, noColor, options = {}) {
103
103
  const out = [];
104
104
  let inCode = false;
105
105
  let codeLang;
106
+ const wrapWidth = Math.max(8, options.wrapWidth ?? 100);
106
107
  const applyTone = (line) => {
107
108
  if (options.error) return colorRed(line, noColor);
108
109
  if (options.diagnostic) return colorCyan(line, noColor);
@@ -124,11 +125,11 @@ function renderPlainMarkdownLines(text, noColor, options = {}) {
124
125
  continue;
125
126
  }
126
127
  if (!inCode) {
127
- out.push(...wrapText(raw, 100).map(applyTone));
128
+ out.push(...wrapText(raw, wrapWidth).map(applyTone));
128
129
  continue;
129
130
  }
130
131
  const isDiff = codeLang === "diff" || codeLang === "patch";
131
- for (const wrapped of wrapText(raw.length === 0 ? " " : raw, 96)) {
132
+ for (const wrapped of wrapText(raw.length === 0 ? " " : raw, Math.max(8, wrapWidth - 4))) {
132
133
  const wrappedBody = isDiff && wrapped.startsWith("+") && !wrapped.startsWith("+++") ? colorGreen(wrapped, noColor) : isDiff && wrapped.startsWith("-") && !wrapped.startsWith("---") ? colorRed(wrapped, noColor) : dim(wrapped, noColor);
133
134
  out.push(`${dim(" | ", noColor)}${wrappedBody}`);
134
135
  }
@@ -273,7 +274,8 @@ function formatSingleBlock(block, view, noColor) {
273
274
  const isToolSuccess = messageKind === "tool_result_success";
274
275
  const renderedMessage = renderPlainMarkdownLines(body, noColor, {
275
276
  dimAll,
276
- diagnostic: isDiagnostic
277
+ diagnostic: isDiagnostic,
278
+ wrapWidth: Math.max(8, view.width - 6)
277
279
  });
278
280
  const out = isLocalOutput || isToolSuccess ? renderedMessage.map((line) => `${dim(" \u23BF ", noColor)}${line}`) : renderedMessage;
279
281
  if (nextAction2) {
@@ -304,7 +306,10 @@ function formatSingleBlock(block, view, noColor) {
304
306
  out.push(coloredFailMarker);
305
307
  }
306
308
  if (body) {
307
- out.push(...renderPlainMarkdownLines(body, noColor, { error: true }));
309
+ out.push(...renderPlainMarkdownLines(body, noColor, {
310
+ error: true,
311
+ wrapWidth: Math.max(8, view.width - 6)
312
+ }));
308
313
  }
309
314
  if (nextAction2) out.push(` ${dim(nextAction2, noColor)}`);
310
315
  if (block.retrySeconds && block.retrySeconds > 0 && (block.retryAttempt ?? 0) >= 4) {
@@ -1,3 +1,7 @@
1
+ import {
2
+ fitText
3
+ } from "./chunk-GTIZNO5O.js";
4
+
1
5
  // src/shell/components/StatusTray.tsx
2
6
  import { Box, Text } from "@linghun/ink-runtime";
3
7
  import { jsx } from "react/jsx-runtime";
@@ -8,7 +12,7 @@ function StatusTray({
8
12
  }) {
9
13
  const items = [status.project, status.model, status.permission, status.index, status.background];
10
14
  const visible = width < 60 ? [items[0], items[1], items[2], items[4]] : items;
11
- return /* @__PURE__ */ jsx(Box, { marginTop: 0, marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: theme.subtle ?? theme.muted, children: visible.join(" ") }) });
15
+ return /* @__PURE__ */ jsx(Box, { marginTop: 0, marginBottom: 0, children: /* @__PURE__ */ jsx(Text, { color: theme.subtle ?? theme.muted, children: fitText(visible.join(" "), Math.max(8, width - 2)) }) });
12
16
  }
13
17
 
14
18
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  truncateDisplay
3
- } from "./chunk-OMZYPQVA.js";
3
+ } from "./chunk-UGYFQF6M.js";
4
4
 
5
5
  // src/memory-extraction-runtime.ts
6
6
  import { randomUUID } from "crypto";