flavor-code 1.4.3 → 1.4.5-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/README.md +45 -5
  2. package/README.zh-CN.md +45 -5
  3. package/dist/agent/expert-agents.d.ts +35 -0
  4. package/dist/agent/expert-generator.d.ts +14 -0
  5. package/dist/agent/expert-templates.d.ts +26 -0
  6. package/dist/agent/planner.d.ts +2 -0
  7. package/dist/{app-TVY2HM5L.js → app-IUPRUKWJ.js} +868 -419
  8. package/dist/{chunk-IKGT4MDT.js → chunk-4GKKXT5V.js} +1 -0
  9. package/dist/{chunk-Y7EH4NVO.js → chunk-55YUJKT4.js} +1 -1
  10. package/dist/{chunk-X6U6BO5D.js → chunk-CI6IHATI.js} +7 -3
  11. package/dist/{chunk-QACFKPZP.js → chunk-G3LKW5SY.js} +4537 -3367
  12. package/dist/{chunk-5BDKRA6U.js → chunk-MVBRIM53.js} +1 -1
  13. package/dist/{chunk-36IDJRLQ.js → chunk-SAAIDKTM.js} +46 -9
  14. package/dist/{chunk-JQM2L2YM.js → chunk-SW7VZDFS.js} +1 -1
  15. package/dist/{chunk-ONRY3C2L.js → chunk-TZ7PI4NZ.js} +1 -1
  16. package/dist/{claude-ink-F554I3GJ.js → claude-ink-5X2DRKN6.js} +1 -1
  17. package/dist/{cli-MAWCV2YR.js → cli-4NWD3ZN3.js} +66 -14
  18. package/dist/cli-main.js +19 -19
  19. package/dist/desktop/main.js +9344 -8124
  20. package/dist/desktop-renderer/assets/{index-CjC0Ibiq.js → index-CBjfgCRz.js} +3 -3
  21. package/dist/desktop-renderer/assets/{interactive-terminal-IjIT3Xoa.js → interactive-terminal-x8YYSqF6.js} +1 -1
  22. package/dist/desktop-renderer/index.html +1 -1
  23. package/dist/{doctor-SEL32R7M.js → doctor-77UMJ6TK.js} +3 -3
  24. package/dist/evolution/preferences.d.ts +52 -0
  25. package/dist/evolve/loader.d.ts +2 -0
  26. package/dist/evolve/service.d.ts +6 -3
  27. package/dist/evolve/store.d.ts +55 -2
  28. package/dist/evolve/verification.d.ts +30 -0
  29. package/dist/harness/local.d.ts +4 -2
  30. package/dist/{load-RHWXNUCS.js → load-JINXGR3N.js} +2 -2
  31. package/dist/{manager-IYBNNKUP.js → manager-UTQT466W.js} +2 -2
  32. package/dist/memory/coordinator.d.ts +1 -1
  33. package/dist/memory/review.d.ts +13 -0
  34. package/dist/memory/store.d.ts +1 -0
  35. package/dist/memory/types.d.ts +2 -0
  36. package/dist/{production-TQROFEPV.js → production-J7ZWR7VL.js} +6 -6
  37. package/dist/production.d.ts +2 -0
  38. package/dist/sdk/index.js +6 -6
  39. package/dist/session/store.d.ts +1 -0
  40. package/dist/{store-MZZERW7K.js → store-Y4V5TLXE.js} +2 -2
  41. package/dist/ui/commands.d.ts +21 -2
  42. package/dist/ui/session.d.ts +8 -0
  43. package/package.json +1 -1
  44. package//346/212/200/346/234/257/346/226/271/346/241/210/346/212/245/345/221/212.md +97 -6
@@ -11,6 +11,7 @@ import {
11
11
  Text,
12
12
  instances_default,
13
13
  osc,
14
+ require_compiler_runtime,
14
15
  require_jsx_runtime,
15
16
  shiftAnchor,
16
17
  stringWidth,
@@ -18,13 +19,13 @@ import {
18
19
  useStdout,
19
20
  use_app_default,
20
21
  use_input_default
21
- } from "./chunk-IKGT4MDT.js";
22
+ } from "./chunk-4GKKXT5V.js";
22
23
  import {
23
24
  require_react
24
25
  } from "./chunk-PULWAH6E.js";
25
26
  import {
26
27
  statusPresentation
27
- } from "./chunk-Y7EH4NVO.js";
28
+ } from "./chunk-55YUJKT4.js";
28
29
  import {
29
30
  source_default
30
31
  } from "./chunk-AA4QNKTF.js";
@@ -34,12 +35,12 @@ import {
34
35
  createGlobTool,
35
36
  createProductionRuntime,
36
37
  isDestructiveTool
37
- } from "./chunk-QACFKPZP.js";
38
+ } from "./chunk-G3LKW5SY.js";
38
39
  import {
39
40
  getGraphemeSegmenter
40
41
  } from "./chunk-TIEOVQW6.js";
41
42
  import "./chunk-OKHV7CTB.js";
42
- import "./chunk-JQM2L2YM.js";
43
+ import "./chunk-SW7VZDFS.js";
43
44
  import {
44
45
  execFileNoThrow
45
46
  } from "./chunk-IU3UBETC.js";
@@ -54,7 +55,7 @@ import {
54
55
  import "./chunk-CVP5OUHD.js";
55
56
  import "./chunk-3563SW4X.js";
56
57
  import "./chunk-RBAZLFKB.js";
57
- import "./chunk-36IDJRLQ.js";
58
+ import "./chunk-SAAIDKTM.js";
58
59
  import {
59
60
  redactErrorText
60
61
  } from "./chunk-WLZUAVVU.js";
@@ -63,7 +64,7 @@ import {
63
64
  } from "./chunk-RV3EXUXM.js";
64
65
  import "./chunk-IQEEFDEE.js";
65
66
  import "./chunk-GTFP2R5I.js";
66
- import "./chunk-5BDKRA6U.js";
67
+ import "./chunk-MVBRIM53.js";
67
68
  import {
68
69
  charWidth,
69
70
  createTranscriptState,
@@ -71,11 +72,11 @@ import {
71
72
  thinkingWindow,
72
73
  transcriptReducer,
73
74
  withTimeout
74
- } from "./chunk-X6U6BO5D.js";
75
+ } from "./chunk-CI6IHATI.js";
75
76
  import {
76
77
  message
77
78
  } from "./chunk-BDX777JR.js";
78
- import "./chunk-ONRY3C2L.js";
79
+ import "./chunk-TZ7PI4NZ.js";
79
80
  import "./chunk-EWD7FWTH.js";
80
81
  import "./chunk-KRWWCVXA.js";
81
82
  import "./chunk-X442CJJH.js";
@@ -213,6 +214,336 @@ var import_react6 = __toESM(require_react(), 1);
213
214
  // src/ui/markdown.tsx
214
215
  var import_react5 = __toESM(require_react(), 1);
215
216
 
217
+ // src/claude-ink/components/Link.tsx
218
+ var import_compiler_runtime = __toESM(require_compiler_runtime(), 1);
219
+
220
+ // node_modules/supports-hyperlinks/index.js
221
+ import process4 from "process";
222
+
223
+ // node_modules/supports-color/index.js
224
+ import process2 from "process";
225
+ import os from "os";
226
+ import tty from "tty";
227
+ function hasFlag(flag, argv = globalThis.Deno ? globalThis.Deno.args : process2.argv) {
228
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
229
+ const position = argv.indexOf(prefix + flag);
230
+ const terminatorPosition = argv.indexOf("--");
231
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
232
+ }
233
+ var { env } = process2;
234
+ var flagForceColor;
235
+ if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
236
+ flagForceColor = 0;
237
+ } else if (hasFlag("color") || hasFlag("colors") || hasFlag("color=true") || hasFlag("color=always")) {
238
+ flagForceColor = 1;
239
+ }
240
+ function envForceColor() {
241
+ if (!("FORCE_COLOR" in env)) {
242
+ return;
243
+ }
244
+ if (env.FORCE_COLOR === "true") {
245
+ return 1;
246
+ }
247
+ if (env.FORCE_COLOR === "false") {
248
+ return 0;
249
+ }
250
+ if (env.FORCE_COLOR.length === 0) {
251
+ return 1;
252
+ }
253
+ const level = Math.min(Number.parseInt(env.FORCE_COLOR, 10), 3);
254
+ if (![0, 1, 2, 3].includes(level)) {
255
+ return;
256
+ }
257
+ return level;
258
+ }
259
+ function translateLevel(level) {
260
+ if (level === 0) {
261
+ return false;
262
+ }
263
+ return {
264
+ level,
265
+ hasBasic: true,
266
+ has256: level >= 2,
267
+ has16m: level >= 3
268
+ };
269
+ }
270
+ function _supportsColor(haveStream, { streamIsTTY, sniffFlags = true } = {}) {
271
+ const noFlagForceColor = envForceColor();
272
+ if (noFlagForceColor !== void 0) {
273
+ flagForceColor = noFlagForceColor;
274
+ }
275
+ const forceColor = sniffFlags ? flagForceColor : noFlagForceColor;
276
+ if (forceColor === 0) {
277
+ return 0;
278
+ }
279
+ if (sniffFlags) {
280
+ if (hasFlag("color=16m") || hasFlag("color=full") || hasFlag("color=truecolor")) {
281
+ return 3;
282
+ }
283
+ if (hasFlag("color=256")) {
284
+ return 2;
285
+ }
286
+ }
287
+ if ("TF_BUILD" in env && "AGENT_NAME" in env) {
288
+ return 1;
289
+ }
290
+ if (haveStream && !streamIsTTY && forceColor === void 0) {
291
+ return 0;
292
+ }
293
+ const min = forceColor || 0;
294
+ if (env.TERM === "dumb") {
295
+ return min;
296
+ }
297
+ if (process2.platform === "win32") {
298
+ const osRelease = os.release().split(".");
299
+ if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
300
+ return Number(osRelease[2]) >= 14931 ? 3 : 2;
301
+ }
302
+ return 1;
303
+ }
304
+ if ("CI" in env) {
305
+ if (["GITHUB_ACTIONS", "GITEA_ACTIONS", "CIRCLECI"].some((key) => key in env)) {
306
+ return 3;
307
+ }
308
+ if (["TRAVIS", "APPVEYOR", "GITLAB_CI", "BUILDKITE", "DRONE"].some((sign) => sign in env) || env.CI_NAME === "codeship") {
309
+ return 1;
310
+ }
311
+ return min;
312
+ }
313
+ if ("TEAMCITY_VERSION" in env) {
314
+ return /^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(env.TEAMCITY_VERSION) ? 1 : 0;
315
+ }
316
+ if (env.COLORTERM === "truecolor") {
317
+ return 3;
318
+ }
319
+ if (env.TERM === "xterm-kitty") {
320
+ return 3;
321
+ }
322
+ if (env.TERM === "xterm-ghostty") {
323
+ return 3;
324
+ }
325
+ if (env.TERM === "wezterm") {
326
+ return 3;
327
+ }
328
+ if ("TERM_PROGRAM" in env) {
329
+ const version = Number.parseInt((env.TERM_PROGRAM_VERSION || "").split(".")[0], 10);
330
+ switch (env.TERM_PROGRAM) {
331
+ case "iTerm.app": {
332
+ return version >= 3 ? 3 : 2;
333
+ }
334
+ case "Apple_Terminal": {
335
+ return 2;
336
+ }
337
+ }
338
+ }
339
+ if (/-256(color)?$/i.test(env.TERM)) {
340
+ return 2;
341
+ }
342
+ if (/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(env.TERM)) {
343
+ return 1;
344
+ }
345
+ if ("COLORTERM" in env) {
346
+ return 1;
347
+ }
348
+ return min;
349
+ }
350
+ function createSupportsColor(stream, options = {}) {
351
+ const level = _supportsColor(stream, {
352
+ streamIsTTY: stream && stream.isTTY,
353
+ ...options
354
+ });
355
+ return translateLevel(level);
356
+ }
357
+ var supportsColor = {
358
+ stdout: createSupportsColor({ isTTY: tty.isatty(1) }),
359
+ stderr: createSupportsColor({ isTTY: tty.isatty(2) })
360
+ };
361
+
362
+ // node_modules/has-flag/index.js
363
+ import process3 from "process";
364
+ function hasFlag2(flag, argv = process3.argv) {
365
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
366
+ const position = argv.indexOf(prefix + flag);
367
+ const terminatorPosition = argv.indexOf("--");
368
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
369
+ }
370
+
371
+ // node_modules/supports-hyperlinks/index.js
372
+ function parseVersion(versionString = "") {
373
+ if (/^\d{3,4}$/.test(versionString)) {
374
+ const match = /(\d{1,2})(\d{2})/.exec(versionString) ?? [];
375
+ return {
376
+ major: 0,
377
+ minor: Number.parseInt(match[1], 10),
378
+ patch: Number.parseInt(match[2], 10)
379
+ };
380
+ }
381
+ const versions = (versionString ?? "").split(".").map((n) => Number.parseInt(n, 10));
382
+ return {
383
+ major: versions[0],
384
+ minor: versions[1],
385
+ patch: versions[2]
386
+ };
387
+ }
388
+ function createSupportsHyperlinks(stream) {
389
+ const {
390
+ CI,
391
+ CURSOR_TRACE_ID,
392
+ FORCE_HYPERLINK,
393
+ NETLIFY,
394
+ TEAMCITY_VERSION,
395
+ TERM_PROGRAM,
396
+ TERM_PROGRAM_VERSION,
397
+ VTE_VERSION,
398
+ TERM
399
+ } = process4.env;
400
+ if (FORCE_HYPERLINK) {
401
+ return !(FORCE_HYPERLINK.length > 0 && Number.parseInt(FORCE_HYPERLINK, 10) === 0);
402
+ }
403
+ if (hasFlag2("no-hyperlink") || hasFlag2("no-hyperlinks") || hasFlag2("hyperlink=false") || hasFlag2("hyperlink=never")) {
404
+ return false;
405
+ }
406
+ if (hasFlag2("hyperlink=true") || hasFlag2("hyperlink=always")) {
407
+ return true;
408
+ }
409
+ if (NETLIFY) {
410
+ return true;
411
+ }
412
+ if (!createSupportsColor(stream)) {
413
+ return false;
414
+ }
415
+ if (stream && !stream.isTTY) {
416
+ return false;
417
+ }
418
+ if ("WT_SESSION" in process4.env) {
419
+ return true;
420
+ }
421
+ if (process4.platform === "win32") {
422
+ return false;
423
+ }
424
+ if (CI) {
425
+ return false;
426
+ }
427
+ if (TEAMCITY_VERSION) {
428
+ return false;
429
+ }
430
+ if (TERM_PROGRAM) {
431
+ const version = parseVersion(TERM_PROGRAM_VERSION);
432
+ switch (TERM_PROGRAM) {
433
+ case "iTerm.app": {
434
+ if (version.major === 3) {
435
+ return version.minor >= 1;
436
+ }
437
+ return version.major > 3;
438
+ }
439
+ case "WezTerm": {
440
+ if (/^0-unstable-\d{4}-\d{2}-\d{2}$/.test(TERM_PROGRAM_VERSION)) {
441
+ const date = TERM_PROGRAM_VERSION.slice("0-unstable-".length);
442
+ return date >= "2020-06-20";
443
+ }
444
+ return version.major >= 20200620;
445
+ }
446
+ case "vscode": {
447
+ if (CURSOR_TRACE_ID) {
448
+ return true;
449
+ }
450
+ return version.major > 1 || version.major === 1 && version.minor >= 72;
451
+ }
452
+ case "ghostty": {
453
+ return true;
454
+ }
455
+ case "zed": {
456
+ return true;
457
+ }
458
+ }
459
+ }
460
+ if (VTE_VERSION) {
461
+ if (VTE_VERSION === "0.50.0") {
462
+ return false;
463
+ }
464
+ const version = parseVersion(VTE_VERSION);
465
+ return version.major > 0 || version.minor >= 50;
466
+ }
467
+ switch (TERM) {
468
+ case "alacritty": {
469
+ return true;
470
+ }
471
+ case "xterm-kitty": {
472
+ return true;
473
+ }
474
+ }
475
+ return false;
476
+ }
477
+ var supportsHyperlinks = {
478
+ stdout: createSupportsHyperlinks(process4.stdout),
479
+ stderr: createSupportsHyperlinks(process4.stderr)
480
+ };
481
+ var supports_hyperlinks_default = supportsHyperlinks;
482
+
483
+ // src/claude-ink/supports-hyperlinks.ts
484
+ var ADDITIONAL_HYPERLINK_TERMINALS = [
485
+ "ghostty",
486
+ "Hyper",
487
+ "kitty",
488
+ "alacritty",
489
+ "iTerm.app",
490
+ "iTerm2"
491
+ ];
492
+ function supportsHyperlinks2(options) {
493
+ const stdoutSupported = options?.stdoutSupported ?? supports_hyperlinks_default.stdout;
494
+ if (stdoutSupported) {
495
+ return true;
496
+ }
497
+ const env2 = options?.env ?? process.env;
498
+ const termProgram = env2["TERM_PROGRAM"];
499
+ if (termProgram && ADDITIONAL_HYPERLINK_TERMINALS.includes(termProgram)) {
500
+ return true;
501
+ }
502
+ const lcTerminal = env2["LC_TERMINAL"];
503
+ if (lcTerminal && ADDITIONAL_HYPERLINK_TERMINALS.includes(lcTerminal)) {
504
+ return true;
505
+ }
506
+ const term = env2["TERM"];
507
+ if (term?.includes("kitty")) {
508
+ return true;
509
+ }
510
+ return false;
511
+ }
512
+
513
+ // src/claude-ink/components/Link.tsx
514
+ var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
515
+ function Link(t0) {
516
+ const $ = (0, import_compiler_runtime.c)(5);
517
+ const {
518
+ children,
519
+ url,
520
+ fallback
521
+ } = t0;
522
+ const content = children ?? url;
523
+ if (supportsHyperlinks2()) {
524
+ let t12;
525
+ if ($[0] !== content || $[1] !== url) {
526
+ t12 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("ink-link", { href: url, children: content }) });
527
+ $[0] = content;
528
+ $[1] = url;
529
+ $[2] = t12;
530
+ } else {
531
+ t12 = $[2];
532
+ }
533
+ return t12;
534
+ }
535
+ const t1 = fallback ?? content;
536
+ let t2;
537
+ if ($[3] !== t1) {
538
+ t2 = /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: t1 });
539
+ $[3] = t1;
540
+ $[4] = t2;
541
+ } else {
542
+ t2 = $[4];
543
+ }
544
+ return t2;
545
+ }
546
+
216
547
  // src/ui/highlight.ts
