@aui.io/apollo 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (147) hide show
  1. package/node_modules/@aui.io/apollo-cli/bin/apollo.js +8 -5
  2. package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js +3 -10
  3. package/node_modules/@aui.io/apollo-cli/dist/src/commands/operate.js.map +1 -1
  4. package/node_modules/@aui.io/apollo-cli/package.json +3 -3
  5. package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.d.ts +13 -0
  6. package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js +17 -0
  7. package/node_modules/@aui.io/apollo-core/dist/src/api/runtime-api.js.map +1 -1
  8. package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.d.ts +17 -0
  9. package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.js +27 -0
  10. package/node_modules/@aui.io/apollo-core/dist/src/services/messaging.js.map +1 -1
  11. package/node_modules/@aui.io/apollo-core/package.json +1 -1
  12. package/node_modules/@aui.io/apollo-tui/dist/src/actions/ActionPalette.d.ts +13 -0
  13. package/node_modules/@aui.io/apollo-tui/dist/src/actions/ActionPalette.js +47 -0
  14. package/node_modules/@aui.io/apollo-tui/dist/src/actions/ActionPalette.js.map +1 -0
  15. package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.d.ts +28 -0
  16. package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.js +219 -0
  17. package/node_modules/@aui.io/apollo-tui/dist/src/actions/registry.js.map +1 -0
  18. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.d.ts +8 -0
  19. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.js +43 -0
  20. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivityDrawer.js.map +1 -0
  21. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivitySummary.d.ts +5 -0
  22. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivitySummary.js +26 -0
  23. package/node_modules/@aui.io/apollo-tui/dist/src/activity/ActivitySummary.js.map +1 -0
  24. package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.d.ts +67 -0
  25. package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.js +138 -0
  26. package/node_modules/@aui.io/apollo-tui/dist/src/activity/operationStore.js.map +1 -0
  27. package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.d.ts +27 -0
  28. package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.js +92 -0
  29. package/node_modules/@aui.io/apollo-tui/dist/src/author/AuthorHome.js.map +1 -0
  30. package/node_modules/@aui.io/apollo-tui/dist/src/author/DiffView.d.ts +46 -0
  31. package/node_modules/@aui.io/apollo-tui/dist/src/author/DiffView.js +87 -0
  32. package/node_modules/@aui.io/apollo-tui/dist/src/author/DiffView.js.map +1 -0
  33. package/node_modules/@aui.io/apollo-tui/dist/src/author/SessionPane.d.ts +15 -0
  34. package/node_modules/@aui.io/apollo-tui/dist/src/author/SessionPane.js +38 -0
  35. package/node_modules/@aui.io/apollo-tui/dist/src/author/SessionPane.js.map +1 -0
  36. package/node_modules/@aui.io/apollo-tui/dist/src/author/ValidationView.d.ts +11 -0
  37. package/node_modules/@aui.io/apollo-tui/dist/src/author/ValidationView.js +34 -0
  38. package/node_modules/@aui.io/apollo-tui/dist/src/author/ValidationView.js.map +1 -0
  39. package/node_modules/@aui.io/apollo-tui/dist/src/author/VersionsView.d.ts +9 -0
  40. package/node_modules/@aui.io/apollo-tui/dist/src/author/VersionsView.js +31 -0
  41. package/node_modules/@aui.io/apollo-tui/dist/src/author/VersionsView.js.map +1 -0
  42. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/claudeCode.d.ts +23 -0
  43. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/claudeCode.js +293 -0
  44. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/claudeCode.js.map +1 -0
  45. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/index.d.ts +4 -0
  46. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/index.js +13 -0
  47. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/index.js.map +1 -0
  48. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/sessions.d.ts +3 -0
  49. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/sessions.js +36 -0
  50. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/sessions.js.map +1 -0
  51. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/types.d.ts +85 -0
  52. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/types.js +11 -0
  53. package/node_modules/@aui.io/apollo-tui/dist/src/author/backend/types.js.map +1 -0
  54. package/node_modules/@aui.io/apollo-tui/dist/src/author/data.d.ts +78 -0
  55. package/node_modules/@aui.io/apollo-tui/dist/src/author/data.js +279 -0
  56. package/node_modules/@aui.io/apollo-tui/dist/src/author/data.js.map +1 -0
  57. package/node_modules/@aui.io/apollo-tui/dist/src/author/session.d.ts +64 -0
  58. package/node_modules/@aui.io/apollo-tui/dist/src/author/session.js +319 -0
  59. package/node_modules/@aui.io/apollo-tui/dist/src/author/session.js.map +1 -0
  60. package/node_modules/@aui.io/apollo-tui/dist/src/author/tree.d.ts +25 -0
  61. package/node_modules/@aui.io/apollo-tui/dist/src/author/tree.js +69 -0
  62. package/node_modules/@aui.io/apollo-tui/dist/src/author/tree.js.map +1 -0
  63. package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.d.ts +23 -0
  64. package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.js +60 -0
  65. package/node_modules/@aui.io/apollo-tui/dist/src/context/ContextSwitcher.js.map +1 -0
  66. package/node_modules/@aui.io/apollo-tui/dist/src/index.d.ts +17 -1
  67. package/node_modules/@aui.io/apollo-tui/dist/src/index.js +22 -1
  68. package/node_modules/@aui.io/apollo-tui/dist/src/index.js.map +1 -1
  69. package/node_modules/@aui.io/apollo-tui/dist/src/keyprobe.d.ts +1 -0
  70. package/node_modules/@aui.io/apollo-tui/dist/src/keyprobe.js +51 -0
  71. package/node_modules/@aui.io/apollo-tui/dist/src/keyprobe.js.map +1 -0
  72. package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.d.ts +15 -0
  73. package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js +111 -19
  74. package/node_modules/@aui.io/apollo-tui/dist/src/lib/actions.js.map +1 -1
  75. package/node_modules/@aui.io/apollo-tui/dist/src/lib/clipboard.d.ts +7 -0
  76. package/node_modules/@aui.io/apollo-tui/dist/src/lib/clipboard.js +33 -0
  77. package/node_modules/@aui.io/apollo-tui/dist/src/lib/clipboard.js.map +1 -0
  78. package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.d.ts +1 -1
  79. package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js +49 -7
  80. package/node_modules/@aui.io/apollo-tui/dist/src/lib/commands.js.map +1 -1
  81. package/node_modules/@aui.io/apollo-tui/dist/src/lib/ide.d.ts +16 -0
  82. package/node_modules/@aui.io/apollo-tui/dist/src/lib/ide.js +39 -0
  83. package/node_modules/@aui.io/apollo-tui/dist/src/lib/ide.js.map +1 -0
  84. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keydiag.d.ts +17 -0
  85. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keydiag.js +76 -0
  86. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keydiag.js.map +1 -0
  87. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keys.d.ts +64 -0
  88. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keys.js +105 -0
  89. package/node_modules/@aui.io/apollo-tui/dist/src/lib/keys.js.map +1 -0
  90. package/node_modules/@aui.io/apollo-tui/dist/src/lib/modes.d.ts +18 -0
  91. package/node_modules/@aui.io/apollo-tui/dist/src/lib/modes.js +24 -0
  92. package/node_modules/@aui.io/apollo-tui/dist/src/lib/modes.js.map +1 -0
  93. package/node_modules/@aui.io/apollo-tui/dist/src/lib/place.d.ts +7 -0
  94. package/node_modules/@aui.io/apollo-tui/dist/src/lib/place.js +17 -1
  95. package/node_modules/@aui.io/apollo-tui/dist/src/lib/place.js.map +1 -1
  96. package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.d.ts +25 -6
  97. package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.js +108 -17
  98. package/node_modules/@aui.io/apollo-tui/dist/src/lib/scope.js.map +1 -1
  99. package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.d.ts +3 -1
  100. package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.js +2 -1
  101. package/node_modules/@aui.io/apollo-tui/dist/src/lib/sheet.js.map +1 -1
  102. package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js +1780 -243
  103. package/node_modules/@aui.io/apollo-tui/dist/src/opentui-app.js.map +1 -1
  104. package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.d.ts +15 -0
  105. package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.js +22 -0
  106. package/node_modules/@aui.io/apollo-tui/dist/src/shell/Breadcrumb.js.map +1 -0
  107. package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.d.ts +8 -0
  108. package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.js +23 -0
  109. package/node_modules/@aui.io/apollo-tui/dist/src/shell/FooterHints.js.map +1 -0
  110. package/node_modules/@aui.io/apollo-tui/dist/src/shell/ModeNav.d.ts +4 -0
  111. package/node_modules/@aui.io/apollo-tui/dist/src/shell/ModeNav.js +7 -0
  112. package/node_modules/@aui.io/apollo-tui/dist/src/shell/ModeNav.js.map +1 -0
  113. package/node_modules/@aui.io/apollo-tui/dist/src/talk/Composer.d.ts +20 -0
  114. package/node_modules/@aui.io/apollo-tui/dist/src/talk/Composer.js +29 -0
  115. package/node_modules/@aui.io/apollo-tui/dist/src/talk/Composer.js.map +1 -0
  116. package/node_modules/@aui.io/apollo-tui/dist/src/talk/InspectorPane.d.ts +15 -0
  117. package/node_modules/@aui.io/apollo-tui/dist/src/talk/InspectorPane.js +27 -0
  118. package/node_modules/@aui.io/apollo-tui/dist/src/talk/InspectorPane.js.map +1 -0
  119. package/node_modules/@aui.io/apollo-tui/dist/src/talk/TalkView.d.ts +30 -0
  120. package/node_modules/@aui.io/apollo-tui/dist/src/talk/TalkView.js +60 -0
  121. package/node_modules/@aui.io/apollo-tui/dist/src/talk/TalkView.js.map +1 -0
  122. package/node_modules/@aui.io/apollo-tui/dist/src/talk/ThreadsPane.d.ts +17 -0
  123. package/node_modules/@aui.io/apollo-tui/dist/src/talk/ThreadsPane.js +61 -0
  124. package/node_modules/@aui.io/apollo-tui/dist/src/talk/ThreadsPane.js.map +1 -0
  125. package/node_modules/@aui.io/apollo-tui/dist/src/talk/data.d.ts +107 -0
  126. package/node_modules/@aui.io/apollo-tui/dist/src/talk/data.js +235 -0
  127. package/node_modules/@aui.io/apollo-tui/dist/src/talk/data.js.map +1 -0
  128. package/node_modules/@aui.io/apollo-tui/dist/src/theme/tokens.d.ts +8 -0
  129. package/node_modules/@aui.io/apollo-tui/dist/src/theme/tokens.js +9 -0
  130. package/node_modules/@aui.io/apollo-tui/dist/src/theme/tokens.js.map +1 -0
  131. package/node_modules/@aui.io/apollo-tui/dist/src/ui/ConfirmPane.d.ts +4 -0
  132. package/node_modules/@aui.io/apollo-tui/dist/src/ui/ConfirmPane.js +15 -0
  133. package/node_modules/@aui.io/apollo-tui/dist/src/ui/ConfirmPane.js.map +1 -0
  134. package/node_modules/@aui.io/apollo-tui/dist/src/ui/OutputPane.d.ts +5 -0
  135. package/node_modules/@aui.io/apollo-tui/dist/src/ui/OutputPane.js +16 -0
  136. package/node_modules/@aui.io/apollo-tui/dist/src/ui/OutputPane.js.map +1 -0
  137. package/node_modules/@aui.io/apollo-tui/dist/src/ui/PickerPane.d.ts +10 -0
  138. package/node_modules/@aui.io/apollo-tui/dist/src/ui/PickerPane.js +29 -0
  139. package/node_modules/@aui.io/apollo-tui/dist/src/ui/PickerPane.js.map +1 -0
  140. package/node_modules/@aui.io/apollo-tui/dist/src/ui/SheetPane.d.ts +4 -0
  141. package/node_modules/@aui.io/apollo-tui/dist/src/ui/SheetPane.js +22 -0
  142. package/node_modules/@aui.io/apollo-tui/dist/src/ui/SheetPane.js.map +1 -0
  143. package/node_modules/@aui.io/apollo-tui/package.json +2 -2
  144. package/package.json +4 -4
  145. package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.d.ts +0 -10
  146. package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.js +0 -19
  147. package/node_modules/@aui.io/apollo-tui/dist/src/lib/tabs.js.map +0 -1
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@opentui/react/jsx-runtime";
2
+ /**
3
+ * Activity drawer (TUI_DESIGN §13.2) — Ctrl+J overlay listing operations:
4
+ * running with elapsed time, finished with outcome and age. The highlighted
5
+ * row shows its last raw output lines; `r`/Enter retries failed operations,
6
+ * `c` copies the raw output.
7
+ */
8
+ import { relativeTime } from "../author/data.js";
9
+ import { OPERATION_GLYPH, formatElapsed, } from "./operationStore.js";
10
+ import { AMBER, DIM, FAINT, FG, RED, TEAL, TEAL_DIM } from "../theme/tokens.js";
11
+ const STATUS_COLOR = {
12
+ running: AMBER,
13
+ succeeded: TEAL,
14
+ failed: RED,
15
+ };
16
+ const OUTPUT_PREVIEW_LINES = 4;
17
+ export function ActivityDrawerPane({ operations, cursor, pageSize, now, }) {
18
+ const start = operations.length <= pageSize
19
+ ? 0
20
+ : Math.max(0, Math.min(cursor - Math.floor(pageSize / 3), operations.length - pageSize));
21
+ const window = operations.slice(start, start + pageSize);
22
+ const highlighted = operations[cursor];
23
+ return (_jsx("box", { title: " activity ", style: {
24
+ border: true,
25
+ borderStyle: "rounded",
26
+ borderColor: TEAL_DIM,
27
+ flexDirection: "column",
28
+ flexGrow: 1,
29
+ width: "100%",
30
+ paddingLeft: 1,
31
+ paddingRight: 1,
32
+ }, children: operations.length === 0 ? (_jsx("text", { fg: DIM, children: "No operations yet \u2014 push, pull, and validate land here." })) : (_jsxs(_Fragment, { children: [start > 0 ? _jsxs("text", { fg: FAINT, children: ["\u2026 ", start, " above"] }) : null, window.map((op, i) => {
33
+ const index = start + i;
34
+ const active = index === cursor;
35
+ const time = op.status === "running"
36
+ ? formatElapsed(now - op.startedAt)
37
+ : relativeTime(op.endedAt ?? op.startedAt);
38
+ return (_jsxs("text", { fg: active ? FG : DIM, children: [active ? "❯ " : " ", _jsx("span", { fg: STATUS_COLOR[op.status], children: OPERATION_GLYPH[op.status] }), " ", op.title.padEnd(28), _jsxs("span", { fg: active ? DIM : FAINT, children: [op.status === "running" ? "running" : op.status, " \u00B7 ", time] })] }, op.id));
39
+ }), start + window.length < operations.length ? (_jsxs("text", { fg: FAINT, children: ["\u2026 ", operations.length - start - window.length, " below"] })) : null, highlighted ? (_jsxs("box", { style: { flexDirection: "column", marginTop: 1 }, children: [highlighted.detail ? (_jsx("text", { fg: STATUS_COLOR[highlighted.status], children: highlighted.detail })) : null, highlighted.output.slice(-OUTPUT_PREVIEW_LINES).map((line, i) => (_jsx("text", { fg: FAINT, children: line || " " }, i))), _jsxs("text", { fg: FAINT, children: [highlighted.status === "failed" && highlighted.retry
40
+ ? "r/Enter retry · "
41
+ : "", "c copy output \u00B7 Esc close"] })] })) : null] })) }));
42
+ }
43
+ //# sourceMappingURL=ActivityDrawer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivityDrawer.js","sourceRoot":"","sources":["../../../src/activity/ActivityDrawer.tsx"],"names":[],"mappings":";AAAA;;;;;GAKG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,eAAe,EACf,aAAa,GAEd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,K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AE,CAAC,EAAE,aAClD,WAAW,CAAC,MAAM,CAAC,CAAC,CAAC,CACpB,eAAM,EAAE,EAAE,YAAY,CAAC,WAAW,CAAC,MAAM,CAAC,YACvC,WAAW,CAAC,MAAM,GACd,CACR,CAAC,CAAC,CAAC,IAAI,EACP,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CAChE,eAAc,EAAE,EAAE,KAAK,YACpB,IAAI,IAAI,GAAG,IADH,CAAC,CAEL,CACR,CAAC,EACF,gBAAM,EAAE,EAAE,KAAK,aACZ,WAAW,CAAC,MAAM,KAAK,QAAQ,IAAI,WAAW,CAAC,KAAK;oCACnD,CAAC,CAAC,kBAAkB;oCACpB,CAAC,CAAC,EAAE,sCAED,IACH,CACP,CAAC,CAAC,CAAC,IAAI,IACP,CACJ,GACG,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,5 @@
1
+ import { type OperationRecord } from "./operationStore.js";
2
+ export declare function ActivitySummaryLine({ operation, now, }: {
3
+ operation: OperationRecord;
4
+ now: number;
5
+ }): import("react").ReactNode;
@@ -0,0 +1,26 @@
1
+ import { jsxs as _jsxs, jsx as _jsx } from "@opentui/react/jsx-runtime";
2
+ /**
3
+ * One-line activity summary in the shell (TUI_DESIGN §13.1): the latest
4
+ * meaningful operation state without occupying a pane. Teaches ^J.
5
+ */
6
+ import { relativeTime } from "../author/data.js";
7
+ import { OPERATION_GLYPH, formatElapsed, } from "./operationStore.js";
8
+ import { AMBER, FAINT, RED, TEAL } from "../theme/tokens.js";
9
+ const TONE = {
10
+ running: AMBER,
11
+ succeeded: TEAL,
12
+ failed: RED,
13
+ };
14
+ export function ActivitySummaryLine({ operation, now, }) {
15
+ const time = operation.status === "running"
16
+ ? formatElapsed(now - operation.startedAt)
17
+ : relativeTime(operation.endedAt ?? operation.startedAt);
18
+ return (_jsxs("box", { style: {
19
+ flexDirection: "row",
20
+ justifyContent: "space-between",
21
+ flexShrink: 0,
22
+ paddingLeft: 1,
23
+ paddingRight: 1,
24
+ }, children: [_jsxs("text", { fg: TONE[operation.status], children: [OPERATION_GLYPH[operation.status], " ", operation.title, operation.detail ? ` — ${operation.detail}` : "", " \u00B7 ", time] }), _jsx("text", { fg: FAINT, children: "^J activity" })] }));
25
+ }
26
+ //# sourceMappingURL=ActivitySummary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ActivitySummary.js","sourceRoot":"","sources":["../../../src/activity/ActivitySummary.tsx"],"names":[],"mappings":";AAAA;;;GAGG;AACH,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EACL,eAAe,EACf,aAAa,GAEd,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,oBAAoB,CAAC;AAE7D,MAAM,IAAI,GAA8C;IACtD,OAAO,EAAE,KAAK;IACd,SAAS,EAAE,IAAI;IACf,MAAM,EAAE,GAAG;CACZ,CAAC;AAEF,MAAM,UAAU,mBAAmB,CAAC,EAClC,SAAS,EACT,GAAG,GAIJ;IACC,MAAM,IAAI,GACR,SAAS,CAAC,MAAM,KAAK,SAAS;QAC5B,CAAC,CAAC,aAAa,CAAC,GAAG,GAAG,SAAS,CAAC,SAAS,CAAC;QAC1C,CAAC,CAAC,YAAY,CAAC,SAAS,CAAC,OAAO,IAAI,SAAS,CAAC,SAAS,CAAC,CAAC;IAC7D,OAAO,CACL,eACE,KAAK,EAAE;YACL,aAAa,EAAE,KAAK;YACpB,cAAc,EAAE,eAAe;YAC/B,UAAU,EAAE,CAAC;YACb,WAAW,EAAE,CAAC;YACd,YAAY,EAAE,CAAC;SAChB,aAED,gBAAM,EAAE,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,aAC7B,eAAe,CAAC,SAAS,CAAC,MAAM,CAAC,OAAG,SAAS,CAAC,KAAK,EACnD,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,SAAS,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,cAAK,IAAI,IACrD,EACP,eAAM,EAAE,EAAE,KAAK,4BAAoB,IAC/B,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,67 @@
1
+ /**
2
+ * Durable operation store (TUI_DESIGN §13) — push/pull/validate and friends
3
+ * live here so they survive mode/view switches. Plain subscribable store:
4
+ * the lifecycle is three states (running → succeeded | failed), which does
5
+ * not justify a state-machine dependency; revisit if copilot turns add
6
+ * pause/permission states (Phase 5).
7
+ */
8
+ export type OperationStatus = "running" | "succeeded" | "failed";
9
+ /** How to re-run an operation from the activity drawer. */
10
+ export type RetrySpec = {
11
+ mode: "simple";
12
+ name: string;
13
+ args: string;
14
+ } | {
15
+ mode: "sheet";
16
+ name: string;
17
+ values: Record<string, string | boolean>;
18
+ } | {
19
+ mode: "validate";
20
+ };
21
+ export interface OperationRecord {
22
+ id: number;
23
+ /** Command name (push, pull, validate, mdb-seed, …). */
24
+ kind: string;
25
+ /** Human label, e.g. "push · jaber". */
26
+ title: string;
27
+ status: OperationStatus;
28
+ startedAt: number;
29
+ endedAt?: number;
30
+ /** Latest one-line summary: progress while running, outcome after. */
31
+ detail?: string;
32
+ /** Raw output lines (copyable from the drawer). */
33
+ output: string[];
34
+ retry?: RetrySpec;
35
+ }
36
+ export declare class OperationStore {
37
+ private records;
38
+ private listeners;
39
+ private nextId;
40
+ private readonly now;
41
+ constructor(now?: () => number);
42
+ /** Stable reference between mutations — safe for useSyncExternalStore. */
43
+ snapshot: () => OperationRecord[];
44
+ subscribe: (listener: () => void) => (() => void);
45
+ start(kind: string, title: string, retry?: RetrySpec): number;
46
+ /** Update the progress line of a running operation. */
47
+ progress(id: number, detail: string): void;
48
+ succeed(id: number, detail?: string, output?: string[]): void;
49
+ fail(id: number, detail: string, output?: string[]): void;
50
+ find(id: number): OperationRecord | undefined;
51
+ private finish;
52
+ private patch;
53
+ /** Every mutation flows through here: prune, swap reference, notify. */
54
+ private commit;
55
+ private pruned;
56
+ private notify;
57
+ }
58
+ /** The one store — module-level so operations survive app re-renders. */
59
+ export declare const operationStore: OperationStore;
60
+ export declare function isOperationCommand(name: string): boolean;
61
+ /** Drawer ordering: running first, then most recent first. */
62
+ export declare function orderedOperations(records: OperationRecord[]): OperationRecord[];
63
+ /** What the shell summary line shows: newest running, else newest finished. */
64
+ export declare function latestOperation(records: OperationRecord[]): OperationRecord | undefined;
65
+ /** Compact elapsed time: "0s", "42s", "1m 05s", "2h 03m". */
66
+ export declare function formatElapsed(ms: number): string;
67
+ export declare const OPERATION_GLYPH: Record<OperationStatus, string>;
@@ -0,0 +1,138 @@
1
+ /**
2
+ * Durable operation store (TUI_DESIGN §13) — push/pull/validate and friends
3
+ * live here so they survive mode/view switches. Plain subscribable store:
4
+ * the lifecycle is three states (running → succeeded | failed), which does
5
+ * not justify a state-machine dependency; revisit if copilot turns add
6
+ * pause/permission states (Phase 5).
7
+ */
8
+ /** Finished operations kept for the drawer; running ops are never evicted. */
9
+ const HISTORY_CAP = 50;
10
+ export class OperationStore {
11
+ records = [];
12
+ listeners = new Set();
13
+ nextId = 1;
14
+ now;
15
+ constructor(now = Date.now) {
16
+ this.now = now;
17
+ }
18
+ /** Stable reference between mutations — safe for useSyncExternalStore. */
19
+ snapshot = () => this.records;
20
+ subscribe = (listener) => {
21
+ this.listeners.add(listener);
22
+ return () => this.listeners.delete(listener);
23
+ };
24
+ start(kind, title, retry) {
25
+ const id = this.nextId++;
26
+ const record = {
27
+ id,
28
+ kind,
29
+ title,
30
+ status: "running",
31
+ startedAt: this.now(),
32
+ output: [],
33
+ ...(retry ? { retry } : {}),
34
+ };
35
+ this.commit([...this.records, record]);
36
+ return id;
37
+ }
38
+ /** Update the progress line of a running operation. */
39
+ progress(id, detail) {
40
+ this.patch(id, { detail });
41
+ }
42
+ succeed(id, detail, output) {
43
+ this.finish(id, "succeeded", detail, output);
44
+ }
45
+ fail(id, detail, output) {
46
+ this.finish(id, "failed", detail, output);
47
+ }
48
+ find(id) {
49
+ return this.records.find((r) => r.id === id);
50
+ }
51
+ finish(id, status, detail, output) {
52
+ this.patch(id, {
53
+ status,
54
+ endedAt: this.now(),
55
+ ...(detail !== undefined ? { detail } : {}),
56
+ ...(output ? { output } : {}),
57
+ });
58
+ }
59
+ patch(id, patch) {
60
+ const index = this.records.findIndex((r) => r.id === id);
61
+ if (index < 0)
62
+ return;
63
+ const next = [...this.records];
64
+ next[index] = { ...next[index], ...patch };
65
+ this.commit(next);
66
+ }
67
+ /** Every mutation flows through here: prune, swap reference, notify. */
68
+ commit(records) {
69
+ this.records = this.pruned(records);
70
+ this.notify();
71
+ }
72
+ pruned(records) {
73
+ const finished = records.filter((r) => r.status !== "running");
74
+ if (finished.length <= HISTORY_CAP)
75
+ return records;
76
+ const drop = new Set(finished.slice(0, finished.length - HISTORY_CAP).map((r) => r.id));
77
+ return records.filter((r) => !drop.has(r.id));
78
+ }
79
+ notify() {
80
+ for (const listener of this.listeners)
81
+ listener();
82
+ }
83
+ }
84
+ /** The one store — module-level so operations survive app re-renders. */
85
+ export const operationStore = new OperationStore();
86
+ /**
87
+ * Commands worth tracking as operations: real work with output and failure
88
+ * modes. Context switches, pickers, and view toggles stay untracked.
89
+ */
90
+ const OPERATION_COMMANDS = new Set([
91
+ "push",
92
+ "pull",
93
+ "validate",
94
+ "schema-pull",
95
+ "version-publish",
96
+ "version-archive",
97
+ "agent-import",
98
+ "agent-create",
99
+ "agent-unlink",
100
+ "workspace-create",
101
+ "project-create",
102
+ "reset",
103
+ ]);
104
+ export function isOperationCommand(name) {
105
+ return OPERATION_COMMANDS.has(name) || name.startsWith("mdb-");
106
+ }
107
+ /** Drawer ordering: running first, then most recent first. */
108
+ export function orderedOperations(records) {
109
+ return [...records].sort((a, b) => {
110
+ const runA = a.status === "running" ? 0 : 1;
111
+ const runB = b.status === "running" ? 0 : 1;
112
+ if (runA !== runB)
113
+ return runA - runB;
114
+ return (b.endedAt ?? b.startedAt) - (a.endedAt ?? a.startedAt);
115
+ });
116
+ }
117
+ /** What the shell summary line shows: newest running, else newest finished. */
118
+ export function latestOperation(records) {
119
+ return orderedOperations(records)[0];
120
+ }
121
+ /** Compact elapsed time: "0s", "42s", "1m 05s", "2h 03m". */
122
+ export function formatElapsed(ms) {
123
+ const totalSeconds = Math.max(0, Math.floor(ms / 1000));
124
+ if (totalSeconds < 60)
125
+ return `${totalSeconds}s`;
126
+ const totalMinutes = Math.floor(totalSeconds / 60);
127
+ if (totalMinutes < 60) {
128
+ return `${totalMinutes}m ${String(totalSeconds % 60).padStart(2, "0")}s`;
129
+ }
130
+ const hours = Math.floor(totalMinutes / 60);
131
+ return `${hours}h ${String(totalMinutes % 60).padStart(2, "0")}m`;
132
+ }
133
+ export const OPERATION_GLYPH = {
134
+ running: "●",
135
+ succeeded: "✓",
136
+ failed: "✕",
137
+ };
138
+ //# sourceMappingURL=operationStore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"operationStore.js","sourceRoot":"","sources":["../../../src/activity/operationStore.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AA0BH,8EAA8E;AAC9E,MAAM,WAAW,GAAG,EAAE,CAAC;AAEvB,MAAM,OAAO,cAAc;IACjB,OAAO,GAAsB,EAAE,CAAC;IAChC,SAAS,GAAG,IAAI,GAAG,EAAc,CAAC;IAClC,MAAM,GAAG,CAAC,CAAC;IACF,GAAG,CAAe;IAEnC,YAAY,MAAoB,IAAI,CAAC,GAAG;QACtC,IAAI,CAAC,GAAG,GAAG,GAAG,CAAC;IACjB,CAAC;IAED,0EAA0E;IAC1E,QAAQ,GAAG,GAAsB,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC;IAEjD,SAAS,GAAG,CAAC,QAAoB,EAAgB,EAAE;QACjD,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QAC7B,OAAO,GAAG,EAAE,CAAC,I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AI,CAAC,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,eAAe,CAC7B,OAA0B;IAE1B,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACvC,CAAC;AAED,6DAA6D;AAC7D,MAAM,UAAU,aAAa,CAAC,EAAU;IACtC,MAAM,YAAY,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,CAAC;IACxD,IAAI,YAAY,GAAG,EAAE;QAAE,OAAO,GAAG,YAAY,GAAG,CAAC;IACjD,MAAM,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC;IACnD,IAAI,YAAY,GAAG,EAAE,EAAE,CAAC;QACtB,OAAO,GAAG,YAAY,KAAK,MAAM,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC;IAC3E,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC;IAC5C,OAAO,GAAG,KAAK,KAAK,MAAM,CAAC,YAAY,GAAG,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC;AACpE,CAAC;AAED,MAAM,CAAC,MAAM,eAAe,GAAoC;IAC9D,OAAO,EAAE,GAAG;IACZ,SAAS,EAAE,GAAG;IACd,MAAM,EAAE,GAAG;CACZ,CAAC"}
@@ -0,0 +1,27 @@
1
+ import type { RefObject } from "react";
2
+ import type { ScrollBoxRenderable } from "@opentui/core";
3
+ import { type ScopeStrip } from "../lib/scope.js";
4
+ import type { BackendDetection } from "./backend/types.js";
5
+ import type { AuthorSnapshot, ValidationRecord } from "./data.js";
6
+ import type { SessionRow, SessionState } from "./session.js";
7
+ /**
8
+ * Author mode home — program cockpit beside the IDE (TUI_DESIGN §8).
9
+ * Local card (baseline, changes, validation health) vs remote target card,
10
+ * plus a changes preview. d/v open the full diff / validation subviews.
11
+ */
12
+ export declare function AuthorHome({ scope, snapshot, validation, frame, working, version, paneTitle, paneLines, session, sessionRows, sessionCursor, sessionScrollRef, backendLabel, backendDetection, }: {
13
+ scope: ScopeStrip;
14
+ snapshot?: AuthorSnapshot | undefined;
15
+ validation?: ValidationRecord | undefined;
16
+ frame: string[];
17
+ working: boolean;
18
+ version: string;
19
+ paneTitle?: string | undefined;
20
+ paneLines: string[];
21
+ session?: SessionState | undefined;
22
+ sessionRows: SessionRow[];
23
+ sessionCursor: number;
24
+ sessionScrollRef: RefObject<ScrollBoxRenderable | null>;
25
+ backendLabel: string;
26
+ backendDetection?: BackendDetection | undefined;
27
+ }): import("react").ReactNode;
@@ -0,0 +1,92 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "@opentui/react/jsx-runtime";
2
+ import { homeishPath } from "../lib/scope.js";
3
+ import { changeEntries, changesSummary, relativeTime } from "./data.js";
4
+ import { OutputPane } from "../ui/OutputPane.js";
5
+ import { SessionPane } from "./SessionPane.js";
6
+ import { AMBER, DIM, FAINT, FG, RED, TEAL, TEAL_DIM } from "../theme/tokens.js";
7
+ const PREVIEW_LIMIT = 6;
8
+ const STATUS_COLOR = {
9
+ A: TEAL,
10
+ M: AMBER,
11
+ D: RED,
12
+ };
13
+ /**
14
+ * Author mode home — program cockpit beside the IDE (TUI_DESIGN §8).
15
+ * Local card (baseline, changes, validation health) vs remote target card,
16
+ * plus a changes preview. d/v open the full diff / validation subviews.
17
+ */
18
+ export function AuthorHome({ scope, snapshot, validation, frame, working, version, paneTitle, paneLines, session, sessionRows, sessionCursor, sessionScrollRef, backendLabel, backendDetection, }) {
19
+ const hasAgent = scope.agent !== "—";
20
+ // Empty states host the brand glyph (setup screens are not day-to-day).
21
+ if (!scope.loggedIn || !hasAgent) {
22
+ return (_jsxs("box", { style: {
23
+ flexDirection: "column",
24
+ alignItems: "center",
25
+ flexGrow: 1,
26
+ minHeight: 0,
27
+ width: "100%",
28
+ }, children: [_jsxs("box", { style: {
29
+ border: true,
30
+ borderStyle: "rounded",
31
+ borderColor: TEAL_DIM,
32
+ flexDirection: "column",
33
+ alignItems: "center",
34
+ flexShrink: 0,
35
+ width: 44,
36
+ paddingTop: 1,
37
+ paddingBottom: 1,
38
+ }, children: [frame.map((line, i) => (_jsx("text", { fg: working ? AMBER : TEAL, children: line }, i))), _jsxs("text", { fg: FG, children: [_jsx("b", { children: "apollo" }), " ", _jsxs("span", { fg: DIM, children: ["v", version] })] }), _jsx("text", { fg: DIM, children: "Author \u00B7 program workbench" })] }), _jsx("text", { children: " " }), !scope.loggedIn ? (_jsx("text", { fg: AMBER, children: "Log in to begin \u2014 ^K then \u201Clogin\u201D" })) : (_jsx("text", { fg: DIM, children: "No active agent \u2014 ^G to pick one, or ^K \u201Cimport\u201D / \u201Ccreate\u201D" })), _jsx(OutputPane, { paneTitle: paneTitle, paneLines: paneLines })] }));
39
+ }
40
+ const entries = changeEntries(snapshot?.diff);
41
+ const preview = entries.slice(0, PREVIEW_LIMIT);
42
+ return (_jsxs("box", { style: { flexDirection: "column", flexGrow: 1, minHeight: 0, width: "100%" }, children: [_jsxs("box", { style: { flexDirection: "row", flexShrink: 0, width: "100%" }, children: [_jsxs("box", { title: " local program ", style: {
43
+ border: true,
44
+ borderStyle: "rounded",
45
+ borderColor: TEAL_DIM,
46
+ flexDirection: "column",
47
+ flexGrow: 1,
48
+ flexBasis: 0,
49
+ paddingLeft: 1,
50
+ paddingRight: 1,
51
+ }, children: [_jsx("text", { fg: DIM, children: scope.agentPath ? homeishPath(scope.agentPath) : "bundle/src" }), _jsxs("text", { fg: DIM, children: ["baseline", " ", _jsx("span", { fg: snapshot?.baselineTag ? FG : AMBER, children: snapshot?.baselineTag ?? "none" }), snapshot?.baselineAt ? (_jsxs("span", { fg: FAINT, children: [" ", "\u00B7 synced ", relativeTime(Date.parse(snapshot.baselineAt))] })) : null] }), _jsx(ChangesLine, { snapshot: snapshot }), _jsx(ValidationLine, { validation: validation })] }), _jsxs("box", { title: " remote target ", style: {
52
+ border: true,
53
+ borderStyle: "rounded",
54
+ borderColor: TEAL_DIM,
55
+ flexDirection: "column",
56
+ flexGrow: 1,
57
+ flexBasis: 0,
58
+ paddingLeft: 1,
59
+ paddingRight: 1,
60
+ }, children: [_jsxs("text", { fg: DIM, children: ["project ", _jsx("span", { fg: FG, children: scope.project })] }), scope.org !== "—" && scope.org !== scope.orgId?.slice(0, 12) ? (_jsxs("text", { fg: DIM, children: ["org ", scope.org] })) : null, _jsxs("text", { fg: FAINT, children: ["push \u2192 ", scope.env, scope.version !== "—"
61
+ ? ` · draft revision from ${scope.version}`
62
+ : " · creates the first draft"] })] })] }), preview.length > 0 ? (_jsxs("box", { style: { flexDirection: "column", flexShrink: 0, paddingLeft: 1 }, children: [preview.map((entry) => (_jsxs("text", { fg: DIM, children: [" ", _jsx("span", { fg: STATUS_COLOR[entry.status], children: entry.status }), " ", entry.path] }, entry.path))), entries.length > preview.length ? (_jsxs("text", { fg: FAINT, children: [" ", "\u2026 ", entries.length - preview.length, " more \u2014 d for the full diff"] })) : null] })) : null, _jsxs("text", { fg: FG, style: { flexShrink: 0 }, children: [" ", _jsx("span", { fg: TEAL, children: "[v]" }), " validate ", _jsx("span", { fg: TEAL, children: "[d]" }), " diff", " ", _jsx("span", { fg: TEAL, children: "[p]" }), " push ", _jsx("span", { fg: TEAL, children: "[l]" }), " pull", " ", _jsx("span", { fg: TEAL, children: "[r]" }), " versions ", _jsx("span", { fg: TEAL, children: "[o]" }), " IDE"] }), _jsx(CopilotLine, { backendLabel: backendLabel, detection: backendDetection }), paneLines.length === 0 && entries.length === 0 && !session ? (_jsxs("text", { fg: FAINT, style: { flexShrink: 0 }, children: [" ", "edit in your IDE \u2014 changes appear here as you save"] })) : null, session ? (_jsx(SessionPane, { session: session, rows: sessionRows, cursor: sessionCursor, scrollRef: sessionScrollRef })) : (_jsx(OutputPane, { paneTitle: paneTitle, paneLines: paneLines }))] }));
63
+ }
64
+ /** One honest line about the copilot backend: detected, missing, or probing. */
65
+ function CopilotLine({ backendLabel, detection, }) {
66
+ if (!detection) {
67
+ return (_jsxs("text", { fg: FAINT, style: { flexShrink: 0 }, children: [" ", "copilot: checking for ", backendLabel, "\u2026"] }));
68
+ }
69
+ if (!detection.available) {
70
+ return (_jsxs("text", { fg: DIM, style: { flexShrink: 0 }, children: [" ", "copilot: ", _jsx("span", { fg: AMBER, children: detection.reason ?? "not available" })] }));
71
+ }
72
+ return (_jsxs("text", { fg: DIM, style: { flexShrink: 0 }, children: [" ", "copilot: ", _jsxs("span", { fg: TEAL, children: [backendLabel, " \u2713"] }), detection.version ? _jsxs("span", { fg: FAINT, children: [" ", detection.version] }) : null, _jsx("span", { fg: FAINT, children: " \u2014 type below to author" })] }));
73
+ }
74
+ function ChangesLine({ snapshot }) {
75
+ if (!snapshot) {
76
+ return _jsx("text", { fg: FAINT, children: "changes \u2026" });
77
+ }
78
+ if (snapshot.unavailable) {
79
+ return _jsxs("text", { fg: AMBER, children: ["changes unavailable \u2014 ", snapshot.unavailable] });
80
+ }
81
+ const summary = changesSummary(snapshot.diff);
82
+ return (_jsxs("text", { fg: DIM, children: ["changes", " ", summary === "clean" ? (_jsx("span", { fg: TEAL, children: "clean \u2713" })) : (_jsx("span", { fg: AMBER, children: summary }))] }));
83
+ }
84
+ function ValidationLine({ validation, }) {
85
+ if (!validation) {
86
+ return _jsx("text", { fg: FAINT, children: "validation not run \u2014 v to check" });
87
+ }
88
+ const errors = validation.result.findings.filter((f) => f.level !== "warning").length;
89
+ const ok = validation.result.valid && errors === 0;
90
+ return (_jsxs("text", { fg: DIM, children: ["validation", " ", _jsx("span", { fg: ok ? TEAL : RED, children: ok ? "✓" : `✕ ${errors} error(s)` }), _jsxs("span", { fg: FAINT, children: [" \u00B7 ", relativeTime(validation.at)] }), validation.stale ? _jsx("span", { fg: AMBER, children: " \u00B7 stale" }) : null] }));
91
+ }
92
+ //# sourceMappingURL=AuthorHome.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthorHome.js","sourceRoot":"","sources":["../../../src/author/AuthorHome.tsx"],"names":[],"mappings":";AAGA,OAAO,EAAE,WAAW,EAAmB,MAAM,iBAAiB,CAAC;AAI/D,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEhF,MAAM,aAAa,GAAG,CAAC,CAAC;AAExB,MAAM,YAAY,GAAoC;IACpD,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,GAAG;CACP,CAAC;AAEF;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,EACzB,KAAK,EACL,QAAQ,EACR,UAAU,EACV,KAAK,EACL,OAAO,EACP,OAAO,EACP,SAAS,EACT,SAAS,EACT,OAAO,EACP,WAAW,EACX,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,gBAAgB,GAgBjB;IACC,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,KAAK,GAAG,CAAC;IAErC,wEAAwE;IACxE,IAAI,CAAC,KAAK,CAAC,QAAQ,IAAI,CAAC,QAAQ,EAAE,CAAC;QACjC,OAAO,CACL,eACE,KAAK,EAAE;gBACL,aAAa,EAAE,QAAQ;gBACvB,UAAU,EAAE,QAAQ;gBACpB,QAAQ,EAAE,CAAC;gBACX,SAAS,EAAE,CAAC;gB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AAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,KAAK,KAAK,SAAS,CAC7B,CAAC,MAAM,CAAC;IACT,MAAM,EAAE,GAAG,UAAU,CAAC,MAAM,CAAC,KAAK,IAAI,MAAM,KAAK,CAAC,CAAC;IACnD,OAAO,CACL,gBAAM,EAAE,EAAE,GAAG,2BACA,GAAG,EACd,eAAM,EAAE,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,YAAG,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,KAAK,MAAM,WAAW,GAAQ,EACrE,gBAAM,EAAE,EAAE,KAAK,yBAAM,YAAY,CAAC,UAAU,CAAC,EAAE,CAAC,IAAQ,EACvD,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,eAAM,EAAE,EAAE,KAAK,8BAAiB,CAAC,CAAC,CAAC,IAAI,IACtD,CACR,CAAC;AACJ,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { type RefObject } from "react";
2
+ import type { ScrollBoxRenderable } from "@opentui/core";
3
+ import { type DiffLine, type DiffStyle } from "./data.js";
4
+ import type { TreeRow } from "./tree.js";
5
+ /** What the preview pane should show for the selected tree row. */
6
+ export type PreviewModel = {
7
+ kind: "none";
8
+ hint?: string;
9
+ } | {
10
+ kind: "loading";
11
+ path: string;
12
+ } | {
13
+ kind: "error";
14
+ path: string;
15
+ message: string;
16
+ } | {
17
+ kind: "diff";
18
+ path: string;
19
+ lines: DiffLine[];
20
+ note?: string;
21
+ } | {
22
+ kind: "file";
23
+ path: string;
24
+ lines: string[];
25
+ note?: string;
26
+ };
27
+ /**
28
+ * Diff/browse subview (TUI_DESIGN §8.3) — a persistent file-tree sidebar with
29
+ * a live preview pane. With an agent, changed files diff against the bound
30
+ * remote tag (split or unified, `s` toggles — the GitHub/Bitbucket options);
31
+ * at workspace level it browses files read-only. Enter expands the preview
32
+ * full-width; Esc collapses. Panes scroll via the shared ref and mouse.
33
+ */
34
+ export declare function DiffView({ rows, cursor, treeTitle, preview, style, remoteTag, expanded, sidebarWidth, pageSize, scrollRef, }: {
35
+ rows: TreeRow[];
36
+ cursor: number;
37
+ treeTitle: string;
38
+ preview: PreviewModel;
39
+ style: DiffStyle;
40
+ remoteTag: string;
41
+ /** Full-width preview (Enter on a file); the tree hides until Esc. */
42
+ expanded: boolean;
43
+ sidebarWidth: number;
44
+ pageSize: number;
45
+ scrollRef: RefObject<ScrollBoxRenderable | null>;
46
+ }): import("react").ReactNode;
@@ -0,0 +1,87 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "@opentui/react/jsx-runtime";
2
+ import { memo, useEffect, useMemo } from "react";
3
+ import { splitRows } from "./data.js";
4
+ import { AMBER, DIM, FAINT, FG, RED, TEAL, TEAL_DIM } from "../theme/tokens.js";
5
+ const STATUS_COLOR = {
6
+ A: TEAL,
7
+ M: AMBER,
8
+ D: RED,
9
+ };
10
+ /** Rendering caps — panes scroll, but huge nodes still cost render time. */
11
+ const MAX_UNIFIED_LINES = 1500;
12
+ const MAX_SPLIT_ROWS = 800;
13
+ /**
14
+ * Diff/browse subview (TUI_DESIGN §8.3) — a persistent file-tree sidebar with
15
+ * a live preview pane. With an agent, changed files diff against the bound
16
+ * remote tag (split or unified, `s` toggles — the GitHub/Bitbucket options);
17
+ * at workspace level it browses files read-only. Enter expands the preview
18
+ * full-width; Esc collapses. Panes scroll via the shared ref and mouse.
19
+ */
20
+ export function DiffView({ rows, cursor, treeTitle, preview, style, remoteTag, expanded, sidebarWidth, pageSize, scrollRef, }) {
21
+ if (expanded) {
22
+ return (_jsx(PreviewPane, { preview: preview, style: style, remoteTag: remoteTag, scrollRef: scrollRef }));
23
+ }
24
+ return (_jsxs("box", { style: { flexDirection: "row", flexGrow: 1, minHeight: 0, width: "100%" }, children: [_jsx("box", { style: {
25
+ width: sidebarWidth,
26
+ flexShrink: 0,
27
+ minHeight: 0,
28
+ flexDirection: "column",
29
+ }, children: _jsx(TreePane, { rows: rows, cursor: cursor, title: treeTitle, pageSize: pageSize }) }), _jsx(PreviewPane, { preview: preview, style: style, remoteTag: remoteTag, scrollRef: scrollRef })] }));
30
+ }
31
+ const TreePane = memo(function TreePane({ rows, cursor, title, pageSize, }) {
32
+ const start = rows.length <= pageSize
33
+ ? 0
34
+ : Math.max(0, Math.min(cursor - Math.floor(pageSize / 3), rows.length - pageSize));
35
+ const window = rows.slice(start, start + pageSize);
36
+ return (_jsx("box", { title: ` ${title} `, style: {
37
+ border: true,
38
+ borderStyle: "rounded",
39
+ borderColor: TEAL_DIM,
40
+ flexDirection: "column",
41
+ flexGrow: 1,
42
+ minHeight: 0,
43
+ overflow: "hidden",
44
+ paddingLeft: 1,
45
+ paddingRight: 1,
46
+ }, children: rows.length === 0 ? (_jsx("text", { fg: DIM, children: "(no files)" })) : (_jsxs(_Fragment, { children: [start > 0 ? _jsxs("text", { fg: FAINT, children: ["\u2026 ", start, " above"] }) : null, window.map((row, i) => {
47
+ const index = start + i;
48
+ const active = index === cursor;
49
+ const indent = " ".repeat(row.depth);
50
+ return (_jsxs("text", { fg: active ? FG : DIM, children: [active ? "❯ " : " ", indent, row.kind === "dir" ? (_jsxs("span", { fg: active ? FG : DIM, children: [row.expanded ? "▾ " : "▸ ", row.label, "/"] })) : (_jsxs(_Fragment, { children: [_jsx("span", { fg: row.status ? STATUS_COLOR[row.status] : FAINT, children: row.status ?? "·" }), " ", row.label] }))] }, `${row.kind}:${row.path}`));
51
+ }), start + window.length < rows.length ? (_jsxs("text", { fg: FAINT, children: ["\u2026 ", rows.length - start - window.length, " below"] })) : null] })) }));
52
+ });
53
+ const PreviewPane = memo(function PreviewPane({ preview, style, remoteTag, scrollRef, }) {
54
+ const pathKey = "path" in preview ? preview.path : "";
55
+ // Same scrollbox across file switches (no remount flash) — just rewind.
56
+ useEffect(() => {
57
+ scrollRef.current?.scrollTo({ x: 0, y: 0 });
58
+ }, [pathKey, scrollRef]);
59
+ const title = "path" in preview && preview.path ? ` ${preview.path} ` : " preview ";
60
+ return (_jsxs("box", { title: title, style: {
61
+ border: true,
62
+ borderStyle: "rounded",
63
+ borderColor: TEAL_DIM,
64
+ flexDirection: "column",
65
+ flexGrow: 1,
66
+ flexBasis: 0,
67
+ minHeight: 0,
68
+ paddingLeft: 1,
69
+ paddingRight: 1,
70
+ }, children: [_jsxs("text", { fg: DIM, style: { flexShrink: 0 }, children: [preview.kind === "diff"
71
+ ? `remote ${remoteTag} → local · ${style}`
72
+ : "read-only", " · ", _jsx("span", { fg: FAINT, children: "\u2191\u2193/PgUp/PgDn or mouse to scroll" })] }), "note" in preview && preview.note ? (_jsx("text", { fg: AMBER, children: preview.note })) : null, preview.kind === "none" ? (_jsx("text", { fg: FAINT, children: preview.hint ?? "(select a file in the tree)" })) : preview.kind === "loading" ? (_jsx("text", { fg: FAINT, children: "loading\u2026" })) : preview.kind === "error" ? (_jsx("text", { fg: AMBER, children: preview.message })) : preview.kind === "diff" && style === "split" ? (_jsx(SplitBody, { lines: preview.lines, scrollRef: scrollRef })) : preview.kind === "diff" ? (_jsx(UnifiedBody, { lines: preview.lines, scrollRef: scrollRef })) : (_jsx(FileBody, { lines: preview.lines, scrollRef: scrollRef }))] }));
73
+ });
74
+ function UnifiedBody({ lines, scrollRef, }) {
75
+ const rendered = lines.slice(0, MAX_UNIFIED_LINES);
76
+ return (_jsxs("scrollbox", { ref: scrollRef, style: { flexGrow: 1, flexShrink: 1, flexBasis: 0, flexDirection: "column" }, children: [rendered.map((line, i) => (_jsxs("text", { style: { wrapMode: "word" }, fg: line.tag === "+" ? TEAL : line.tag === "-" ? RED : DIM, children: [line.tag, " ", line.text] }, i))), lines.length > rendered.length ? (_jsxs("text", { fg: FAINT, children: ["\u2026 ", lines.length - rendered.length, " more line(s)"] })) : null] }));
77
+ }
78
+ function SplitBody({ lines, scrollRef, }) {
79
+ const rows = useMemo(() => splitRows(lines), [lines]);
80
+ const rendered = rows.slice(0, MAX_SPLIT_ROWS);
81
+ return (_jsxs("scrollbox", { ref: scrollRef, style: { flexGrow: 1, flexShrink: 1, flexBasis: 0, flexDirection: "column" }, children: [rendered.map((row, i) => (_jsxs("box", { style: { flexDirection: "row" }, children: [_jsx("text", { style: { flexGrow: 1, flexBasis: 0 }, fg: row.left?.tag === "-" ? RED : DIM, children: row.left ? `${row.left.tag} ${row.left.text}` : "" }), _jsx("text", { fg: FAINT, children: "\u2502" }), _jsx("text", { style: { flexGrow: 1, flexBasis: 0 }, fg: row.right?.tag === "+" ? TEAL : DIM, children: row.right ? `${row.right.tag} ${row.right.text}` : "" })] }, i))), rows.length > rendered.length ? (_jsxs("text", { fg: FAINT, children: ["\u2026 ", rows.length - rendered.length, " more row(s)"] })) : null] }));
82
+ }
83
+ function FileBody({ lines, scrollRef, }) {
84
+ const rendered = lines.slice(0, MAX_UNIFIED_LINES);
85
+ return (_jsxs("scrollbox", { ref: scrollRef, style: { flexGrow: 1, flexShrink: 1, flexBasis: 0, flexDirection: "column" }, children: [rendered.map((line, i) => (_jsx("text", { style: { wrapMode: "word" }, fg: DIM, children: line || " " }, i))), lines.length > rendered.length ? (_jsxs("text", { fg: FAINT, children: ["\u2026 ", lines.length - rendered.length, " more line(s)"] })) : null] }));
86
+ }
87
+ //# sourceMappingURL=DiffView.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DiffView.js","sourceRoot":"","sources":["../../../src/author/DiffView.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAkB,MAAM,OAAO,CAAC;AAGjE,OAAO,EAAE,SAAS,EAAiC,MAAM,WAAW,CAAC;AAErE,OAAO,EAAE,KAAK,EAAE,GAAG,EAAE,KAAK,EAAE,EAAE,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAEhF,MAAM,YAAY,GAAoC;IACpD,CAAC,EAAE,IAAI;IACP,CAAC,EAAE,KAAK;IACR,CAAC,EAAE,GAAG;CACP,CAAC;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,CAAC,GAAG,IAAI,GAAG,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,GACjD,KAbC,CAAC,CAcL,CACP,CAAC,EACD,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAC/B,gBAAM,EAAE,EAAE,KAAK,wBAAK,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,oBAAoB,CACtE,CAAC,CAAC,CAAC,IAAI,IACE,CACb,CAAC;AACJ,CAAC;AAED,SAAS,QAAQ,CAAC,EAChB,KAAK,EACL,SAAS,GAIV;IACC,MAAM,QAAQ,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,iBAAiB,CAAC,CAAC;IACnD,OAAO,CACL,qBACE,GAAG,EAAE,SAAS,EACd,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,SAAS,EAAE,CAAC,EAAE,aAAa,EAAE,QAAQ,EAAE,aAE3E,QAAQ,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,EAAE,EAAE,CAAC,CACzB,eAAc,KAAK,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,EAAE,GAAG,YAC/C,IAAI,IAAI,GAAG,IADH,CAAC,CAEL,CACR,CAAC,EACD,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAC,CAChC,gBAAM,EAAE,EAAE,KAAK,wBAAK,KAAK,CAAC,MAAM,GAAG,QAAQ,CAAC,MAAM,qBAAqB,CACxE,CAAC,CAAC,CAAC,IAAI,IACE,CACb,CAAC;AACJ,CAAC"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Copilot session pane — the multi-turn transcript rendered as a stream of
3
+ * work units inside a scrollbox. Rows arrive pre-wrapped (`sessionRows`),
4
+ * so heights and scroll offsets are exact; the cursor row carries a ▸
5
+ * gutter, and expanded action units show their input/result body indented.
6
+ */
7
+ import type { RefObject } from "react";
8
+ import type { ScrollBoxRenderable } from "@opentui/core";
9
+ import type { SessionRow, SessionState } from "./session.js";
10
+ export declare function SessionPane({ session, rows, cursor, scrollRef, }: {
11
+ session: SessionState;
12
+ rows: SessionRow[];
13
+ cursor: number;
14
+ scrollRef: RefObject<ScrollBoxRenderable | null>;
15
+ }): import("react").ReactNode;