217
548
  source_default.level = Math.max(source_default.level, 3);
218
549
  var KEYWORD = source_default.hex("#c586c0");
@@ -646,8 +977,52 @@ function highlightCode(source, language = void 0) {
646
977
  return source.split("\n").map((line) => highlightSingleLine(line, keywords)).join("\n");
647
978
  }
648
979
 
980
+ // src/ui/file-links.ts
981
+ import { isAbsolute, resolve } from "path";
982
+ import { pathToFileURL } from "url";
983
+ function fileLinkUrl(reference, workspace) {
984
+ const value = reference.trim();
985
+ if (!value || value.startsWith("#") || /[\x00-\x1f\x7f]/u.test(value)) return void 0;
986
+ if (value.startsWith("file://")) {
987
+ try {
988
+ return new URL(value).href;
989
+ } catch {
990
+ return void 0;
991
+ }
992
+ }
993
+ if (/^[a-z][a-z\d+.-]*:/iu.test(value) && !/^[A-Za-z]:[\\/]/u.test(value)) return void 0;
994
+ const location = /^(.*?):(\d+)(?::\d+)?$/u.exec(value);
995
+ const path = location?.[1] ?? value;
996
+ const absolute = isAbsolute(path);
997
+ if (!absolute && workspace === void 0) return void 0;
998
+ const url = pathToFileURL(absolute ? path : resolve(workspace, path));
999
+ if (location) url.hash = `L${location[2]}`;
1000
+ return url.href;
1001
+ }
1002
+ function looksLikeFilePath(value) {
1003
+ return value.startsWith("file://") || !/^[a-z][a-z\d+.-]*:\/\//iu.test(value) && /^(?:[A-Za-z]:[\\/]|\/|\.{1,2}[\\/]|[^\s/\\]+[/\\]|[^\s/\\]+\.[\w-]+(?::\d+(?::\d+)?)?$)/u.test(value);
1004
+ }
1005
+ var PATH_IN_TEXT = /(^|[\s([{“‘])((?:[A-Za-z]:[\\/]|\/|\.{1,2}[\\/]|[\w.-]+\/)[^\s<>"“”‘’`]+)/gu;
1006
+ function splitFilePaths(text, workspace) {
1007
+ const parts = [];
1008
+ let cursor = 0;
1009
+ for (const match of text.matchAll(PATH_IN_TEXT)) {
1010
+ const start = match.index + match[1].length;
1011
+ const raw = match[2];
1012
+ const path = raw.replace(/[.,;!?)}\]]+$/u, "");
1013
+ const url = fileLinkUrl(path, workspace);
1014
+ if (!url || path.length === 0) continue;
1015
+ if (start > cursor) parts.push({ text: text.slice(cursor, start) });
1016
+ parts.push({ text: path, url });
1017
+ cursor = start + path.length;
1018
+ }
1019
+ if (cursor < text.length) parts.push({ text: text.slice(cursor) });
1020
+ return parts;
1021
+ }
1022
+
649
1023
  // src/ui/markdown.tsx
650
- var import_jsx_runtime = __toESM(require_jsx_runtime(), 1);
1024
+ var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
1025
+ var FileLinkWorkspaceContext = (0, import_react5.createContext)(void 0);
651
1026
  var CODE_BLOCK_BORDER = {
652
1027
  top: "\u2500",
653
1028
  bottom: "\u2500",
@@ -676,9 +1051,9 @@ function MarkdownViewInner({ text }) {
676
1051
  if (advance > 0) stablePrefixRef.current = text.substring(0, boundary + advance);
677
1052
  const stablePrefix = stablePrefixRef.current;
678
1053
  const unstableSuffix = text.substring(stablePrefix.length);
679
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
680
- stablePrefix.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarkdownSegment, { text: stablePrefix }) : null,
681
- unstableSuffix.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(MarkdownSegment, { text: unstableSuffix }) : null
1054
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
1055
+ stablePrefix.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MarkdownSegment, { text: stablePrefix }) : null,
1056
+ unstableSuffix.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MarkdownSegment, { text: unstableSuffix }) : null
682
1057
  ] });
683
1058
  }
684
1059
  var MarkdownSegment = import_react5.default.memo(function MarkdownSegment2({ text }) {
@@ -689,32 +1064,32 @@ var MarkdownSegment = import_react5.default.memo(function MarkdownSegment2({ tex
689
1064
  return [];
690
1065
  }
691
1066
  }, [text]);
692
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_jsx_runtime.Fragment, { children: tokens.map((token, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlockToken, { token }, index)) });
1067
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_jsx_runtime2.Fragment, { children: tokens.map((token, index) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BlockToken, { token }, index)) });
693
1068
  });
694
1069
  var MarkdownView = import_react5.default.memo(MarkdownViewInner);
695
1070
  var BlockToken = import_react5.default.memo(function BlockToken2({ token }) {
696
1071
  switch (token.type) {
697
1072
  case "space":
698
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { height: 1 });
1073
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { height: 1 });
699
1074
  case "heading":
700
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HeadingView, { token });
1075
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HeadingView, { token });
701
1076
  case "paragraph":
702
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlineTokens, { tokens: token.tokens ?? [] }) });
1077
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InlineTokens, { tokens: token.tokens ?? [] }) });
703
1078
  case "code":
704
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(CodeBlock, { token });
1079
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(CodeBlock, { token });
705
1080
  case "blockquote":
706
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlockquoteView, { token });
1081
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BlockquoteView, { token });
707
1082
  case "list":
708
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListView, { token });
1083
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ListView, { token });
709
1084
  case "hr":
710
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(HrView, {});
1085
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(HrView, {});
711
1086
  case "table":
712
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TableView, { token });
1087
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TableView, { token });
713
1088
  case "html":
714
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "[html]" });
1089
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: "[html]" });
715
1090
  default:
716
1091
  if ("text" in token && typeof token.text === "string") {
717
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: token.text });
1092
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: token.text });
718
1093
  }
719
1094
  return null;
720
1095
  }
@@ -733,7 +1108,7 @@ function HeadingView({ token }) {
733
1108
  return source_default.italic.hex("#93c5fd")(inner);
734
1109
  }
735
1110
  }, [token.depth, token.tokens]);
736
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: styled });
1111
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: styled });
737
1112
  }
738
1113
  function CodeBlock({ token }) {
739
1114
  const styledSource = (0, import_react5.useMemo)(() => highlightCode(token.text, token.lang), [token.text, token.lang]);
@@ -746,7 +1121,7 @@ function CodeBlock({ token }) {
746
1121
  // resizes can change that width without changing this memoized token.
747
1122
  // Building a line from process.stdout.columns overflows those narrower
748
1123
  // parents and desynchronizes the terminal's physical auto-wrap cursor.
749
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
1124
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
750
1125
  Box_default,
751
1126
  {
752
1127
  flexDirection: "column",
@@ -756,28 +1131,28 @@ function CodeBlock({ token }) {
756
1131
  borderColor: "gray",
757
1132
  borderText: { content: ` ${label} `, position: "top", align: "start", offset: 1 },
758
1133
  opaque: true,
759
- children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { flexDirection: "column", paddingX: 1, children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "gray", wrap: "truncate-end", children: line.length > 0 ? line : " " }, i)) })
1134
+ children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { flexDirection: "column", paddingX: 1, children: lines.map((line, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "gray", wrap: "truncate-end", children: line.length > 0 ? line : " " }, i)) })
760
1135
  }
761
1136
  )
762
1137
  );
763
1138
  }
764
1139
  function BlockquoteView({ token }) {
765
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { flexDirection: "column", children: token.tokens.map((child, i) => {
1140
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { flexDirection: "column", children: token.tokens.map((child, i) => {
766
1141
  const inline = "tokens" in child ? child.tokens ?? [] : [];
767
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
768
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "gray", children: "\u2502 " }),
769
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlineTokens, { tokens: inline })
1142
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { children: [
1143
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "gray", children: "\u2502 " }),
1144
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InlineTokens, { tokens: inline })
770
1145
  ] }, i);
771
1146
  }) });
772
1147
  }
773
1148
  function HrView() {
774
1149
  const { stdout } = useStdout();
775
1150
  const width = Math.max(8, (stdout?.columns ?? 80) - 4);
776
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "gray", children: "\u2500".repeat(width) });
1151
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "gray", children: "\u2500".repeat(width) });
777
1152
  }
778
1153
  function ListView({ token }) {
779
1154
  const start = typeof token.start === "number" ? token.start : 1;
780
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { flexDirection: "column", children: token.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ListItemView, { item, index: start + i, ordered: token.ordered }, i)) });
1155
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { flexDirection: "column", children: token.items.map((item, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(ListItemView, { item, index: start + i, ordered: token.ordered }, i)) });
781
1156
  }
782
1157
  function ListItemView({
783
1158
  item,
@@ -803,28 +1178,28 @@ function ListItemView({
803
1178
  blockTokens.push(child);
804
1179
  }
805
1180
  }
806
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { flexDirection: "column", children: [
807
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
808
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { color: "cyan", children: [
1181
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", children: [
1182
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { children: [
1183
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { color: "cyan", children: [
809
1184
  bullet,
810
1185
  " "
811
1186
  ] }),
812
1187
  inlineTokens.map((child, i) => {
813
1188
  if (child.type === "paragraph") {
814
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlineTokens, { tokens: child.tokens ?? [] }, i);
1189
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InlineTokens, { tokens: child.tokens ?? [] }, i);
815
1190
  }
816
1191
  const tokens = child.tokens ?? [];
817
- return tokens.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlineTokens, { tokens }, i) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: child.text }, i);
1192
+ return tokens.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InlineTokens, { tokens }, i) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: child.text }, i);
818
1193
  })
819
1194
  ] }),
820
- blockTokens.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(BlockToken, { token: child }) }, i))
1195
+ blockTokens.map((child, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Box_default, { marginLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(BlockToken, { token: child }) }, i))
821
1196
  ] });
822
1197
  }
823
1198
  function TableView({ token }) {
824
1199
  const { stdout } = useStdout();
825
1200
  const maxWidth = stdout?.columns ?? 80;
826
1201
  const colCount = token.header.length;
827
- if (colCount === 0) return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: "[empty table]" });
1202
+ if (colCount === 0) return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: "[empty table]" });
828
1203
  const colWidth = Math.max(8, Math.floor((maxWidth - colCount * 3) / colCount));
829
1204
  const pad = (value, w, align) => {
830
1205
  const stripped = stripAnsi2(value);
@@ -846,56 +1221,66 @@ function TableView({ token }) {
846
1221
  if (align === "center") return ":" + "\u2500".repeat(colWidth - 2) + ":";
847
1222
  return "\u2500".repeat(colWidth);
848
1223
  });
849
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Box_default, { flexDirection: "column", children: [
850
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: token.header.map((cell, i) => pad(cell.text, colWidth, cell.align ?? "left")).join(" \u2502 ") }),
851
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { dimColor: true, children: separator.join(" \u2502 ") }),
852
- token.rows.map((row, ri) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: row.map((cell, i) => pad(cell.text, colWidth, token.header[i]?.align ?? "left")).join(" \u2502 ") }, ri))
1224
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Box_default, { flexDirection: "column", children: [
1225
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: token.header.map((cell, i) => pad(cell.text, colWidth, cell.align ?? "left")).join(" \u2502 ") }),
1226
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { dimColor: true, children: separator.join(" \u2502 ") }),
1227
+ token.rows.map((row, ri) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: row.map((cell, i) => pad(cell.text, colWidth, token.header[i]?.align ?? "left")).join(" \u2502 ") }, ri))
853
1228
  ] });
854
1229
  }
855
1230
  function InlineTokens({ tokens }) {
856
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: tokens.map((token, i) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(InlineToken, { token }, i)) });
1231
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: tokens.map((token, i) => /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InlineToken, { token }, i)) });
857
1232
  }
858
1233
  function InlineToken({ token }) {
1234
+ const workspace = (0, import_react5.useContext)(FileLinkWorkspaceContext);
859
1235
  switch (token.type) {
860
1236
  case "text":
861
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: token.raw ?? token.text });
1237
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: splitFilePaths(token.raw ?? token.text, workspace).map(
1238
+ (part, index) => part.url ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Link, { url: part.url, children: part.text }, index) : /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: part.text }, index)
1239
+ ) });
862
1240
  case "strong":
863
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { bold: true, children: renderInlineText(token.tokens) });
1241
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { bold: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InlineTokens, { tokens: token.tokens }) });
864
1242
  case "em":
865
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { italic: true, children: renderInlineText(token.tokens) });
1243
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { italic: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InlineTokens, { tokens: token.tokens }) });
866
1244
  case "del":
867
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { strikethrough: true, children: renderInlineText(token.tokens) });
868
- case "codespan":
869
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { color: "black", backgroundColor: "gray", children: token.text });
1245
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { strikethrough: true, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(InlineTokens, { tokens: token.tokens }) });
1246
+ case "codespan": {
1247
+ const value = token.text;
1248
+ const url = looksLikeFilePath(value) ? fileLinkUrl(value, workspace) : void 0;
1249
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { color: "black", backgroundColor: "gray", children: url ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Link, { url, children: value }) : value });
1250
+ }
870
1251
  case "link": {
871
1252
  const link = token;
872
1253
  const inner = renderInlineText(link.tokens);
873
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { children: [
874
- inner,
875
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { dimColor: true, color: "blue", children: [
876
- " (",
877
- link.href,
878
- ")"
1254
+ const url = /^(?:https?:\/\/|mailto:|file:\/\/)/iu.test(link.href) ? link.href : looksLikeFilePath(link.href) ? fileLinkUrl(link.href, workspace) : void 0;
1255
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { children: [
1256
+ url ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Link, { url, children: inner }) : inner,
1257
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { dimColor: true, color: "blue", children: [
1258
+ " ",
1259
+ url ? /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Link, { url, children: [
1260
+ "(",
1261
+ link.href,
1262
+ ")"
1263
+ ] }) : `(${link.href})`
879
1264
  ] })
880
1265
  ] });
881
1266
  }
882
1267
  case "image": {
883
1268
  const img = token;
884
- return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(Text, { dimColor: true, children: [
1269
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(Text, { dimColor: true, children: [
885
1270
  "[image: ",
886
1271
  img.text,
887
1272
  "]"
888
1273
  ] });
889
1274
  }
890
1275
  case "br":
891
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: "\n" });
1276
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: "\n" });
892
1277
  case "escape":
893
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: token.text });
1278
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: token.text });
894
1279
  case "html":
895
1280
  return null;
896
1281
  default:
897
1282
  if ("text" in token && typeof token.text === "string") {
898
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(Text, { children: token.text });
1283
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(Text, { children: token.text });
899
1284
  }
900
1285
  return null;
901
1286
  }
@@ -939,9 +1324,9 @@ function inlineTokenToString(token) {
939
1324
  }
940
1325
 
941
1326
  // src/ui/assistant-text.tsx
942
- var import_jsx_runtime2 = __toESM(require_jsx_runtime(), 1);
1327
+ var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
943
1328
  function AssistantTextInner({ text }) {
944
- return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(MarkdownView, { text });
1329
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(MarkdownView, { text });
945
1330
  }
946
1331
  var AssistantText = import_react6.default.memo(AssistantTextInner);
947
1332
 
@@ -1005,7 +1390,7 @@ function wrapPromptInput(input, codePointCursor, options) {
1005
1390
 
1006
1391
  // src/ui/task-progress.tsx
1007
1392
  var import_react7 = __toESM(require_react(), 1);
1008
- var import_jsx_runtime3 = __toESM(require_jsx_runtime(), 1);
1393
+ var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
1009
1394
  function TaskStatusLine({
1010
1395
  block,
1011
1396
  interactive,
@@ -1067,28 +1452,28 @@ function TaskStatusLine({
1067
1452
  ...metaLabel === void 0 ? [] : [{ text: ` ${metaLabel}`, color: metaColor ?? "ansi:blackBright" }]
1068
1453
  ];
1069
1454
  const boundedText = textWidth === void 0 || maxTextLines === void 0 ? void 0 : limitTaskTextSegments(textSegments, textWidth, maxTextLines).segments;
1070
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
1071
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { ref, flexDirection: "row", width: "100%", children: boundedText === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1072
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: [
1455
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
1456
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { ref, flexDirection: "row", width: "100%", children: boundedText === void 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1457
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: [
1073
1458
  presentation.glyph,
1074
1459
  " "
1075
1460
  ] }),
1076
- badge ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text, { color: badgeColor, children: [
1461
+ badge ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: badgeColor, children: [
1077
1462
  badge,
1078
1463
  " "
1079
1464
  ] }) : null,
1080
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: before }),
1081
- statusLabel !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1082
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: " \xB7 " }),
1083
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: statusColor ?? presentation.color, children: statusLabel })
1465
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: before }),
1466
+ statusLabel !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1467
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: " \xB7 " }),
1468
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: statusColor ?? presentation.color, children: statusLabel })
1084
1469
  ] }) : null,
1085
- after ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: after }) : null,
1086
- metaLabel === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Text, { color: metaColor ?? "ansi:blackBright", children: [
1470
+ after ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { ...presentation.color === void 0 ? {} : { color: presentation.color }, children: after }) : null,
1471
+ metaLabel === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: metaColor ?? "ansi:blackBright", children: [
1087
1472
  " ",
1088
1473
  metaLabel
1089
1474
  ] })
1090
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { children: boundedText.map((segment, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { ...segment.color === void 0 ? {} : { color: segment.color }, children: segment.text }, index)) }) }),
1091
- thinkingLine === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(ThinkingLineView, { text: thinkingLine })
1475
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: boundedText.map((segment, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { ...segment.color === void 0 ? {} : { color: segment.color }, children: segment.text }, index)) }) }),
1476
+ thinkingLine === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(ThinkingLineView, { text: thinkingLine })
1092
1477
  ] });
1093
1478
  }
1094
1479
  function limitTaskTextSegments(segments, width, maxLines = 3) {
@@ -1153,9 +1538,9 @@ function limitTaskTextSegments(segments, width, maxLines = 3) {
1153
1538
  var THINKING_RAIL = "#416f84";
1154
1539
  var THINKING_TEXT = "#91a0a8";
1155
1540
  function ThinkingLineView({ text }) {
1156
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexDirection: "row", children: [
1157
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: THINKING_RAIL, children: "\u2502 " }),
1158
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: THINKING_TEXT, wrap: "truncate-end", children: text })
1541
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "row", children: [
1542
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: THINKING_RAIL, children: "\u2502 " }),
1543
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: THINKING_TEXT, wrap: "truncate-end", children: text })
1159
1544
  ] });
1160
1545
  }
1161
1546
  var SPLIT_TRACK_MIN_COLUMNS = 96;
@@ -1179,7 +1564,7 @@ function TaskProgressPanel({
1179
1564
  const hoverProps = (track) => ({
1180
1565
  onMouseEnter: () => onHoverChange?.(track)
1181
1566
  });
1182
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1567
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1183
1568
  Box_default,
1184
1569
  {
1185
1570
  flexDirection: "column",
@@ -1187,7 +1572,7 @@ function TaskProgressPanel({
1187
1572
  width: "100%",
1188
1573
  maxHeight,
1189
1574
  onMouseLeave: () => onHoverChange?.(null),
1190
- children: split ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1575
+ children: split ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1191
1576
  SplitTracks,
1192
1577
  {
1193
1578
  taskBlocks,
@@ -1199,7 +1584,7 @@ function TaskProgressPanel({
1199
1584
  subagentScrollRef,
1200
1585
  hoverProps
1201
1586
  }
1202
- ) : hasTasks && hasSubagents ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1587
+ ) : hasTasks && hasSubagents ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1203
1588
  StackedTracks,
1204
1589
  {
1205
1590
  taskBlocks,
@@ -1211,7 +1596,7 @@ function TaskProgressPanel({
1211
1596
  subagentScrollRef,
1212
1597
  hoverProps
1213
1598
  }
1214
- ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1599
+ ) : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1215
1600
  SingleTrack,
1216
1601
  {
1217
1602
  role: hasTasks ? "main" : "subagent",
@@ -1240,14 +1625,14 @@ function SplitTracks({
1240
1625
  const availableWidth = columns - SPLIT_TRACK_GUTTER_COLUMNS;
1241
1626
  const leftWidth = Math.max(1, Math.floor(availableWidth * SPLIT_TRACK_MAIN_RATIO));
1242
1627
  const rightWidth = Math.max(1, availableWidth - leftWidth);
1243
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1244
- /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexDirection: "row", width: "100%", children: [
1245
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { width: leftWidth, ...hoverProps("main"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TrackHeader, { role: "main", count: taskBlocks.length, width: leftWidth }) }),
1246
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "ansi:white", children: "\u2500\u252C\u2500" }),
1247
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { width: rightWidth, ...hoverProps("subagent"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TrackHeader, { role: "subagent", count: subagentBlocks.length, width: rightWidth }) })
1628
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1629
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "row", width: "100%", children: [
1630
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { width: leftWidth, ...hoverProps("main"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TrackHeader, { role: "main", count: taskBlocks.length, width: leftWidth }) }),
1631
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "ansi:white", children: "\u2500\u252C\u2500" }),
1632
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { width: rightWidth, ...hoverProps("subagent"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TrackHeader, { role: "subagent", count: subagentBlocks.length, width: rightWidth }) })
1248
1633
  ] }),
1249
- contentHeight <= 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexDirection: "row", width: "100%", height: contentHeight, children: [
1250
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { width: leftWidth, minWidth: 0, flexDirection: "column", ...hoverProps("main"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1634
+ contentHeight <= 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "row", width: "100%", height: contentHeight, children: [
1635
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { width: leftWidth, minWidth: 0, flexDirection: "column", ...hoverProps("main"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1251
1636
  TrackScrollBox,
1252
1637
  {
1253
1638
  ref: mainScrollRef,
@@ -1258,8 +1643,8 @@ function SplitTracks({
1258
1643
  maxTextLines: 2
1259
1644
  }
1260
1645
  ) }),
1261
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TrackDivider, { height: contentHeight }),
1262
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { width: rightWidth, minWidth: 0, flexDirection: "column", ...hoverProps("subagent"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1646
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TrackDivider, { height: contentHeight }),
1647
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { width: rightWidth, minWidth: 0, flexDirection: "column", ...hoverProps("subagent"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1263
1648
  TrackScrollBox,
1264
1649
  {
1265
1650
  ref: subagentScrollRef,
@@ -1284,12 +1669,12 @@ function StackedTracks({
1284
1669
  hoverProps
1285
1670
  }) {
1286
1671
  if (height <= 1) {
1287
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { ...hoverProps("main"), children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TrackHeader, { role: "main", count: taskBlocks.length, width: columns }) });
1672
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { ...hoverProps("main"), children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TrackHeader, { role: "main", count: taskBlocks.length, width: columns }) });
1288
1673
  }
1289
1674
  const mainHeight = Math.ceil(height / 2);
1290
1675
  const subagentHeight = Math.floor(height / 2);
1291
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
1292
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1676
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
1677
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1293
1678
  SingleTrack,
1294
1679
  {
1295
1680
  role: "main",
@@ -1301,7 +1686,7 @@ function StackedTracks({
1301
1686
  hoverProps
1302
1687
  }
1303
1688
  ),
1304
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1689
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1305
1690
  SingleTrack,
1306
1691
  {
1307
1692
  role: "subagent",
@@ -1325,9 +1710,9 @@ function SingleTrack({
1325
1710
  hoverProps
1326
1711
  }) {
1327
1712
  const contentHeight = Math.max(0, height - 1);
1328
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(Box_default, { flexDirection: "column", width: "100%", height, ...hoverProps(role), children: [
1329
- /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(TrackHeader, { role, count: blocks.length, width }),
1330
- contentHeight <= 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1713
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexDirection: "column", width: "100%", height, ...hoverProps(role), children: [
1714
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(TrackHeader, { role, count: blocks.length, width }),
1715
+ contentHeight <= 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1331
1716
  TrackScrollBox,
1332
1717
  {
1333
1718
  ref: scrollRef,
@@ -1348,7 +1733,7 @@ function TrackScrollBox({
1348
1733
  width,
1349
1734
  maxTextLines
1350
1735
  }) {
1351
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1736
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1352
1737
  ScrollBox_default,
1353
1738
  {
1354
1739
  ...ref === void 0 ? {} : { ref },
@@ -1358,7 +1743,7 @@ function TrackScrollBox({
1358
1743
  height,
1359
1744
  maxHeight: height,
1360
1745
  paddingX: 1,
1361
- children: blocks.map((block) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
1746
+ children: blocks.map((block) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
1362
1747
  TaskStatusLine,
1363
1748
  {
1364
1749
  block,
@@ -1376,10 +1761,10 @@ function TrackHeader({ role, count, width }) {
1376
1761
  const label = role === "main" ? `task plan (${count})` : `subagents (${count})`;
1377
1762
  const prefix = `\u2500\u2500 ${label} `;
1378
1763
  const line = prefix.length >= width ? prefix.slice(0, Math.max(0, width)) : `${prefix}${"\u2500".repeat(width - prefix.length)}`;
1379
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "ansi:white", wrap: "truncate-end", children: line });
1764
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "ansi:white", wrap: "truncate-end", children: line });
1380
1765
  }
1381
1766
  function TrackDivider({ height }) {
1382
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Box_default, { flexDirection: "column", width: SPLIT_TRACK_GUTTER_COLUMNS, flexShrink: 0, children: Array.from({ length: height }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(Text, { color: "ansi:white", children: " \u2502 " }, index)) });
1767
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { flexDirection: "column", width: SPLIT_TRACK_GUTTER_COLUMNS, flexShrink: 0, children: Array.from({ length: height }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "ansi:white", children: " \u2502 " }, index)) });
1383
1768
  }
1384
1769
 
1385
1770
  // src/ui/file-diff-style.ts
@@ -1627,7 +2012,7 @@ function comparePaths(left, right) {
1627
2012
  }
1628
2013
 
1629
2014
  // src/ui/welcome.tsx
1630
- var import_jsx_runtime4 = __toESM(require_jsx_runtime(), 1);
2015
+ var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
1631
2016
  var WIDE_WELCOME_COLUMNS = 72;
1632
2017
  var FLAVOR_ACCENT = "#67D4FF";
1633
2018
  var FLAVOR_WORDMARK = [
@@ -1646,12 +2031,12 @@ function WelcomeCard({
1646
2031
  const wide = Math.max(1, Math.floor(columns)) >= WIDE_WELCOME_COLUMNS && availableRows >= 9 + Math.max(serviceName === void 0 ? 0 : 1, updateTo === void 0 ? 0 : 1);
1647
2032
  const minimal = availableRows < 6 + (updateTo === void 0 ? 0 : 2);
1648
2033
  if (minimal) {
1649
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { width: "100%", flexDirection: "column", children: [
1650
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, color: FLAVOR_ACCENT, wrap: "truncate-end", children: "\u25C6 Flavor Code" }),
1651
- availableRows >= 2 ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: updateTo === void 0 ? "/help \xB7 /init" : `\u25B2 Update v${updateTo} \xB7 flavor update` }) : null
2034
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { width: "100%", flexDirection: "column", children: [
2035
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: FLAVOR_ACCENT, wrap: "truncate-end", children: "\u25C6 Flavor Code" }),
2036
+ availableRows >= 2 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: updateTo === void 0 ? "/help \xB7 /init" : `\u25B2 Update v${updateTo} \xB7 flavor update` }) : null
1652
2037
  ] });
1653
2038
  }
1654
- const updateHint = updateTo === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { color: "yellowBright", wrap: "wrap", children: [
2039
+ const updateHint = updateTo === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "yellowBright", wrap: "wrap", children: [
1655
2040
  "\u25B2 ",
1656
2041
  "Update available: v",
1657
2042
  packageVersion(),
@@ -1661,8 +2046,8 @@ function WelcomeCard({
1661
2046
  updateTo,
1662
2047
  "\nRun: flavor update"
1663
2048
  ] });
1664
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { width: "100%", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: wide ? /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { width: "100%", flexDirection: "row", children: [
1665
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
2049
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { width: "100%", borderStyle: "round", borderColor: "yellow", paddingX: 1, children: wide ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { width: "100%", flexDirection: "row", children: [
2050
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
1666
2051
  Box_default,
1667
2052
  {
1668
2053
  width: "36%",
@@ -1675,55 +2060,55 @@ function WelcomeCard({
1675
2060
  borderColor: "yellow",
1676
2061
  paddingRight: 1,
1677
2062
  children: [
1678
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, color: "yellowBright", children: "Welcome back!" }),
1679
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: FLAVOR_ACCENT, children: FLAVOR_WORDMARK }),
1680
- serviceName === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", wrap: "truncate-end", children: serviceName }),
1681
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: model }),
1682
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: workspaceName }),
1683
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { dimColor: true, wrap: "truncate-end", children: [
2063
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: "yellowBright", children: "Welcome back!" }),
2064
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: FLAVOR_ACCENT, children: FLAVOR_WORDMARK }),
2065
+ serviceName === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", wrap: "truncate-end", children: serviceName }),
2066
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: model }),
2067
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: workspaceName }),
2068
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, wrap: "truncate-end", children: [
1684
2069
  "v",
1685
2070
  packageVersion()
1686
2071
  ] })
1687
2072
  ]
1688
2073
  }
1689
2074
  ),
1690
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", paddingLeft: 1, children: [
1691
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, color: "yellowBright", children: "Tips for getting started" }),
1692
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
2075
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexGrow: 1, flexDirection: "column", paddingLeft: 1, children: [
2076
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: "yellowBright", children: "Tips for getting started" }),
2077
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
1693
2078
  "Run ",
1694
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", children: "/init" }),
2079
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: "/init" }),
1695
2080
  " to create or refresh FLAVOR.md"
1696
2081
  ] }),
1697
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
2082
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
1698
2083
  "Type ",
1699
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", children: "@" }),
2084
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: "@" }),
1700
2085
  " to attach a project file"
1701
2086
  ] }),
1702
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box_default, { height: 1 }),
1703
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, color: "yellowBright", children: "Quick commands" }),
1704
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
1705
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", children: "/help" }),
2087
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { height: 1 }),
2088
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: "yellowBright", children: "Quick commands" }),
2089
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
2090
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: "/help" }),
1706
2091
  " \xB7 ",
1707
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", children: "/config" }),
2092
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: "/config" }),
1708
2093
  " \xB7 ",
1709
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", children: "/tasks" })
2094
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: "/tasks" })
1710
2095
  ] }),
1711
2096
  updateHint
1712
2097
  ] })
1713
- ] }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box_default, { width: "100%", flexDirection: "column", children: [
1714
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { bold: true, color: FLAVOR_ACCENT, children: "\u25C6 Flavor Code" }),
1715
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { children: "Welcome back!" }),
1716
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { dimColor: true, wrap: "truncate-end", children: [
2098
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { width: "100%", flexDirection: "column", children: [
2099
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: FLAVOR_ACCENT, children: "\u25C6 Flavor Code" }),
2100
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: "Welcome back!" }),
2101
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, wrap: "truncate-end", children: [
1717
2102
  model,
1718
2103
  " \xB7 ",
1719
2104
  workspaceName,
1720
2105
  " \xB7 v",
1721
2106
  packageVersion()
1722
2107
  ] }),
1723
- /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Text, { children: [
1724
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", children: "/init" }),
2108
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
2109
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: "/init" }),
1725
2110
  " setup \xB7 ",
1726
- /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Text, { color: "cyan", children: "/help" }),
2111
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", children: "/help" }),
1727
2112
  " commands"
1728
2113
  ] }),
1729
2114
  updateHint
@@ -1734,7 +2119,7 @@ function WelcomeCard({
1734
2119
  import { createHash, randomUUID } from "crypto";
1735
2120
  import { constants } from "fs";
1736
2121
  import { mkdir, open, rename, rm } from "fs/promises";
1737
- import { basename as basename2, join, resolve } from "path";
2122
+ import { basename as basename2, join, resolve as resolve2 } from "path";
1738
2123
  var DEFAULT_MAX_IMAGES = 5;
1739
2124
  var DEFAULT_MAX_IMAGE_BYTES = 5 * 1024 * 1024;
1740
2125
  var DEFAULT_MAX_TOTAL_IMAGE_BYTES = 20 * 1024 * 1024;
@@ -1746,7 +2131,7 @@ var SessionAssetStore = class {
1746
2131
  #maxImageBytes;
1747
2132
  #maxTotalBytes;
1748
2133
  constructor(options) {
1749
- this.#root = join(resolve(options.workspace), ".flavor", "session-assets");
2134
+ this.#root = join(resolve2(options.workspace), ".flavor", "session-assets");
1750
2135
  this.#maxImages = positiveInteger(options.maxImages ?? DEFAULT_MAX_IMAGES, "maxImages");
1751
2136
  this.#maxImageBytes = positiveInteger(options.maxImageBytes ?? DEFAULT_MAX_IMAGE_BYTES, "maxImageBytes");
1752
2137
  this.#maxTotalBytes = positiveInteger(options.maxTotalBytes ?? DEFAULT_MAX_TOTAL_IMAGE_BYTES, "maxTotalBytes");
@@ -2018,7 +2403,7 @@ function timestamp(value) {
2018
2403
  // src/ui/prompt-history.ts
2019
2404
  import { createHash as createHash2, randomUUID as randomUUID2 } from "crypto";
2020
2405
  import { mkdir as mkdir2, readFile, rename as rename2, writeFile } from "fs/promises";
2021
- import { join as join2, resolve as resolve2 } from "path";
2406
+ import { join as join2, resolve as resolve3 } from "path";
2022
2407
  var HISTORY_VERSION = 1;
2023
2408
  var PromptHistoryStore = class {
2024
2409
  #directory;
@@ -2027,9 +2412,9 @@ var PromptHistoryStore = class {
2027
2412
  #maxEntries;
2028
2413
  #writeChain = Promise.resolve();
2029
2414
  constructor(options) {
2030
- this.#workspace = resolve2(options.workspace);
2415
+ this.#workspace = resolve3(options.workspace);
2031
2416
  this.#maxEntries = Math.max(1, Math.floor(options.maxEntries ?? 200));
2032
- this.#directory = join2(resolve2(options.home), ".flavor-code", "history");
2417
+ this.#directory = join2(resolve3(options.home), ".flavor-code", "history");
2033
2418
  const key = createHash2("sha256").update(this.#workspace).digest("hex").slice(0, 24);
2034
2419
  this.#path = join2(this.#directory, `${key}.json`);
2035
2420
  }
@@ -2059,7 +2444,7 @@ var PromptHistoryStore = class {
2059
2444
  };
2060
2445
 
2061
2446
  // src/ui/app.tsx
2062
- var import_jsx_runtime5 = __toESM(require_jsx_runtime(), 1);
2447
+ var import_jsx_runtime6 = __toESM(require_jsx_runtime(), 1);
2063
2448
  var HISTORY_CAP = 200;
2064
2449
  var CLIPBOARD_SHORTCUT_FALLBACK_MS = 300;
2065
2450
  var BUILTIN_SLASH_CANDIDATES = [
@@ -3125,7 +3510,7 @@ function App({ workspace, home, resumeSession, instanceId, palAlias, onSessionEn
3125
3510
  setDismissedMentionInput(void 0);
3126
3511
  }
3127
3512
  });
3128
- if (runtime === void 0) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3513
+ if (runtime === void 0) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FileLinkWorkspaceContext.Provider, { value: workspace, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3129
3514
  StartingLayout,
3130
3515
  {
3131
3516
  workspaceName: basename3(workspace),
@@ -3135,9 +3520,9 @@ function App({ workspace, home, resumeSession, instanceId, palAlias, onSessionEn
3135
3520
  columns,
3136
3521
  rows
3137
3522
  }
3138
- );
3523
+ ) });
3139
3524
  const llmServiceName = runtime.services.llmServiceName?.();
3140
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3525
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FileLinkWorkspaceContext.Provider, { value: workspace, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3141
3526
  TerminalLayout,
3142
3527
  {
3143
3528
  model: runtime.services.mainModel(),
@@ -3190,7 +3575,7 @@ function App({ workspace, home, resumeSession, instanceId, palAlias, onSessionEn
3190
3575
  questionAnswers,
3191
3576
  customQuestionActive
3192
3577
  }
3193
- );
3578
+ ) });
3194
3579
  }
3195
3580
  function StartingLayout({
3196
3581
  workspaceName,
@@ -3200,7 +3585,7 @@ function StartingLayout({
3200
3585
  columns,
3201
3586
  rows
3202
3587
  }) {
3203
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3588
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3204
3589
  TerminalLayout,
3205
3590
  {
3206
3591
  model: "starting",
@@ -3427,7 +3812,12 @@ function TerminalLayout({
3427
3812
  [completed, budget]
3428
3813
  );
3429
3814
  const memoryReviewRows = memoryReviews.length === 0 ? 0 : 5;
3430
- const fixedBottomRows = memoryReviewRows + (pendingPrompts.length === 0 ? 0 : 1) + imageAttachments.length + (clipboardNotice === void 0 ? 0 : 1) + (activeSession ? 1 : 0) + 2;
3815
+ const focusedOpen = approval !== void 0 || questions !== void 0 && questions.length > 0 || queueOpen;
3816
+ const focusedRows = focusedOpen ? Math.min(
3817
+ focusedPanelNaturalRows({ approval, approvalExpanded, questions, questionIndex, queueOpen, pendingPrompts, columns, rows }),
3818
+ Math.min(Math.max(4, rows - 3), Math.max(6, Math.floor(rows / 2)))
3819
+ ) : 0;
3820
+ const fixedBottomRows = focusedRows + memoryReviewRows + (pendingPrompts.length === 0 ? 0 : 1) + imageAttachments.length + (clipboardNotice === void 0 ? 0 : 1) + (activeSession ? 1 : 0) + 2;
3431
3821
  const taskPanelRows = taskPanelViewportRows(rows, fixedBottomRows, activeTaskBlocks.length > 0);
3432
3822
  const availableBottomRows = Math.max(1, rows - taskPanelRows - 1);
3433
3823
  const bottomMaxRows = Math.min(availableBottomRows, Math.max(Math.floor(rows / 2), fixedBottomRows + 1));
@@ -3451,36 +3841,16 @@ function TerminalLayout({
3451
3841
  } else {
3452
3842
  footerHint = `Enter send \xB7 \u2191\u2193/Ctrl/Cmd+R history \xB7 ${outputShortcut} ${expandedOutput ? "collapse all output" : "expand all output"} \xB7 Ctrl+C exit`;
3453
3843
  }
3454
- if (approval !== void 0 || questions !== void 0 && questions.length > 0 || queueOpen) {
3455
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3456
- FocusedCliPanel,
3457
- {
3458
- rows,
3459
- columns,
3460
- input,
3461
- promptCursor,
3462
- ...approval === void 0 ? {} : { approval },
3463
- approvalExpanded,
3464
- ...questions === void 0 ? {} : { questions },
3465
- questionIndex,
3466
- customQuestionActive,
3467
- pendingPrompts,
3468
- queueSelection,
3469
- ...onQueueSelectionChange === void 0 ? {} : { onQueueSelectionChange },
3470
- ...focusScrollRef === void 0 ? {} : { focusScrollRef }
3471
- }
3472
- );
3473
- }
3474
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { height: rows, width: "100%", flexDirection: "column", overflow: "hidden", children: [
3475
- showWelcome ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexGrow: 1, flexShrink: 1, flexDirection: "column", overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(WelcomeCard, { model, ...serviceName === void 0 ? {} : { serviceName }, workspaceName, ...updateTo === void 0 ? {} : { updateTo }, columns, availableRows: Math.max(0, rows - taskPanelRows - fixedBottomRows - 1) }) }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ScrollBox_default, { ...scrollRef === void 0 ? {} : { ref: scrollRef }, flexGrow: 1, flexDirection: "column", stickyScroll: true, children: [
3476
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, children: [
3844
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { height: rows, width: "100%", flexDirection: "column", overflow: "hidden", children: [
3845
+ showWelcome && !focusedOpen ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { flexGrow: 1, flexShrink: 1, flexDirection: "column", overflow: "hidden", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(WelcomeCard, { model, ...serviceName === void 0 ? {} : { serviceName }, workspaceName, ...updateTo === void 0 ? {} : { updateTo }, columns, availableRows: Math.max(0, rows - taskPanelRows - fixedBottomRows - 1) }) }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(ScrollBox_default, { ...scrollRef === void 0 ? {} : { ref: scrollRef }, flexGrow: 1, flexDirection: "column", stickyScroll: true, children: [
3846
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { dimColor: true, children: [
3477
3847
  "flavor \xB7 ",
3478
3848
  model,
3479
3849
  " \xB7 ",
3480
3850
  workspaceName
3481
3851
  ] }),
3482
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { height: 1 }),
3483
- completedWindow.hiddenTurns > 0 || completedWindow.hiddenBlocks > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, children: [
3852
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { height: 1 }),
3853
+ completedWindow.hiddenTurns > 0 || completedWindow.hiddenBlocks > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { dimColor: true, children: [
3484
3854
  "\u2026 ",
3485
3855
  completedWindow.hiddenTurns,
3486
3856
  " earlier turns and ",
@@ -3489,21 +3859,21 @@ function TerminalLayout({
3489
3859
  outputShortcut,
3490
3860
  " to view all"
3491
3861
  ] }) : null,
3492
- completedWindow.turns.map((turn, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { ref: (element) => onTurnElement?.(turn.id, element), flexDirection: "column", children: [
3493
- index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TurnSeparator, { width: columns }) : null,
3494
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TurnView, { turn, interactive: false, workspaceName, expandedOutput })
3862
+ completedWindow.turns.map((turn, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { ref: (element) => onTurnElement?.(turn.id, element), flexDirection: "column", children: [
3863
+ index > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TurnSeparator, { width: columns }) : null,
3864
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TurnView, { turn, interactive: false, workspaceName, expandedOutput })
3495
3865
  ] }, turn.id)),
3496
- activeWithoutTasks === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { ref: (element) => onTurnElement?.(activeWithoutTasks.id, element), flexDirection: "column", children: [
3497
- completedWindow.turns.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TurnSeparator, { width: columns }) : null,
3498
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TurnView, { turn: activeWithoutTasks, interactive: activeSession, workspaceName, expandedOutput })
3866
+ activeWithoutTasks === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { ref: (element) => onTurnElement?.(activeWithoutTasks.id, element), flexDirection: "column", children: [
3867
+ completedWindow.turns.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TurnSeparator, { width: columns }) : null,
3868
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TurnView, { turn: activeWithoutTasks, interactive: activeSession, workspaceName, expandedOutput })
3499
3869
  ] })
3500
3870
  ] }),
3501
- !scrollBehind || showWelcome ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { width: "100%", onClick: onJumpToLatest, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "yellow", wrap: "truncate-end", children: [
3871
+ !scrollBehind || showWelcome ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { width: "100%", onClick: onJumpToLatest, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "yellow", wrap: "truncate-end", children: [
3502
3872
  newOutput ? "\u2193 New output" : "\u2191 Reading earlier output",
3503
3873
  " \xB7 End latest",
3504
3874
  columns >= 72 ? " \xB7 Ctrl+\u2191/\u2193 turns" : ""
3505
3875
  ] }) }),
3506
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3876
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3507
3877
  TaskProgressPanel,
3508
3878
  {
3509
3879
  blocks: activeTaskBlocks,
@@ -3515,30 +3885,47 @@ function TerminalLayout({
3515
3885
  ...onTaskPanelHoverChange === void 0 ? {} : { onHoverChange: onTaskPanelHoverChange }
3516
3886
  }
3517
3887
  ),
3518
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { position: "relative", flexShrink: 0, width: "100%", children: [
3519
- completion === void 0 && mentionCompletion === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { position: "absolute", bottom: "100%", left: 0, right: 0, flexDirection: "column", opaque: true, children: [
3520
- completion === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(SlashMenu, { completion }),
3521
- mentionCompletion === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MentionMenu, { completion: mentionCompletion, ...onMentionSelect === void 0 ? {} : { onSelect: onMentionSelect } })
3888
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { position: "relative", flexShrink: 0, width: "100%", children: [
3889
+ completion === void 0 && mentionCompletion === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { position: "absolute", bottom: "100%", left: 0, right: 0, flexDirection: "column", opaque: true, children: [
3890
+ completion === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(SlashMenu, { completion }),
3891
+ mentionCompletion === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MentionMenu, { completion: mentionCompletion, ...onMentionSelect === void 0 ? {} : { onSelect: onMentionSelect } })
3522
3892
  ] }),
3523
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", flexShrink: 0, maxHeight: bottomMaxRows, width: "100%", overflowY: "hidden", children: [
3524
- memoryReviews.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(MemoryReviewCards, { reviews: memoryReviews, autoDismissSeconds: memoryAutoDismissSeconds }),
3525
- !activeSession ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", wrap: "truncate-end", children: columns < 48 ? "Running \xB7 Enter queues \xB7 /queue list" : "Running \xB7 /queue manage \xB7 Enter queues next \xB7 /steer acts now" }),
3526
- pendingPrompts.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "yellow", wrap: "truncate-end", children: [
3893
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", flexShrink: 0, maxHeight: bottomMaxRows, width: "100%", overflowY: "hidden", children: [
3894
+ !focusedOpen ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3895
+ FocusedCliPanel,
3896
+ {
3897
+ rows,
3898
+ panelRows: focusedRows,
3899
+ columns,
3900
+ ...approval === void 0 ? {} : { approval },
3901
+ approvalExpanded,
3902
+ ...questions === void 0 ? {} : { questions },
3903
+ questionIndex,
3904
+ customQuestionActive,
3905
+ pendingPrompts,
3906
+ queueSelection,
3907
+ ...onQueueSelectionChange === void 0 ? {} : { onQueueSelectionChange },
3908
+ ...focusScrollRef === void 0 ? {} : { focusScrollRef }
3909
+ }
3910
+ ),
3911
+ memoryReviews.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(MemoryReviewCards, { reviews: memoryReviews, autoDismissSeconds: memoryAutoDismissSeconds }),
3912
+ !activeSession ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "cyan", wrap: "truncate-end", children: columns < 48 ? "Running \xB7 Enter queues \xB7 /queue list" : "Running \xB7 /queue manage \xB7 Enter queues next \xB7 /steer acts now" }),
3913
+ pendingPrompts.length === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "yellow", wrap: "truncate-end", children: [
3527
3914
  "Pending (",
3528
3915
  pendingPrompts.length,
3529
3916
  ") \xB7 /queue manage \xB7 ",
3530
3917
  queuedPromptLabel(pendingPrompts.at(-1)),
3531
3918
  " \xB7 Esc edit latest"
3532
3919
  ] }),
3533
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: "\u2500".repeat(dividerWidth) }),
3534
- imageAttachments.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "cyan", wrap: "truncate-end", children: [
3920
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "\u2500".repeat(dividerWidth) }),
3921
+ imageAttachments.map((image, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "cyan", wrap: "truncate-end", children: [
3535
3922
  "[Image #",
3536
3923
  index + 1,
3537
3924
  "] ",
3538
3925
  image.name ?? basename3(image.source.path)
3539
3926
  ] }, `${image.sha256}:${index}`)),
3540
- clipboardNotice === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", wrap: "truncate-end", children: clipboardNotice }),
3541
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3927
+ clipboardNotice === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "yellow", wrap: "truncate-end", children: clipboardNotice }),
3928
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3542
3929
  PromptLine,
3543
3930
  {
3544
3931
  input,
@@ -3550,7 +3937,7 @@ function TerminalLayout({
3550
3937
  ...onPromptCursorChange === void 0 ? {} : { onCursorChange: onPromptCursorChange }
3551
3938
  }
3552
3939
  ),
3553
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
3940
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3554
3941
  FooterStatus,
3555
3942
  {
3556
3943
  hint: footerHint,
@@ -3569,9 +3956,9 @@ function FooterStatus({
3569
3956
  }) {
3570
3957
  const ide = ideFooterPresentation(ideContext);
3571
3958
  const showIde = ide !== void 0 && (columns === void 0 || stringWidth(hint) + stringWidth(ide) + 3 <= columns);
3572
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "row", width: "100%", justifyContent: "space-between", children: [
3573
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexGrow: 1, flexShrink: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: hint }) }),
3574
- !showIde ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexShrink: 0, marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "cyan", wrap: "truncate-end", children: [
3959
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "row", width: "100%", justifyContent: "space-between", children: [
3960
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { flexGrow: 1, flexShrink: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: hint }) }),
3961
+ !showIde ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { flexShrink: 0, marginLeft: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "cyan", wrap: "truncate-end", children: [
3575
3962
  "\u29C9 ",
3576
3963
  ide
3577
3964
  ] }) })
@@ -3584,11 +3971,34 @@ function ideFooterPresentation(context) {
3584
3971
  const count = Math.max(1, endLine - context.selection.start.line + 1);
3585
3972
  return `${count} ${count === 1 ? "line" : "lines"} selected`;
3586
3973
  }
3974
+ function focusedPanelNaturalRows({
3975
+ approval,
3976
+ approvalExpanded,
3977
+ questions,
3978
+ questionIndex,
3979
+ queueOpen,
3980
+ pendingPrompts,
3981
+ columns,
3982
+ rows
3983
+ }) {
3984
+ if (approval !== void 0) {
3985
+ const allowAlways = !isDestructiveTool(approval.tool) && approval.allowAlways !== false;
3986
+ const detail = approvalExpanded ? approvalDetailLines(approval) : [];
3987
+ const contentRows = wrappedRows(approval.reason ?? "This action needs permission.", columns) + detail.reduce((total, line) => total + wrappedRows(line, columns), 0);
3988
+ return 1 + Math.max(contentRows, 1) + 2 + (allowAlways && columns < 36 && rows >= 5 ? 1 : 0);
3989
+ }
3990
+ const question = questions?.[Math.min(questionIndex, questions.length - 1)];
3991
+ if (question !== void 0) {
3992
+ const contentRows = wrappedRows(question.question, columns) + question.options.reduce((total, option) => total + wrappedRows(`${option.label}${option.description ? ` ${option.description}` : ""}`, columns), 0) + 1;
3993
+ return 1 + Math.max(contentRows, 1) + 1;
3994
+ }
3995
+ if (queueOpen) return 1 + Math.max(1, pendingPrompts.length) + 2;
3996
+ return 0;
3997
+ }
3587
3998
  function FocusedCliPanel({
3588
3999
  rows,
4000
+ panelRows,
3589
4001
  columns,
3590
- input,
3591
- promptCursor,
3592
4002
  approval,
3593
4003
  approvalExpanded,
3594
4004
  questions,
@@ -3602,27 +4012,45 @@ function FocusedCliPanel({
3602
4012
  if (approval !== void 0) {
3603
4013
  const allowAlways = !isDestructiveTool(approval.tool) && approval.allowAlways !== false;
3604
4014
  const narrow = columns < 36;
3605
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { height: rows, width: "100%", flexDirection: "column", overflow: "hidden", children: [
3606
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { bold: true, color: "magenta", wrap: "truncate-end", children: [
4015
+ const detailLines = approvalExpanded ? approvalDetailLines(approval) : [];
4016
+ const chromeRows = 3 + (allowAlways && narrow && rows >= 5 ? 1 : 0);
4017
+ const thirdHint = allowAlways && narrow && rows >= 5;
4018
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { width: "100%", height: panelRows, flexDirection: "column", flexShrink: 0, overflow: "hidden", children: [
4019
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { bold: true, color: "magenta", wrap: "truncate-end", children: [
4020
+ "\u250C\u2500 ",
3607
4021
  "Approval \xB7 ",
3608
4022
  approval.tool
3609
4023
  ] }),
3610
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ScrollBox_default, { ...focusScrollRef === void 0 ? {} : { ref: focusScrollRef }, flexGrow: 1, flexDirection: "column", children: [
3611
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "magentaBright", wrap: "wrap", children: approval.reason ?? "This action needs permission." }),
3612
- approvalExpanded ? approvalDetailLines(approval).map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "magentaBright", wrap: "wrap", children: line }, `${approval.id}:detail:${index}`)) : null
4024
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(ScrollBox_default, { ...focusScrollRef === void 0 ? {} : { ref: focusScrollRef }, height: Math.max(1, panelRows - chromeRows), flexDirection: "column", children: [
4025
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "magentaBright", wrap: "wrap", children: [
4026
+ "\u2502 ",
4027
+ approval.reason ?? "This action needs permission."
4028
+ ] }),
4029
+ approvalExpanded ? detailLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "magentaBright", wrap: "wrap", children: [
4030
+ "\u2502 ",
4031
+ line
4032
+ ] }, `${approval.id}:detail:${index}`)) : null
3613
4033
  ] }),
3614
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: "magenta", wrap: "truncate-end", children: narrow ? "y once \xB7 n deny" : "y=once \xB7 n=deny \xB7 Esc=deny" }),
3615
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "magenta", wrap: "truncate-end", children: [
4034
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { bold: true, color: "magenta", wrap: "truncate-end", children: [
4035
+ "\u2502 ",
4036
+ narrow ? "y once \xB7 n deny" : "y=once \xB7 n=deny \xB7 Esc=deny"
4037
+ ] }),
4038
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "magenta", wrap: "truncate-end", children: [
4039
+ thirdHint ? "\u2502 " : "\u2514\u2500 ",
3616
4040
  narrow ? "v details \xB7 e edits" : "v=details \xB7 e=accept edits",
3617
4041
  allowAlways && !narrow ? " \xB7 a=same-type" : ""
3618
4042
  ] }),
3619
- allowAlways && narrow && rows >= 5 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "magenta", wrap: "truncate-end", children: "a same-type \xB7 Esc deny" }) : null
4043
+ thirdHint ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "magenta", wrap: "truncate-end", children: [
4044
+ "\u2514\u2500 ",
4045
+ "a same-type \xB7 Esc deny"
4046
+ ] }) : null
3620
4047
  ] });
3621
4048
  }
3622
4049
  const question = questions?.[Math.min(questionIndex, questions.length - 1)];
3623
4050
  if (question !== void 0) {
3624
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { height: rows, width: "100%", flexDirection: "column", overflow: "hidden", children: [
3625
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { bold: true, color: "cyan", wrap: "truncate-end", children: [
4051
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { width: "100%", height: panelRows, flexDirection: "column", flexShrink: 0, overflow: "hidden", children: [
4052
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { bold: true, color: "cyan", wrap: "truncate-end", children: [
4053
+ "\u250C\u2500 ",
3626
4054
  "Question ",
3627
4055
  questionIndex + 1,
3628
4056
  "/",
@@ -3630,32 +4058,40 @@ function FocusedCliPanel({
3630
4058
  " \xB7 ",
3631
4059
  question.header
3632
4060
  ] }),
3633
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(ScrollBox_default, { ...focusScrollRef === void 0 ? {} : { ref: focusScrollRef }, flexGrow: 1, flexDirection: "column", children: [
3634
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyanBright", wrap: "wrap", children: question.question }),
3635
- question.options.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "cyan", wrap: "wrap", children: [
3636
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { bold: true, color: "green", children: [
4061
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(ScrollBox_default, { ...focusScrollRef === void 0 ? {} : { ref: focusScrollRef }, height: Math.max(1, panelRows - 2), flexDirection: "column", children: [
4062
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "cyanBright", wrap: "wrap", children: [
4063
+ "\u2502 ",
4064
+ question.question
4065
+ ] }),
4066
+ question.options.map((option, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "cyan", wrap: "wrap", children: [
4067
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { bold: true, color: "green", children: [
4068
+ "\u2502 ",
3637
4069
  index + 1,
3638
4070
  ". ",
3639
4071
  option.label
3640
4072
  ] }),
3641
4073
  option.description ? ` ${option.description}` : ""
3642
4074
  ] }, index)),
3643
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "cyan", children: [
4075
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "cyan", children: [
4076
+ "\u2502 ",
3644
4077
  question.options.length + 1,
3645
4078
  ". Custom input"
3646
4079
  ] })
3647
4080
  ] }),
3648
- customQuestionActive ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PromptLine, { input, pastedBlocks: [], cursor: promptCursor, columns, maxVisibleLines: Math.max(1, Math.min(3, Math.floor(rows / 3))) }) : null,
3649
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "cyan", wrap: "truncate-end", children: customQuestionActive ? columns < 40 ? "Enter answer \xB7 Esc choices" : "Enter=answer \xB7 Esc=choices \xB7 PgUp/PgDn=scroll" : columns < 40 ? `1-${question.options.length + 1} choose \xB7 Esc cancel` : `1-${question.options.length + 1}=choose \xB7 Esc=cancel \xB7 PgUp/PgDn=scroll` })
4081
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "cyan", wrap: "truncate-end", children: [
4082
+ "\u2514\u2500 ",
4083
+ customQuestionActive ? columns < 40 ? "Enter answer \xB7 Esc choices" : "Enter=answer \xB7 Esc=choices \xB7 PgUp/PgDn=scroll" : columns < 40 ? `1-${question.options.length + 1} choose \xB7 Esc cancel` : `1-${question.options.length + 1}=choose \xB7 Esc=cancel \xB7 PgUp/PgDn=scroll`
4084
+ ] })
3650
4085
  ] });
3651
4086
  }
3652
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { height: rows, width: "100%", flexDirection: "column", overflow: "hidden", children: [
3653
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { bold: true, color: "yellow", wrap: "truncate-end", children: [
4087
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { width: "100%", height: panelRows, flexDirection: "column", flexShrink: 0, overflow: "hidden", children: [
4088
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { bold: true, color: "yellow", wrap: "truncate-end", children: [
4089
+ "\u250C\u2500 ",
3654
4090
  "Queued messages (",
3655
4091
  pendingPrompts.length,
3656
4092
  ")"
3657
4093
  ] }),
3658
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ScrollBox_default, { ...focusScrollRef === void 0 ? {} : { ref: focusScrollRef }, flexGrow: 1, flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4094
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ScrollBox_default, { ...focusScrollRef === void 0 ? {} : { ref: focusScrollRef }, height: Math.max(1, panelRows - 3), flexDirection: "column", children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3659
4095
  QueueItems,
3660
4096
  {
3661
4097
  items: pendingPrompts,
@@ -3664,21 +4100,30 @@ function FocusedCliPanel({
3664
4100
  ...onQueueSelectionChange === void 0 ? {} : { onSelect: onQueueSelectionChange }
3665
4101
  }
3666
4102
  ) }),
3667
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: "yellow", wrap: "truncate-end", children: columns < 48 ? "Enter edit \xB7 d cancel" : "Enter=edit selected \xB7 d=cancel selected" }),
3668
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", wrap: "truncate-end", children: columns < 48 ? "\u2191\u2193 select \xB7 Esc close" : "\u2191/\u2193=select \xB7 PgUp/PgDn=jump \xB7 Esc=close" })
4103
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { bold: true, color: "yellow", wrap: "truncate-end", children: [
4104
+ "\u2502 ",
4105
+ columns < 48 ? "Enter edit \xB7 d cancel" : "Enter=edit selected \xB7 d=cancel selected"
4106
+ ] }),
4107
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "yellow", wrap: "truncate-end", children: [
4108
+ "\u2514\u2500 ",
4109
+ columns < 48 ? "\u2191\u2193 select \xB7 Esc close" : "\u2191/\u2193=select \xB7 PgUp/PgDn=jump \xB7 Esc=close"
4110
+ ] })
3669
4111
  ] });
3670
4112
  }
4113
+ function wrappedRows(text, columns) {
4114
+ return Math.max(1, Math.ceil(stringWidth(text) / Math.max(20, columns)));
4115
+ }
3671
4116
  function QueueItems({ items, selection, scrollRef, onSelect }) {
3672
4117
  const selectedElement = (0, import_react8.useRef)(null);
3673
4118
  (0, import_react8.useEffect)(() => {
3674
4119
  if (selectedElement.current !== null) scrollRef?.current?.scrollToElement(selectedElement.current);
3675
4120
  }, [selection, items.length, scrollRef]);
3676
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexDirection: "column", width: "100%", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4121
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { flexDirection: "column", width: "100%", children: items.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3677
4122
  Box_default,
3678
4123
  {
3679
4124
  ref: index === selection ? selectedElement : void 0,
3680
4125
  onClick: () => onSelect?.(index),
3681
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: index === selection ? "yellowBright" : void 0, bold: index === selection, wrap: "wrap", children: [
4126
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: index === selection ? "yellowBright" : void 0, bold: index === selection, wrap: "wrap", children: [
3682
4127
  index === selection ? "\u276F" : " ",
3683
4128
  " ",
3684
4129
  index + 1,
@@ -3698,39 +4143,43 @@ function MemoryReviewCards({ reviews, autoDismissSeconds }) {
3698
4143
  const timer = setInterval(() => setRemaining((current) => Math.max(0, current - 1)), 1e3);
3699
4144
  return () => clearInterval(timer);
3700
4145
  }, [review.id, autoDismissSeconds]);
3701
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
3702
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { bold: true, color: "yellow", children: [
4146
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
4147
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { bold: true, color: "yellow", children: [
3703
4148
  "\u250C\u2500 Long-term memory requires confirmation (",
3704
4149
  reviews.length,
3705
4150
  ")"
3706
4151
  ] }),
3707
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "yellowBright", wrap: "truncate-end", children: [
4152
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "yellowBright", wrap: "truncate-end", children: [
3708
4153
  "\u2502 [",
3709
4154
  review.type,
3710
4155
  "] ",
3711
4156
  review.content
3712
4157
  ] }),
3713
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: "\u2502 Model-generated content is not stored until you approve it." }),
3714
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "yellow", children: [
4158
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { dimColor: true, wrap: "truncate-end", children: [
4159
+ "\u2502 ",
4160
+ review.evidence === void 0 ? "No verified user quote; check before saving." : `User said: \u201C${review.evidence}\u201D`
4161
+ ] }),
4162
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "\u2502 Model-generated content is not stored until you approve it." }),
4163
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "yellow", children: [
3715
4164
  "\u2514\u2500 ",
3716
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, children: "Ctrl+Y" }),
4165
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, children: "Ctrl+Y" }),
3717
4166
  " save / ",
3718
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, children: "Ctrl+N" }),
4167
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, children: "Ctrl+N" }),
3719
4168
  " ignore",
3720
- autoDismissSeconds > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, color: "cyanBright", children: ` (auto-dismiss in ${remaining}s)` }) : " (conversation remains available)"
4169
+ autoDismissSeconds > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, color: "cyanBright", children: ` (auto-dismiss in ${remaining}s)` }) : " (stays pending until reviewed)"
3721
4170
  ] })
3722
4171
  ] });
3723
4172
  }
3724
4173
  function SlashMenu({ completion }) {
3725
4174
  const visible = completion.items.slice(completion.windowStart, completion.windowStart + 6);
3726
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexDirection: "column", width: "100%", children: visible.map((candidate, visibleIndex) => {
4175
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { flexDirection: "column", width: "100%", children: visible.map((candidate, visibleIndex) => {
3727
4176
  const index = completion.windowStart + visibleIndex;
3728
4177
  const presentation = slashCandidatePresentation(index === completion.selectedIndex);
3729
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { ...presentation.rowStyle, wrap: "truncate-end", children: [
4178
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { ...presentation.rowStyle, wrap: "truncate-end", children: [
3730
4179
  presentation.marker,
3731
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HighlightedName, { name: candidate.name, query: completion.query, matchStyle: presentation.matchStyle }),
3732
- candidate.kind === "skill" || candidate.kind === "plugin" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: candidate.kind === "skill" ? "magentaBright" : "cyanBright", children: ` ${candidate.kind}` }) : null,
3733
- candidate.description === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: ` ${normalizeSlashDescription(candidate.description)}` })
4180
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HighlightedName, { name: candidate.name, query: completion.query, matchStyle: presentation.matchStyle }),
4181
+ candidate.kind === "skill" || candidate.kind === "plugin" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: candidate.kind === "skill" ? "magentaBright" : "cyanBright", children: ` ${candidate.kind}` }) : null,
4182
+ candidate.description === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: ` ${normalizeSlashDescription(candidate.description)}` })
3734
4183
  ] }, `${candidate.kind}:${candidate.name}`);
3735
4184
  }) });
3736
4185
  }
@@ -3739,19 +4188,19 @@ function MentionMenu({
3739
4188
  onSelect
3740
4189
  }) {
3741
4190
  const visible = completion.items.slice(completion.windowStart, completion.windowStart + 6);
3742
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexDirection: "column", width: "100%", children: visible.map((path, visibleIndex) => {
4191
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { flexDirection: "column", width: "100%", children: visible.map((path, visibleIndex) => {
3743
4192
  const index = completion.windowStart + visibleIndex;
3744
4193
  const presentation = mentionCandidatePresentation(index === completion.selectedIndex);
3745
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4194
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3746
4195
  Box_default,
3747
4196
  {
3748
4197
  width: "100%",
3749
4198
  onClick: (event) => {
3750
4199
  if (!event.cellIsBlank) onSelect?.(path);
3751
4200
  },
3752
- children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { ...presentation.textStyle, wrap: "truncate-end", children: [
4201
+ children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { ...presentation.textStyle, wrap: "truncate-end", children: [
3753
4202
  presentation.marker,
3754
- presentation.highlightMatches ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(HighlightedName, { name: path, query: completion.query, matchStyle: presentation.matchStyle }) : path
4203
+ presentation.highlightMatches ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(HighlightedName, { name: path, query: completion.query, matchStyle: presentation.matchStyle }) : path
3755
4204
  ] })
3756
4205
  },
3757
4206
  path
@@ -3764,16 +4213,16 @@ function HighlightedName({
3764
4213
  matchStyle
3765
4214
  }) {
3766
4215
  const ranges = matchRanges(name, query);
3767
- if (ranges.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: name });
4216
+ if (ranges.length === 0) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { children: name });
3768
4217
  const parts = [];
3769
4218
  let cursor = 0;
3770
4219
  for (const [start, end] of ranges) {
3771
4220
  if (start > cursor) parts.push(name.slice(cursor, start));
3772
- parts.push(/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { ...matchStyle, children: name.slice(start, end) }, `${start}:${end}`));
4221
+ parts.push(/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { ...matchStyle, children: name.slice(start, end) }, `${start}:${end}`));
3773
4222
  cursor = end;
3774
4223
  }
3775
4224
  if (cursor < name.length) parts.push(name.slice(cursor));
3776
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: parts });
4225
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { children: parts });
3777
4226
  }
3778
4227
  function jumpScroll(scroll, delta) {
3779
4228
  const maximum = Math.max(0, scroll.getScrollHeight() - scroll.getViewportHeight());
@@ -3816,7 +4265,7 @@ function scrollUp(scroll, amount) {
3816
4265
  else scroll.scrollBy(-amount);
3817
4266
  }
3818
4267
  function TurnSeparator({ width }) {
3819
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.max(1, width - 1)) });
4268
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "\u2500".repeat(Math.max(1, width - 1)) });
3820
4269
  }
3821
4270
  var TurnView = import_react8.default.memo(function TurnView2({
3822
4271
  turn,
@@ -3825,16 +4274,16 @@ var TurnView = import_react8.default.memo(function TurnView2({
3825
4274
  expandedOutput
3826
4275
  }) {
3827
4276
  if (turn.kind === "compaction") {
3828
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, borderStyle: "round", borderColor: "ansi:yellowBright", paddingX: 1, children: [
3829
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:yellowBright", bold: true, children: turn.prompt }),
3830
- turn.blocks.map((block, index) => block.kind === "status" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StatusBlockView, { block, interactive, workspaceName, expandedOutput }, block.id) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AssistantText, { text: block.text }) }, `${turn.id}-text-${index}`))
4277
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, borderStyle: "round", borderColor: "ansi:yellowBright", paddingX: 1, children: [
4278
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:yellowBright", bold: true, children: turn.prompt }),
4279
+ turn.blocks.map((block, index) => block.kind === "status" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatusBlockView, { block, interactive, workspaceName, expandedOutput }, block.id) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AssistantText, { text: block.text }) }, `${turn.id}-text-${index}`))
3831
4280
  ] });
3832
4281
  }
3833
4282
  if (turn.source?.kind === "pal") {
3834
4283
  const context = turn.source.context === void 0 ? "" : ` \xB7 ${turn.source.context}`;
3835
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
3836
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
3837
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "cyanBright", bold: true, children: [
4284
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
4285
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", borderStyle: "round", borderColor: "cyan", paddingX: 1, children: [
4286
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "cyanBright", bold: true, children: [
3838
4287
  "PAL \xB7 ",
3839
4288
  turn.source.alias,
3840
4289
  " (",
@@ -3842,20 +4291,20 @@ var TurnView = import_react8.default.memo(function TurnView2({
3842
4291
  ")",
3843
4292
  context
3844
4293
  ] }),
3845
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:whiteBright", children: turn.prompt })
4294
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:whiteBright", children: turn.prompt })
3846
4295
  ] }),
3847
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, marginTop: 1, children: turn.blocks.map((block, index) => block.kind === "status" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StatusBlockView, { block, interactive, workspaceName, expandedOutput }, block.id) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AssistantText, { text: block.text }) }, `${turn.id}-text-${index}`)) })
4296
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, marginTop: 1, children: turn.blocks.map((block, index) => block.kind === "status" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatusBlockView, { block, interactive, workspaceName, expandedOutput }, block.id) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AssistantText, { text: block.text }) }, `${turn.id}-text-${index}`)) })
3848
4297
  ] });
3849
4298
  }
3850
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
3851
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "row", backgroundColor: "#3a3a3a", paddingX: 1, paddingY: 0, children: [
3852
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:whiteBright", bold: true, backgroundColor: "#3a3a3a", children: "\u276F" }),
3853
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "ansi:whiteBright", bold: true, backgroundColor: "#3a3a3a", children: [
4299
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", marginBottom: 1, children: [
4300
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "row", backgroundColor: "#3a3a3a", paddingX: 1, paddingY: 0, children: [
4301
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:whiteBright", bold: true, backgroundColor: "#3a3a3a", children: "\u276F" }),
4302
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "ansi:whiteBright", bold: true, backgroundColor: "#3a3a3a", children: [
3854
4303
  " ",
3855
4304
  turn.prompt
3856
4305
  ] })
3857
4306
  ] }),
3858
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, marginTop: 1, children: turn.blocks.map((block, index) => block.kind === "status" ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StatusBlockView, { block, interactive, workspaceName, expandedOutput }, block.id) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AssistantText, { text: block.text }) }, `${turn.id}-text-${index}`)) })
4307
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { flexDirection: "column", paddingLeft: 2, marginTop: 1, children: turn.blocks.map((block, index) => block.kind === "status" ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatusBlockView, { block, interactive, workspaceName, expandedOutput }, block.id) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { marginBottom: 1, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AssistantText, { text: block.text }) }, `${turn.id}-text-${index}`)) })
3859
4308
  ] });
3860
4309
  });
3861
4310
  var DIFF_CONTENT = fileDiffLineStyle("context").contentColor;
@@ -3864,11 +4313,11 @@ var DIFF_ADDED_MARKER = fileDiffLineStyle("added").markerColor;
3864
4313
  function FileDiffView({ presentation, expanded }) {
3865
4314
  const operation = presentation.operation === "create" ? "Create" : presentation.operation === "delete" ? "Delete" : "Update";
3866
4315
  if (presentation.operation === "delete") {
3867
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "row", children: [
3868
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: DIFF_REMOVED_MARKER, children: "\u25CF" }),
3869
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: DIFF_CONTENT, children: [
4316
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "row", children: [
4317
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: DIFF_REMOVED_MARKER, children: "\u25CF" }),
4318
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: DIFF_CONTENT, children: [
3870
4319
  " ",
3871
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, children: operation }),
4320
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, children: operation }),
3872
4321
  "(",
3873
4322
  basename3(presentation.path),
3874
4323
  ")"
@@ -3876,29 +4325,29 @@ function FileDiffView({ presentation, expanded }) {
3876
4325
  ] });
3877
4326
  }
3878
4327
  const lineWidth = Math.max(1, ...presentation.lines.map((line) => Math.max(line.oldLine ?? 0, line.newLine ?? 0))).toString().length;
3879
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
3880
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "row", children: [
3881
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: DIFF_ADDED_MARKER, children: "\u25CF" }),
3882
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: DIFF_CONTENT, children: [
4328
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", width: "100%", children: [
4329
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "row", children: [
4330
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: DIFF_ADDED_MARKER, children: "\u25CF" }),
4331
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: DIFF_CONTENT, children: [
3883
4332
  " ",
3884
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { bold: true, children: operation }),
4333
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { bold: true, children: operation }),
3885
4334
  "(",
3886
4335
  basename3(presentation.path),
3887
4336
  ")"
3888
4337
  ] })
3889
4338
  ] }),
3890
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: DIFF_CONTENT, children: [
4339
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: DIFF_CONTENT, children: [
3891
4340
  " \u2514 Added ",
3892
4341
  lineCount(presentation.added),
3893
4342
  ", removed ",
3894
4343
  lineCount(presentation.removed)
3895
4344
  ] }),
3896
- (expanded ? presentation.lines : []).map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FileDiffRow, { line, lineWidth }, `${line.kind}:${line.oldLine ?? ""}:${line.newLine ?? ""}:${index}`))
4345
+ (expanded ? presentation.lines : []).map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FileDiffRow, { line, lineWidth }, `${line.kind}:${line.oldLine ?? ""}:${line.newLine ?? ""}:${index}`))
3897
4346
  ] });
3898
4347
  }
3899
4348
  function FileDiffRow({ line, lineWidth }) {
3900
4349
  if (line.kind === "omitted") {
3901
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: DIFF_CONTENT, dimColor: true, children: [
4350
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: DIFF_CONTENT, dimColor: true, children: [
3902
4351
  " ".repeat(lineWidth + 4),
3903
4352
  line.text
3904
4353
  ] });
@@ -3907,14 +4356,14 @@ function FileDiffRow({ line, lineWidth }) {
3907
4356
  const marker = line.kind === "removed" ? "-" : line.kind === "added" ? "+" : " ";
3908
4357
  const { backgroundColor, markerColor, contentColor } = fileDiffLineStyle(line.kind);
3909
4358
  const prefix = `${String(number ?? "").padStart(lineWidth)} ${marker}| `;
3910
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
4359
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
3911
4360
  Box_default,
3912
4361
  {
3913
4362
  flexDirection: "row",
3914
4363
  width: "100%",
3915
4364
  ...backgroundColor === void 0 ? {} : { backgroundColor },
3916
4365
  children: [
3917
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4366
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3918
4367
  Text,
3919
4368
  {
3920
4369
  color: markerColor,
@@ -3923,7 +4372,7 @@ function FileDiffRow({ line, lineWidth }) {
3923
4372
  children: prefix
3924
4373
  }
3925
4374
  ),
3926
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4375
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
3927
4376
  Text,
3928
4377
  {
3929
4378
  color: contentColor,
@@ -3939,18 +4388,18 @@ function lineCount(count) {
3939
4388
  return `${count} ${count === 1 ? "line" : "lines"}`;
3940
4389
  }
3941
4390
  function StatusLine({ block, interactive }) {
3942
- if (block.progress !== void 0) return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CompactProgressLine, { progress: block.progress });
4391
+ if (block.progress !== void 0) return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CompactProgressLine, { progress: block.progress });
3943
4392
  const running = block.state === "running";
3944
4393
  const [ref, time] = useAnimationFrame(running && interactive ? 120 : null);
3945
4394
  const color = statusLineColor(block);
3946
4395
  const frames = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
3947
4396
  const spinner = running && interactive ? frames[Math.floor(Math.max(0, time) / 120) % frames.length] + " " : "";
3948
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { ref, flexDirection: "row", children: [
3949
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { ...color === void 0 ? { dimColor: true } : { color }, children: [
4397
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { ref, flexDirection: "row", children: [
4398
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { ...color === void 0 ? { dimColor: true } : { color }, children: [
3950
4399
  spinner,
3951
4400
  block.text
3952
4401
  ] }),
3953
- block.hint === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, wrap: "truncate-end", children: [
4402
+ block.hint === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { dimColor: true, wrap: "truncate-end", children: [
3954
4403
  " (",
3955
4404
  block.hint,
3956
4405
  ")"
@@ -3966,13 +4415,13 @@ function statusLineColor(block) {
3966
4415
  }
3967
4416
  function CompactProgressLine({ progress }) {
3968
4417
  const presentation = compactProgressPresentation(progress);
3969
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "row", children: [
3970
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { children: "Compacting context " }),
3971
- presentation.cells.map((cell, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: cell.color, children: [
4418
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "row", children: [
4419
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { children: "Compacting context " }),
4420
+ presentation.cells.map((cell, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: cell.color, children: [
3972
4421
  "\u25A0",
3973
4422
  index === presentation.cells.length - 1 ? "" : " "
3974
4423
  ] }, index)),
3975
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, children: [
4424
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { dimColor: true, children: [
3976
4425
  " ",
3977
4426
  presentation.progress,
3978
4427
  "%"
@@ -4003,13 +4452,13 @@ function PromptLine({
4003
4452
  lineStarts.push(nextLineStart);
4004
4453
  nextLineStart += [...line].length;
4005
4454
  }
4006
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { width: "100%", flexDirection: "column", paddingX: PROMPT_HORIZONTAL_PADDING, children: visibleLines.map((line, visibleIndex) => {
4455
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { width: "100%", flexDirection: "column", paddingX: PROMPT_HORIZONTAL_PADDING, children: visibleLines.map((line, visibleIndex) => {
4007
4456
  const lineIndex = windowStart + visibleIndex;
4008
4457
  const isCursorLine = lineIndex === wrap.cursor.line;
4009
4458
  const points = [...line];
4010
4459
  const cursorCol = wrap.cursor.column;
4011
4460
  const styledCount = Math.max(0, Math.min(points.length, tokenLength - (lineStarts[lineIndex] ?? 0)));
4012
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
4461
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
4013
4462
  Box_default,
4014
4463
  {
4015
4464
  ...onCursorChange === void 0 ? {} : {
@@ -4023,8 +4472,8 @@ function PromptLine({
4023
4472
  }
4024
4473
  },
4025
4474
  children: [
4026
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "yellow", bold: true, children: lineIndex === 0 ? "\u276F " : " " }),
4027
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(PromptLineContent, { points, cursor: cursorCol, cursorVisible: isCursorLine, styledCount })
4475
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "yellow", bold: true, children: lineIndex === 0 ? "\u276F " : " " }),
4476
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(PromptLineContent, { points, cursor: cursorCol, cursorVisible: isCursorLine, styledCount })
4028
4477
  ]
4029
4478
  },
4030
4479
  lineIndex
@@ -4040,14 +4489,14 @@ function StatusBlockView({
4040
4489
  const visibleBlock = cliToolTitle(block);
4041
4490
  const outcome = cliToolOutcome(block);
4042
4491
  const toolOutput = block.tool !== void 0 || block.presentation !== void 0;
4043
- const primary = visibleBlock.activity === "model" || visibleBlock.task !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(TaskStatusLine, { block: visibleBlock, interactive }) : visibleBlock.state === "completed" && visibleBlock.presentation !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ToolPresentationView, { presentation: visibleBlock.presentation, workspaceName, expandedOutput }) : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(StatusLine, { block: visibleBlock, interactive });
4044
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", children: [
4492
+ const primary = visibleBlock.activity === "model" || visibleBlock.task !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(TaskStatusLine, { block: visibleBlock, interactive }) : visibleBlock.state === "completed" && visibleBlock.presentation !== void 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ToolPresentationView, { presentation: visibleBlock.presentation, workspaceName, expandedOutput }) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(StatusLine, { block: visibleBlock, interactive });
4493
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", children: [
4045
4494
  primary,
4046
- outcome === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, children: [
4495
+ outcome === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { dimColor: true, children: [
4047
4496
  "\u2514 ",
4048
4497
  outcome
4049
4498
  ] }) }),
4050
- block.details === void 0 || block.presentation?.kind === "changeset" || toolOutput && !expandedOutput ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AssistantText, { text: block.details }) })
4499
+ block.details === void 0 || block.presentation?.kind === "changeset" || toolOutput && !expandedOutput ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Box_default, { paddingLeft: 2, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AssistantText, { text: block.details }) })
4051
4500
  ] });
4052
4501
  }
4053
4502
  function ToolPresentationView({
@@ -4055,17 +4504,17 @@ function ToolPresentationView({
4055
4504
  workspaceName,
4056
4505
  expandedOutput
4057
4506
  }) {
4058
- if (presentation.kind === "changeset") return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ChangeSetPresentationView, { presentation, workspaceName, expanded: expandedOutput });
4059
- if (presentation.kind === "file-change") return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(FileDiffView, { presentation, expanded: expandedOutput });
4060
- if (presentation.kind === "terminal") return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CommandPresentationView, { presentation, expanded: expandedOutput });
4061
- if (presentation.kind === "web") return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(WebPresentationView, { presentation, expanded: expandedOutput });
4062
- if (presentation.kind === "job") return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(JobPresentationView, { presentation, expanded: expandedOutput });
4063
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, children: [
4064
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
4507
+ if (presentation.kind === "changeset") return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ChangeSetPresentationView, { presentation, workspaceName, expanded: expandedOutput });
4508
+ if (presentation.kind === "file-change") return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(FileDiffView, { presentation, expanded: expandedOutput });
4509
+ if (presentation.kind === "terminal") return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CommandPresentationView, { presentation, expanded: expandedOutput });
4510
+ if (presentation.kind === "web") return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(WebPresentationView, { presentation, expanded: expandedOutput });
4511
+ if (presentation.kind === "job") return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(JobPresentationView, { presentation, expanded: expandedOutput });
4512
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, children: [
4513
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
4065
4514
  presentation.title,
4066
4515
  presentation.summary ? ` \xB7 ${presentation.summary}` : ""
4067
4516
  ] }),
4068
- !expandedOutput || presentation.details === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(AssistantText, { text: presentation.details })
4517
+ !expandedOutput || presentation.details === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(AssistantText, { text: presentation.details })
4069
4518
  ] });
4070
4519
  }
4071
4520
  var CHANGESET_TONE = "#b99bf8";
@@ -4079,10 +4528,10 @@ function ChangeSetPresentationView({
4079
4528
  const removed = presentation.files.reduce((total, file) => total + file.removed, 0);
4080
4529
  const fileLabel = presentation.files.length === 1 ? "FILE" : "FILES";
4081
4530
  const showing = presentation.files.length > visibleFiles.length ? ` \xB7 Showing ${visibleFiles.length} of ${presentation.files.length}` : "";
4082
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4083
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4084
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: CHANGESET_TONE, children: "\u250C\u2500 " }),
4085
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: CHANGESET_TONE, bold: true, children: [
4531
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4532
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4533
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: CHANGESET_TONE, children: "\u250C\u2500 " }),
4534
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: CHANGESET_TONE, bold: true, children: [
4086
4535
  "CHANGESET \xB7 ",
4087
4536
  presentation.files.length,
4088
4537
  " ",
@@ -4092,37 +4541,37 @@ function ChangeSetPresentationView({
4092
4541
  visibleFiles.map((file) => {
4093
4542
  const operation = file.operation.toUpperCase();
4094
4543
  const stats = `+${file.added} -${file.removed}`;
4095
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4096
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: CHANGESET_TONE, children: "\u2502 " }),
4097
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: changeSetOperationColor(file.operation), bold: true, children: operation.padEnd(8) }),
4098
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
4099
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "ansi:green", children: [
4544
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4545
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: CHANGESET_TONE, children: "\u2502 " }),
4546
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: changeSetOperationColor(file.operation), bold: true, children: operation.padEnd(8) }),
4547
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
4548
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "ansi:green", children: [
4100
4549
  "+",
4101
4550
  file.added
4102
4551
  ] }),
4103
4552
  " ",
4104
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "#e06c50", children: [
4553
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "#e06c50", children: [
4105
4554
  "-",
4106
4555
  file.removed
4107
4556
  ] }),
4108
4557
  " ".repeat(Math.max(1, 9 - stats.length))
4109
4558
  ] }),
4110
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:whiteBright", wrap: "truncate-end", children: workspaceRelativePath(file.path, workspaceName) })
4559
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:whiteBright", wrap: "truncate-end", children: workspaceRelativePath(file.path, workspaceName) })
4111
4560
  ] }, `${file.operation}:${file.path}`);
4112
4561
  }),
4113
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4114
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: CHANGESET_TONE, children: "\u2514\u2500 " }),
4115
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
4116
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "ansi:green", children: [
4562
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4563
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: CHANGESET_TONE, children: "\u2514\u2500 " }),
4564
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
4565
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "ansi:green", children: [
4117
4566
  "+",
4118
4567
  added
4119
4568
  ] }),
4120
4569
  " ",
4121
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "#e06c50", children: [
4570
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "#e06c50", children: [
4122
4571
  "-",
4123
4572
  removed
4124
4573
  ] }),
4125
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: showing })
4574
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: showing })
4126
4575
  ] })
4127
4576
  ] })
4128
4577
  ] });
@@ -4151,28 +4600,28 @@ function CommandPresentationView({
4151
4600
  const perStreamLimit = expanded ? Number.POSITIVE_INFINITY : 0;
4152
4601
  const stdout = boundedCommandLines(presentation.stdout ?? "", perStreamLimit);
4153
4602
  const stderr = boundedCommandLines(presentation.stderr ?? "", perStreamLimit);
4154
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4155
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4156
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u250C\u2500 " }),
4157
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: tone, bold: true, children: [
4603
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4604
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4605
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u250C\u2500 " }),
4606
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: tone, bold: true, children: [
4158
4607
  label,
4159
4608
  " \xB7 ",
4160
4609
  state.toUpperCase()
4161
4610
  ] })
4162
4611
  ] }),
4163
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4164
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2502 " }),
4165
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:whiteBright", bold: true, wrap: "truncate-end", children: presentation.command ?? presentation.title })
4612
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4613
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2502 " }),
4614
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:whiteBright", bold: true, wrap: "truncate-end", children: presentation.command ?? presentation.title })
4166
4615
  ] }),
4167
- stdout.total === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CommandOutputSection, { label: "OUTPUT", value: stdout, tone, error: false }),
4168
- stderr.total === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CommandOutputSection, { label: "ERROR", value: stderr, tone, error: true }),
4169
- !expanded || presentation.diagnostic === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4170
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2502 " }),
4171
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: presentation.diagnostic })
4616
+ stdout.total === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CommandOutputSection, { label: "OUTPUT", value: stdout, tone, error: false }),
4617
+ stderr.total === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CommandOutputSection, { label: "ERROR", value: stderr, tone, error: true }),
4618
+ !expanded || presentation.diagnostic === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4619
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2502 " }),
4620
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: presentation.diagnostic })
4172
4621
  ] }),
4173
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4174
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2514\u2500 " }),
4175
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: commandFooter(presentation, state) })
4622
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4623
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2514\u2500 " }),
4624
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: commandFooter(presentation, state) })
4176
4625
  ] })
4177
4626
  ] });
4178
4627
  }
@@ -4182,17 +4631,17 @@ function CommandOutputSection({
4182
4631
  tone,
4183
4632
  error
4184
4633
  }) {
4185
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
4186
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4187
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u251C\u2500 " }),
4188
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: error ? "#e06c50" : tone, bold: true, children: label }),
4189
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: ` \xB7 ${value.total} ${value.total === 1 ? "LINE" : "LINES"}` }),
4190
- value.hidden === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: ` \xB7 ${value.head.length + value.tail.length} SHOWN` })
4634
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
4635
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4636
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u251C\u2500 " }),
4637
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: error ? "#e06c50" : tone, bold: true, children: label }),
4638
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: ` \xB7 ${value.total} ${value.total === 1 ? "LINE" : "LINES"}` }),
4639
+ value.hidden === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: ` \xB7 ${value.head.length + value.tail.length} SHOWN` })
4191
4640
  ] }),
4192
- value.head.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CommandOutputLine, { line, tone, error }, `head:${index}`)),
4193
- value.hidden === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4194
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2502 " }),
4195
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, children: [
4641
+ value.head.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CommandOutputLine, { line, tone, error }, `head:${index}`)),
4642
+ value.hidden === 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4643
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2502 " }),
4644
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { dimColor: true, children: [
4196
4645
  "\u2026 ",
4197
4646
  value.hidden,
4198
4647
  " ",
@@ -4200,13 +4649,13 @@ function CommandOutputSection({
4200
4649
  " hidden"
4201
4650
  ] })
4202
4651
  ] }),
4203
- value.tail.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(CommandOutputLine, { line, tone, error }, `tail:${index}`))
4652
+ value.tail.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(CommandOutputLine, { line, tone, error }, `tail:${index}`))
4204
4653
  ] });
4205
4654
  }
4206
4655
  function CommandOutputLine({ line, tone, error }) {
4207
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4208
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2502 " }),
4209
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: error ? "#e06c50" : "#b8bcc2", wrap: "truncate-end", children: line === "" ? " " : line })
4656
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4657
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2502 " }),
4658
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: error ? "#e06c50" : "#b8bcc2", wrap: "truncate-end", children: line === "" ? " " : line })
4210
4659
  ] });
4211
4660
  }
4212
4661
  function boundedCommandLines(output, limit) {
@@ -4236,51 +4685,51 @@ function WebPresentationView({
4236
4685
  expanded
4237
4686
  }) {
4238
4687
  const items = presentation.items ?? [];
4239
- if (presentation.items === void 0) return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4240
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4241
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#5f87af", children: "\u250C\u2500 " }),
4242
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:cyanBright", bold: true, children: "WEB FETCH" }),
4243
- presentation.summary === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: ` \xB7 ${presentation.summary}` })
4688
+ if (presentation.items === void 0) return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4689
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4690
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#5f87af", children: "\u250C\u2500 " }),
4691
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:cyanBright", bold: true, children: "WEB FETCH" }),
4692
+ presentation.summary === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: ` \xB7 ${presentation.summary}` })
4244
4693
  ] }),
4245
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4246
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#5f87af", children: "\u2502 " }),
4247
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:whiteBright", wrap: "truncate-end", children: presentation.url ?? presentation.title })
4694
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4695
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#5f87af", children: "\u2502 " }),
4696
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:whiteBright", wrap: "truncate-end", children: presentation.url ?? presentation.title })
4248
4697
  ] }),
4249
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4250
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#5f87af", children: "\u2514\u2500 " }),
4251
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: "Page content added to context" })
4698
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4699
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#5f87af", children: "\u2514\u2500 " }),
4700
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "Page content added to context" })
4252
4701
  ] })
4253
4702
  ] });
4254
4703
  const visibleItems = expanded ? items : [];
4255
4704
  const query = presentation.title.replace(/^Search:\s*/iu, "").trim();
4256
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4257
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4258
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#5f87af", children: "\u250C\u2500 " }),
4259
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:cyanBright", bold: true, children: "WEB SEARCH" }),
4260
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: ` \xB7 ${items.length} ${items.length === 1 ? "RESULT" : "RESULTS"}` })
4705
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4706
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4707
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#5f87af", children: "\u250C\u2500 " }),
4708
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:cyanBright", bold: true, children: "WEB SEARCH" }),
4709
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: ` \xB7 ${items.length} ${items.length === 1 ? "RESULT" : "RESULTS"}` })
4261
4710
  ] }),
4262
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4263
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#5f87af", children: "\u2502 " }),
4264
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:whiteBright", bold: true, wrap: "truncate-end", children: query })
4711
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4712
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#5f87af", children: "\u2502 " }),
4713
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:whiteBright", bold: true, wrap: "truncate-end", children: query })
4265
4714
  ] }),
4266
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#5f87af", children: "\u2502" }),
4267
- visibleItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", children: [
4268
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4269
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#5f87af", children: "\u2502 " }),
4270
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:cyanBright", bold: true, children: String(index + 1).padStart(2, "0") }),
4271
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "ansi:whiteBright", wrap: "truncate-end", children: [
4715
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#5f87af", children: "\u2502" }),
4716
+ visibleItems.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", children: [
4717
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4718
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#5f87af", children: "\u2502 " }),
4719
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:cyanBright", bold: true, children: String(index + 1).padStart(2, "0") }),
4720
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "ansi:whiteBright", wrap: "truncate-end", children: [
4272
4721
  " ",
4273
4722
  item.title
4274
4723
  ] })
4275
4724
  ] }),
4276
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4277
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#5f87af", children: "\u2502 " }),
4278
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: compactWebSource(item.url) })
4725
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4726
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#5f87af", children: "\u2502 " }),
4727
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, wrap: "truncate-end", children: compactWebSource(item.url) })
4279
4728
  ] })
4280
4729
  ] }, item.url)),
4281
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4282
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#5f87af", children: "\u2514\u2500 " }),
4283
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: items.length > visibleItems.length ? `Showing ${visibleItems.length} of ${items.length}` : `${items.length} ${items.length === 1 ? "source" : "sources"}` })
4730
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4731
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#5f87af", children: "\u2514\u2500 " }),
4732
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: items.length > visibleItems.length ? `Showing ${visibleItems.length} of ${items.length}` : `${items.length} ${items.length === 1 ? "source" : "sources"}` })
4284
4733
  ] })
4285
4734
  ] });
4286
4735
  }
@@ -4298,43 +4747,43 @@ function JobPresentationView({
4298
4747
  presentation,
4299
4748
  expanded
4300
4749
  }) {
4301
- if (presentation.action === "list") return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(JobListPresentationView, { presentation, expanded });
4750
+ if (presentation.action === "list") return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(JobListPresentationView, { presentation, expanded });
4302
4751
  const state = presentation.state ?? "running";
4303
4752
  const tone = jobStateColor(state);
4304
4753
  const lines = jobOutputLines(presentation.output ?? "");
4305
4754
  const visibleLines = expanded ? lines : [];
4306
4755
  const hiddenLines = lines.length - visibleLines.length;
4307
4756
  const showLog = presentation.action === "read" || presentation.action === "kill" || lines.length > 0;
4308
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4309
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4310
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u250C\u2500 " }),
4311
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: tone, bold: true, children: [
4757
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4758
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4759
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u250C\u2500 " }),
4760
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: tone, bold: true, children: [
4312
4761
  "JOB \xB7 ",
4313
4762
  state.toUpperCase()
4314
4763
  ] })
4315
4764
  ] }),
4316
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4317
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2502 " }),
4318
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:whiteBright", bold: true, children: presentation.id ?? "unknown job" }),
4319
- presentation.jobKind === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: ` \xB7 ${presentation.jobKind}` })
4765
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4766
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2502 " }),
4767
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:whiteBright", bold: true, children: presentation.id ?? "unknown job" }),
4768
+ presentation.jobKind === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: ` \xB7 ${presentation.jobKind}` })
4320
4769
  ] }),
4321
- presentation.label === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4322
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2502 " }),
4323
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "ansi:whiteBright", wrap: "truncate-end", children: presentation.label })
4770
+ presentation.label === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4771
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2502 " }),
4772
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "ansi:whiteBright", wrap: "truncate-end", children: presentation.label })
4324
4773
  ] }),
4325
- presentation.error === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4326
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2502 " }),
4327
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#e06c50", wrap: "truncate-end", children: presentation.error })
4774
+ presentation.error === void 0 ? null : /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4775
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2502 " }),
4776
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#e06c50", wrap: "truncate-end", children: presentation.error })
4328
4777
  ] }),
4329
- showLog ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_jsx_runtime5.Fragment, { children: [
4330
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4331
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u251C\u2500 " }),
4332
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, bold: true, children: "LOG" }),
4333
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: lines.length === 0 ? " \xB7 NO NEW OUTPUT" : ` \xB7 ${lines.length} ${lines.length === 1 ? "LINE" : "LINES"}` })
4778
+ showLog ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
4779
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4780
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u251C\u2500 " }),
4781
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, bold: true, children: "LOG" }),
4782
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: lines.length === 0 ? " \xB7 NO NEW OUTPUT" : ` \xB7 ${lines.length} ${lines.length === 1 ? "LINE" : "LINES"}` })
4334
4783
  ] }),
4335
- hiddenLines > 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4336
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2502 " }),
4337
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, children: [
4784
+ hiddenLines > 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4785
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2502 " }),
4786
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { dimColor: true, children: [
4338
4787
  "\u2026 ",
4339
4788
  hiddenLines,
4340
4789
  " earlier ",
@@ -4342,11 +4791,11 @@ function JobPresentationView({
4342
4791
  " hidden"
4343
4792
  ] })
4344
4793
  ] }) : null,
4345
- visibleLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(JobLogLine, { line, tone }, `${index}:${line}`))
4794
+ visibleLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(JobLogLine, { line, tone }, `${index}:${line}`))
4346
4795
  ] }) : null,
4347
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4348
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2514\u2500 " }),
4349
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: jobFooter(presentation) })
4796
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4797
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2514\u2500 " }),
4798
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: jobFooter(presentation) })
4350
4799
  ] })
4351
4800
  ] });
4352
4801
  }
@@ -4356,41 +4805,41 @@ function JobListPresentationView({
4356
4805
  }) {
4357
4806
  const jobs = presentation.jobs ?? [];
4358
4807
  const visibleJobs = expanded ? jobs : [];
4359
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4360
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4361
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#d7a657", children: "\u250C\u2500 " }),
4362
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "#d7a657", bold: true, children: [
4808
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { flexDirection: "column", paddingLeft: 2, marginBottom: 1, children: [
4809
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4810
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#d7a657", children: "\u250C\u2500 " }),
4811
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "#d7a657", bold: true, children: [
4363
4812
  "JOBS \xB7 ",
4364
4813
  jobs.length
4365
4814
  ] })
4366
4815
  ] }),
4367
- jobs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4368
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#d7a657", children: "\u2502 " }),
4369
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: "No background jobs" })
4370
- ] }) : visibleJobs.map((job) => /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4371
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#d7a657", children: "\u2502 " }),
4372
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: jobStateColor(job.state), bold: true, children: job.state.toUpperCase().padEnd(9) }),
4373
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { color: "ansi:whiteBright", children: [
4816
+ jobs.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4817
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#d7a657", children: "\u2502 " }),
4818
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: "No background jobs" })
4819
+ ] }) : visibleJobs.map((job) => /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4820
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#d7a657", children: "\u2502 " }),
4821
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: jobStateColor(job.state), bold: true, children: job.state.toUpperCase().padEnd(9) }),
4822
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { color: "ansi:whiteBright", children: [
4374
4823
  " ",
4375
4824
  job.id
4376
4825
  ] }),
4377
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { dimColor: true, wrap: "truncate-end", children: [
4826
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { dimColor: true, wrap: "truncate-end", children: [
4378
4827
  " \xB7 ",
4379
4828
  job.label
4380
4829
  ] })
4381
4830
  ] }, job.id)),
4382
- /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4383
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: "#d7a657", children: "\u2514\u2500 " }),
4384
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { dimColor: true, children: jobs.length > visibleJobs.length ? `Showing ${visibleJobs.length} of ${jobs.length}` : `${jobs.length} ${jobs.length === 1 ? "job" : "jobs"}` })
4831
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4832
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: "#d7a657", children: "\u2514\u2500 " }),
4833
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { dimColor: true, children: jobs.length > visibleJobs.length ? `Showing ${visibleJobs.length} of ${jobs.length}` : `${jobs.length} ${jobs.length === 1 ? "job" : "jobs"}` })
4385
4834
  ] })
4386
4835
  ] });
4387
4836
  }
4388
4837
  function JobLogLine({ line, tone }) {
4389
4838
  const error = /^(?:\[stderr\]|ERR(?:OR)?(?:!|:|\s)|npm ERR!)/iu.test(line.trimStart());
4390
4839
  const stage = /^={3}.*={3}$/u.test(line.trim());
4391
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Box_default, { children: [
4392
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { color: tone, children: "\u2502 " }),
4393
- /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
4840
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Box_default, { children: [
4841
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { color: tone, children: "\u2502 " }),
4842
+ /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4394
4843
  Text,
4395
4844
  {
4396
4845
  ...error ? { color: "#e06c50" } : stage ? { color: "ansi:cyanBright", bold: true } : { dimColor: true },
@@ -4562,11 +5011,11 @@ function PromptLineContent({
4562
5011
  styledCount
4563
5012
  }) {
4564
5013
  const tokenStyle = completedSlashTokenPresentation();
4565
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(Text, { children: [
5014
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(Text, { children: [
4566
5015
  points.map((point, index) => {
4567
5016
  const styled = index < styledCount;
4568
5017
  const caret = cursorVisible && index === cursor;
4569
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
5018
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
4570
5019
  Text,
4571
5020
  {
4572
5021
  ...styled ? tokenStyle : {},
@@ -4576,7 +5025,7 @@ function PromptLineContent({
4576
5025
  index
4577
5026
  );
4578
5027
  }),
4579
- cursorVisible && cursor >= points.length ? /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Text, { inverse: true, children: " " }) : null
5028
+ cursorVisible && cursor >= points.length ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Text, { inverse: true, children: " " }) : null
4580
5029
  ] });
4581
5030
  }
4582
5031
  function editPrompt(state, edit) {