@av-pi-studio/workbench 0.0.0-stage → 0.0.118

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 (273) hide show
  1. package/README.md +157 -2
  2. package/dist/chunks/BinaryFallbackViewer-BN-9Yvel.js +19 -0
  3. package/dist/chunks/ChatPanel-CjPUJMEs.js +2493 -0
  4. package/dist/chunks/CodeView-6kJms_MF.js +143 -0
  5. package/dist/chunks/DiffView-BqDuT3CF.js +48 -0
  6. package/dist/chunks/FilePanel-B8IXG2bj.js +92 -0
  7. package/dist/chunks/HtmlViewer-DpuVFaDo.js +490 -0
  8. package/dist/chunks/ImageViewer-BBfyA5QN.js +27 -0
  9. package/dist/chunks/MarkdownFileViewer-DPFPDS7G.js +88 -0
  10. package/dist/chunks/ModelProvidersPanel-Dsezq7Ss.js +95 -0
  11. package/dist/chunks/MoleculeViewerPanel-DEEU6Zkx.js +191 -0
  12. package/dist/chunks/PdfViewer-BdacmAu_.js +300 -0
  13. package/dist/chunks/SaveFileButton-2rOu02Xx.js +33 -0
  14. package/dist/chunks/SettingsDialog-DO1tDhMW.js +471 -0
  15. package/dist/chunks/SkillsPanel-DZDia4Pw.js +833 -0
  16. package/dist/chunks/TerminalPanel-bphwCSyW.js +242 -0
  17. package/dist/chunks/TextViewer-CVGqN6yy.js +63 -0
  18. package/dist/chunks/VideoViewer-BkB9BoOr.js +20 -0
  19. package/dist/chunks/ViewersPanel-C2E9FLf7.js +50 -0
  20. package/dist/chunks/href-resolution-jv3tpRcp.js +25 -0
  21. package/dist/chunks/index-Dlz8mEKZ.js +6258 -0
  22. package/dist/chunks/markdown-B2OXhZ-_.js +353 -0
  23. package/dist/chunks/provider-auth-store-C1GaLTlw.js +34 -0
  24. package/dist/chunks/use-file-download-CogCqTvU.js +31 -0
  25. package/dist/chunks/use-file-watch-Bb_Xzbr-.js +55 -0
  26. package/dist/chunks/use-provider-auth-list-DTjIZycd.js +16 -0
  27. package/dist/features/agent-ui/AskCard.d.ts +62 -0
  28. package/dist/features/agent-ui/agent-ui-store.d.ts +84 -0
  29. package/dist/features/agent-ui/announce.d.ts +51 -0
  30. package/dist/features/agent-ui/ask-list.d.ts +53 -0
  31. package/dist/features/agent-ui/ask-placement.d.ts +47 -0
  32. package/dist/features/agent-ui/deadline.d.ts +27 -0
  33. package/dist/features/agent-ui/keyboard.d.ts +37 -0
  34. package/dist/features/agent-ui/notify-effect.d.ts +41 -0
  35. package/dist/features/agent-ui/option-layout.d.ts +24 -0
  36. package/dist/features/agent-ui/outcome-line.d.ts +38 -0
  37. package/dist/features/agent-ui/prompt-text.d.ts +24 -0
  38. package/dist/features/chat/Attachments.d.ts +20 -0
  39. package/dist/features/chat/ChatPanel.d.ts +12 -0
  40. package/dist/features/chat/CommandMenu.d.ts +41 -0
  41. package/dist/features/chat/Composer.d.ts +58 -0
  42. package/dist/features/chat/ForkDialog.d.ts +24 -0
  43. package/dist/features/chat/ModelMenu.d.ts +54 -0
  44. package/dist/features/chat/ThinkingMenu.d.ts +39 -0
  45. package/dist/features/chat/Timeline.d.ts +30 -0
  46. package/dist/features/chat/TurnProgressBar.d.ts +14 -0
  47. package/dist/features/chat/composer-busy.d.ts +22 -0
  48. package/dist/features/chat/composer-gate.d.ts +37 -0
  49. package/dist/features/chat/composer-path-drop.d.ts +75 -0
  50. package/dist/features/chat/fork-correlation.d.ts +39 -0
  51. package/dist/features/chat/fork-gate.d.ts +27 -0
  52. package/dist/features/chat/fork-picker-nav.d.ts +14 -0
  53. package/dist/features/chat/fork-result.d.ts +43 -0
  54. package/dist/features/chat/model-menu-sort.d.ts +30 -0
  55. package/dist/features/chat/onboarding-nudge.d.ts +18 -0
  56. package/dist/features/chat/rows/AssistantRow.d.ts +24 -0
  57. package/dist/features/chat/rows/CompactionRow.d.ts +16 -0
  58. package/dist/features/chat/rows/ErrorRow.d.ts +13 -0
  59. package/dist/features/chat/rows/ReasoningRow.d.ts +16 -0
  60. package/dist/features/chat/rows/RowShell.d.ts +37 -0
  61. package/dist/features/chat/rows/SystemRow.d.ts +11 -0
  62. package/dist/features/chat/rows/ToolCard.d.ts +30 -0
  63. package/dist/features/chat/rows/UserRow.d.ts +43 -0
  64. package/dist/features/chat/slash-commands.d.ts +81 -0
  65. package/dist/features/chat/thinking-level-source.d.ts +29 -0
  66. package/dist/features/chat/todos/TodoPanel.d.ts +11 -0
  67. package/dist/features/chat/todos/agent-todos-store.d.ts +35 -0
  68. package/dist/features/chat/todos/todo-collapse-codec.d.ts +12 -0
  69. package/dist/features/chat/todos/todo-panel-model.d.ts +37 -0
  70. package/dist/features/chat/use-bottom-anchor.d.ts +33 -0
  71. package/dist/features/chat/use-fork-action.d.ts +32 -0
  72. package/dist/features/connection/ConnectionBar.d.ts +18 -0
  73. package/dist/features/connection/connection-presentation.d.ts +70 -0
  74. package/dist/features/files/BinaryFallbackViewer.d.ts +9 -0
  75. package/dist/features/files/CodeView.d.ts +15 -0
  76. package/dist/features/files/DiffView.d.ts +18 -0
  77. package/dist/features/files/FileContextMenu.d.ts +13 -0
  78. package/dist/features/files/FileExplorer.d.ts +24 -0
  79. package/dist/features/files/FilePanel.d.ts +26 -0
  80. package/dist/features/files/HtmlViewer.d.ts +22 -0
  81. package/dist/features/files/ImageViewer.d.ts +8 -0
  82. package/dist/features/files/MarkdownFileViewer.d.ts +14 -0
  83. package/dist/features/files/MoleculeViewer.d.ts +60 -0
  84. package/dist/features/files/MoleculeViewerPanel.d.ts +9 -0
  85. package/dist/features/files/PdfViewer.d.ts +14 -0
  86. package/dist/features/files/RightSidebar.d.ts +9 -0
  87. package/dist/features/files/SaveFileButton.d.ts +9 -0
  88. package/dist/features/files/TextViewer.d.ts +23 -0
  89. package/dist/features/files/TreeDraftRow.d.ts +15 -0
  90. package/dist/features/files/TreeNode.d.ts +42 -0
  91. package/dist/features/files/TreeRenameRow.d.ts +19 -0
  92. package/dist/features/files/VideoViewer.d.ts +8 -0
  93. package/dist/features/files/create-entry.d.ts +23 -0
  94. package/dist/features/files/delete-entry.d.ts +17 -0
  95. package/dist/features/files/file-tree.d.ts +92 -0
  96. package/dist/features/files/git-status-index.d.ts +37 -0
  97. package/dist/features/files/html-asset-loader.d.ts +43 -0
  98. package/dist/features/files/html-assets.d.ts +97 -0
  99. package/dist/features/files/html-sandbox.d.ts +62 -0
  100. package/dist/features/files/molecule-reload.d.ts +20 -0
  101. package/dist/features/files/molecule-source.d.ts +10 -0
  102. package/dist/features/files/molecule-theme.d.ts +31 -0
  103. package/dist/features/files/move-entry.d.ts +10 -0
  104. package/dist/features/files/move-status.d.ts +10 -0
  105. package/dist/features/files/move-target.d.ts +31 -0
  106. package/dist/features/files/open-file-tab.d.ts +32 -0
  107. package/dist/features/files/pdf-layout.d.ts +28 -0
  108. package/dist/features/files/pdfjs-runtime.d.ts +30 -0
  109. package/dist/features/files/polymer-file.d.ts +33 -0
  110. package/dist/features/files/text-viewer-state.d.ts +53 -0
  111. package/dist/features/files/upload-sources.d.ts +20 -0
  112. package/dist/features/files/viewer-registry.d.ts +81 -0
  113. package/dist/features/files/write-file.d.ts +12 -0
  114. package/dist/features/git/ChangesPanel.d.ts +13 -0
  115. package/dist/features/provider-auth/LoginDialog.d.ts +21 -0
  116. package/dist/features/provider-auth/ModelProvidersPanel.d.ts +12 -0
  117. package/dist/features/provider-auth/QrCode.d.ts +26 -0
  118. package/dist/features/provider-auth/login-flow.d.ts +55 -0
  119. package/dist/features/provider-auth/provider-auth-presentation.d.ts +31 -0
  120. package/dist/features/provider-auth/provider-auth-store.d.ts +42 -0
  121. package/dist/features/sessions/SessionContextMenu.d.ts +11 -0
  122. package/dist/features/sessions/SessionItem.d.ts +22 -0
  123. package/dist/features/sessions/SessionList.d.ts +9 -0
  124. package/dist/features/sessions/WorkspaceContextMenu.d.ts +9 -0
  125. package/dist/features/sessions/WorkspaceGroupHeader.d.ts +26 -0
  126. package/dist/features/sessions/apply-agent-deep-link.d.ts +7 -0
  127. package/dist/features/sessions/open-chat-tab.d.ts +14 -0
  128. package/dist/features/sessions/open-workspace.d.ts +20 -0
  129. package/dist/features/sessions/session-actions.d.ts +18 -0
  130. package/dist/features/sessions/session-presentation.d.ts +47 -0
  131. package/dist/features/sessions/status-map.d.ts +10 -0
  132. package/dist/features/sessions/workspace-grouping.d.ts +30 -0
  133. package/dist/features/settings/SettingsDialog.d.ts +22 -0
  134. package/dist/features/settings/ViewersPanel.d.ts +18 -0
  135. package/dist/features/settings/settings-categories.d.ts +32 -0
  136. package/dist/features/skills/InstallSkillDialog.d.ts +21 -0
  137. package/dist/features/skills/SkillsPanel.d.ts +32 -0
  138. package/dist/features/skills/skills-presentation.d.ts +159 -0
  139. package/dist/features/skills/use-skills.d.ts +215 -0
  140. package/dist/features/terminal/TerminalPanel.d.ts +37 -0
  141. package/dist/features/terminal/terminal-font.d.ts +44 -0
  142. package/dist/features/terminal/terminal-size.d.ts +52 -0
  143. package/dist/features/workspace/ContextMeter.d.ts +15 -0
  144. package/dist/features/workspace/ContextMeterPopover.d.ts +16 -0
  145. package/dist/features/workspace/DropPreview.d.ts +23 -0
  146. package/dist/features/workspace/PaneDividers.d.ts +30 -0
  147. package/dist/features/workspace/StatusBar.d.ts +16 -0
  148. package/dist/features/workspace/TabContextMenu.d.ts +15 -0
  149. package/dist/features/workspace/TabPanelHost.d.ts +30 -0
  150. package/dist/features/workspace/TabStrip.d.ts +36 -0
  151. package/dist/features/workspace/compact-action.d.ts +21 -0
  152. package/dist/features/workspace/context-meter.d.ts +26 -0
  153. package/dist/features/workspace/external-drag.d.ts +99 -0
  154. package/dist/features/workspace/pane-dnd.d.ts +70 -0
  155. package/dist/features/workspace/pane-layout-view.d.ts +73 -0
  156. package/dist/features/workspace/pane-tree.d.ts +141 -0
  157. package/dist/features/workspace/panel-registry.d.ts +13 -0
  158. package/dist/features/workspace/reopen-client-tabs.d.ts +44 -0
  159. package/dist/features/workspace/restore-active-workspace.d.ts +30 -0
  160. package/dist/features/workspace/status-bar-format.d.ts +20 -0
  161. package/dist/features/workspace/tab-attention.d.ts +35 -0
  162. package/dist/features/workspace-picker/OpenWorkspaceDialog.d.ts +11 -0
  163. package/dist/fonts/CascadiaMono.woff2 +0 -0
  164. package/dist/fonts/CascadiaMonoNF.woff2 +0 -0
  165. package/dist/fonts/LICENSE-Cascadia.txt +97 -0
  166. package/dist/fonts.css +60 -0
  167. package/dist/hooks/agent-stream-events.d.ts +20 -0
  168. package/dist/hooks/file-text-state.d.ts +31 -0
  169. package/dist/hooks/file-transfer-instance.d.ts +10 -0
  170. package/dist/hooks/use-agent-commands.d.ts +18 -0
  171. package/dist/hooks/use-agent-deep-link-boot.d.ts +9 -0
  172. package/dist/hooks/use-agent-stream.d.ts +15 -0
  173. package/dist/hooks/use-agent-todos.d.ts +10 -0
  174. package/dist/hooks/use-checkout-status.d.ts +13 -0
  175. package/dist/hooks/use-connection.d.ts +27 -0
  176. package/dist/hooks/use-explorer-tree.d.ts +20 -0
  177. package/dist/hooks/use-explorer-watch.d.ts +39 -0
  178. package/dist/hooks/use-explorer.d.ts +21 -0
  179. package/dist/hooks/use-external-pane-drop.d.ts +47 -0
  180. package/dist/hooks/use-file-diff.d.ts +9 -0
  181. package/dist/hooks/use-file-download.d.ts +18 -0
  182. package/dist/hooks/use-file-live-refresh.d.ts +31 -0
  183. package/dist/hooks/use-file-read.d.ts +31 -0
  184. package/dist/hooks/use-file-source.d.ts +16 -0
  185. package/dist/hooks/use-file-text.d.ts +21 -0
  186. package/dist/hooks/use-file-transfer.d.ts +18 -0
  187. package/dist/hooks/use-file-watch.d.ts +36 -0
  188. package/dist/hooks/use-home-dir.d.ts +14 -0
  189. package/dist/hooks/use-inline-image.d.ts +37 -0
  190. package/dist/hooks/use-is-compacting.d.ts +9 -0
  191. package/dist/hooks/use-pane-drag.d.ts +40 -0
  192. package/dist/hooks/use-pane-layout.d.ts +40 -0
  193. package/dist/hooks/use-provider-auth-list.d.ts +19 -0
  194. package/dist/hooks/use-provider-models.d.ts +14 -0
  195. package/dist/hooks/use-session-restore.d.ts +44 -0
  196. package/dist/hooks/use-session-stats.d.ts +40 -0
  197. package/dist/hooks/use-shortcuts.d.ts +6 -0
  198. package/dist/hooks/use-terminal-exit-watch.d.ts +47 -0
  199. package/dist/hooks/use-terminal-restore.d.ts +38 -0
  200. package/dist/hooks/use-thinking-levels.d.ts +13 -0
  201. package/dist/hooks/use-timeline-reset-watch.d.ts +43 -0
  202. package/dist/hooks/use-viewer-settings.d.ts +17 -0
  203. package/dist/host/browser-clipboard.d.ts +9 -0
  204. package/dist/host/browser-connection.d.ts +13 -0
  205. package/dist/host/browser-files.d.ts +9 -0
  206. package/dist/host/browser-host.d.ts +14 -0
  207. package/dist/host/browser-launch.d.ts +19 -0
  208. package/dist/host/browser-worker-timers.d.ts +29 -0
  209. package/dist/host/external-link.d.ts +14 -0
  210. package/dist/host/index.d.ts +4 -0
  211. package/dist/host/install.d.ts +21 -0
  212. package/dist/host/types.d.ts +168 -0
  213. package/dist/index.d.ts +14 -0
  214. package/dist/index.js +18 -0
  215. package/dist/lib/agent-deep-link.d.ts +29 -0
  216. package/dist/lib/connection/connection-store.d.ts +49 -0
  217. package/dist/lib/connection/files-changed.d.ts +41 -0
  218. package/dist/lib/connection/live-file-transfer.d.ts +8 -0
  219. package/dist/lib/connection/normalize-url.d.ts +16 -0
  220. package/dist/lib/connection/query-client.d.ts +3 -0
  221. package/dist/lib/connection/resolve-connect-target.d.ts +10 -0
  222. package/dist/lib/connection/resume-action.d.ts +33 -0
  223. package/dist/lib/connection/resume-handler.d.ts +6 -0
  224. package/dist/lib/connection/rpc-keys.d.ts +39 -0
  225. package/dist/lib/drag-guard.d.ts +39 -0
  226. package/dist/lib/inline-image-cache.d.ts +34 -0
  227. package/dist/lib/pane-layout-persistence.d.ts +74 -0
  228. package/dist/lib/paths.d.ts +33 -0
  229. package/dist/lib/protocol/events.d.ts +19 -0
  230. package/dist/lib/protocol/timeline-paging.d.ts +29 -0
  231. package/dist/lib/random-id.d.ts +16 -0
  232. package/dist/shell/Workbench.d.ts +6 -0
  233. package/dist/shell/WorkbenchBoot.d.ts +4 -0
  234. package/dist/shell/WorkbenchProvider.d.ts +10 -0
  235. package/dist/shell/WorkspaceShell.d.ts +12 -0
  236. package/dist/shell/context.d.ts +8 -0
  237. package/dist/shell/hooks.d.ts +32 -0
  238. package/dist/shell/regions.d.ts +17 -0
  239. package/dist/stores/compaction-store.d.ts +45 -0
  240. package/dist/stores/deep-link-store.d.ts +15 -0
  241. package/dist/stores/draft-store.d.ts +45 -0
  242. package/dist/stores/explorer-store.d.ts +63 -0
  243. package/dist/stores/fork-store.d.ts +69 -0
  244. package/dist/stores/git-store.d.ts +59 -0
  245. package/dist/stores/layout-store.d.ts +137 -0
  246. package/dist/stores/materialize.d.ts +47 -0
  247. package/dist/stores/session-store.d.ts +76 -0
  248. package/dist/stores/stats-store.d.ts +48 -0
  249. package/dist/stores/tab-store.d.ts +145 -0
  250. package/dist/stores/ui-store.d.ts +85 -0
  251. package/dist/styles.css +1 -0
  252. package/dist/timeline/FileLink.d.ts +22 -0
  253. package/dist/timeline/InlineImage.d.ts +16 -0
  254. package/dist/timeline/bottom-anchor.d.ts +77 -0
  255. package/dist/timeline/compaction.d.ts +12 -0
  256. package/dist/timeline/file-link-src.d.ts +34 -0
  257. package/dist/timeline/file-open-target.d.ts +19 -0
  258. package/dist/timeline/format-meta-time.d.ts +10 -0
  259. package/dist/timeline/highlight.d.ts +9 -0
  260. package/dist/timeline/href-resolution.d.ts +34 -0
  261. package/dist/timeline/image-src.d.ts +32 -0
  262. package/dist/timeline/inline-image-view.d.ts +34 -0
  263. package/dist/timeline/live-tail.d.ts +5 -0
  264. package/dist/timeline/markdown.d.ts +35 -0
  265. package/dist/timeline/mermaid-theme.d.ts +23 -0
  266. package/dist/timeline/reducer.d.ts +38 -0
  267. package/dist/timeline/row-model.d.ts +154 -0
  268. package/dist/timeline/streaming-split.d.ts +42 -0
  269. package/dist/timeline/tool-mapping.d.ts +60 -0
  270. package/dist/viewer-plugins/viewer-settings-store.d.ts +55 -0
  271. package/dist/vite/index.d.ts +36 -0
  272. package/dist/vite/index.js +39 -0
  273. package/package.json +81 -4
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Virtualized timeline viewport — TanStack Virtual over `session.timeline.rows` with
3
+ * variable-size rows (POC `.chat-area`, POC_TO_APP_PLAN_UI.md §4.3/§6).
4
+ *
5
+ * **Following the live agent output is split in two, along the line of what can be done from an
6
+ * effect.** Staying pinned while *existing* content grows — a streamed assistant message appends
7
+ * into the row it already owns, a tool card's output tail grows in place, an image/mermaid/
8
+ * highlighted block resolves late, an estimated row is replaced by its real measured height — has
9
+ * to be corrected inside the virtualizer's own resize handling, before paint; that is exactly what
10
+ * `anchorTo: "end"` does, so it is the library's job and none of this file's. Deciding *whether*
11
+ * the view should be following at all is a user-intent question the library cannot answer, and
12
+ * that is `timeline/bottom-anchor.ts` + `use-bottom-anchor.ts` (one boolean: only a gesture
13
+ * detaches, only proximity to the bottom re-attaches).
14
+ *
15
+ * What is left here is three lines of wiring: follow the tail whenever the row set changes, pin on
16
+ * the user's own new message, and render the jump-to-latest affordance while detached.
17
+ *
18
+ * Note that neither half needs the row *count* diffed across renders. The count-growth heuristic
19
+ * this replaced could not see a streaming row grow (same count, more text — the reported "doesn't
20
+ * follow live output"), and its cross-render tracking ref needed a cleanup that undid itself to
21
+ * survive StrictMode's double-invoke. Re-asserting the bottom is idempotent, so both are gone.
22
+ */
23
+ import type { SessionEntry } from "../../stores/session-store.js";
24
+ export interface TimelineProps {
25
+ session: SessionEntry;
26
+ owningPaneId: string | null;
27
+ workspaceCwd: string;
28
+ }
29
+ export declare function Timeline({ session, owningPaneId, workspaceCwd }: TimelineProps): import("react").JSX.Element;
30
+ //# sourceMappingURL=Timeline.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * TurnProgressBar — the redesign's turn-progress indicator (sprint-060): an indeterminate 2px
3
+ * accent sweep mounted absolutely across the top of `ChatPanel`'s body, directly under that
4
+ * pane's tab strip. Purely presentational — takes the pane's running state as a prop rather than
5
+ * subscribing to the session store itself, so it never re-renders on unrelated timeline mutations
6
+ * (see `ChatPanel.tsx`, which already holds the session).
7
+ *
8
+ * Design source: `swe/design/redesign 0.1.0/Redesign Handoff Spec.dc.html` § 05.
9
+ */
10
+ export interface TurnProgressBarProps {
11
+ running: boolean;
12
+ }
13
+ export declare function TurnProgressBar({ running }: TurnProgressBarProps): import("react").JSX.Element | null;
14
+ //# sourceMappingURL=TurnProgressBar.d.ts.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * `isComposerBusy` — the composer's busy/lockup derivation (sprint-068/task-002). Extracted purely
3
+ * so a regression test can pin the one property that keeps a dialog-blocked turn from ever locking
4
+ * the composer: **once a turn is `running`, busy tracks `steering` alone — never `sending`.**
5
+ *
6
+ * Why this matters: `client.agent(id).send(...)`'s promise does not resolve until the WHOLE turn
7
+ * completes (`packages/server/src/agent/agent-service.ts` `runTurn` awaits `session.run`, which in
8
+ * turn waits for a terminal stream event — root invariant 6, `rpcTimeoutMs` ≠ socket death). A turn
9
+ * can be blocked arbitrarily long on a pending extension dialog (`agent_ui_request`), so `sending`
10
+ * (gated on that promise) can stay `true` — or flip to `false` after a client-side
11
+ * `RpcTimeoutError` — for the entire time a dialog is pending. `running`, by contrast, is driven by
12
+ * the stream's `agent_update` broadcast, sent the instant the turn starts and cleared only when it
13
+ * truly ends. `Composer.tsx`'s own `user_message` broadcast additionally arrives synchronously,
14
+ * before the provider even begins running the turn (`runTurn`'s "if provider never emits a
15
+ * user_message, emit one ourselves" fallback fires before `session.run` is awaited), so the
16
+ * optimistic row is always reconciled long before any dialog could possibly appear — see
17
+ * `timeline/reducer.ts`'s `markUserMessageFailed`, whose own no-op-once-reconciled guard is what
18
+ * keeps a late `send()` rejection (timeout or otherwise) from ever clobbering an already-confirmed
19
+ * row back into a spurious failure.
20
+ */
21
+ export declare function isComposerBusy(running: boolean, sending: boolean, steering: boolean): boolean;
22
+ //# sourceMappingURL=composer-busy.d.ts.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Pure submit gating for the composer (sprint-074), kept out of `Composer.tsx` so the rules are
3
+ * unit-testable. `isComposerBusy` (composer-busy.ts) covers the in-flight RPC flags; this adds the
4
+ * two facts it can't see — a compaction is running, and the draft is a client built-in — plus
5
+ * what happens to a `/compact` draft once the compaction settles.
6
+ */
7
+ import type { CompactResult } from "../../stores/compaction-store.js";
8
+ export interface CompactAvailability {
9
+ running: boolean;
10
+ compacting: boolean;
11
+ hasAgent: boolean;
12
+ }
13
+ /** `/compact` can run only against a live-capable agent that is idle and not already compacting. */
14
+ export declare function canCompact({ running, compacting, hasAgent }: CompactAvailability): boolean;
15
+ /**
16
+ * A `/compact` draft is cleared the moment it is submitted (the RPC resolves only when the
17
+ * compaction ends). It is put back only when nothing was compacted — a refusal or an RPC failure —
18
+ * so a retry is one keystroke. A user cancel is the requested outcome, not something to retry, and
19
+ * a draft written meanwhile (e.g. a `set_editor_text` effect) is never clobbered.
20
+ */
21
+ export declare function shouldRestoreCompactDraft(result: CompactResult, currentDraft: string): boolean;
22
+ export interface SubmitGateInput extends CompactAvailability {
23
+ hasClient: boolean;
24
+ /** `isComposerBusy(...)` — an in-flight send/steer. */
25
+ busy: boolean;
26
+ /** Draft text (untrimmed) — decides whether it is a built-in invocation. */
27
+ text: string;
28
+ hasImages: boolean;
29
+ }
30
+ /**
31
+ * Whether Send/Enter may act on this draft:
32
+ * - compacting blocks every draft (Pi rejects prompts during compaction);
33
+ * - a `/compact` draft needs `canCompact` — in particular it is never routed to steer while
34
+ * running, which would send the literal text to the model mid-turn.
35
+ */
36
+ export declare function canSubmitDraft(input: SubmitGateInput): boolean;
37
+ //# sourceMappingURL=composer-gate.d.ts.map
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Pure text decisions for dropping a Files-tree row onto the composer: which path to insert, how to
3
+ * quote it, and where the spaces go. No DOM, so every edge case is Node-tested; `Composer.tsx` only
4
+ * wires the result to the textarea.
5
+ *
6
+ * swe/features/composer-path-drop.md § Public contract 5, § Behavior & algorithms
7
+ */
8
+ /**
9
+ * The root a dropped path is made relative to: the composer's own session cwd, normalised exactly as
10
+ * the Files tree roots itself, without a trailing `/`. `null` when it is still an unresolved `~`
11
+ * (`homeDir` not known yet) or empty — the drop is refused rather than guessed.
12
+ */
13
+ export declare function refRoot(sessionCwd: string, homeDir: string | null): string | null;
14
+ /**
15
+ * Strict workspace-relative path: `null` unless `absPath` is inside `root` on a **segment boundary**
16
+ * (`/repo2/x` is not under `/repo`). A trailing `/` (a folder) is preserved. The root itself is
17
+ * `null` too.
18
+ *
19
+ * `lib/paths.ts`'s `relativeToRoot` is deliberately not reused: it returns an out-of-root path
20
+ * unchanged, which would insert an absolute path, and has no segment-boundary check.
21
+ */
22
+ export declare function relativeRefPath(absPath: string, root: string | null): string | null;
23
+ /**
24
+ * The text a path becomes in the draft: bare unless it contains whitespace or a backtick, in which
25
+ * case it is a CommonMark code span — a fence one backtick longer than the longest run inside, padded
26
+ * with a space on both sides when the path starts or ends with a backtick.
27
+ */
28
+ export declare function formatRefToken(rel: string): string;
29
+ export interface InsertionPlan {
30
+ /** Replace `[start, end)` of the draft… */
31
+ start: number;
32
+ end: number;
33
+ /** …with this: the token plus any spacing. */
34
+ insert: string;
35
+ /** Caret offset in the new text after the replacement. */
36
+ caret: number;
37
+ }
38
+ /**
39
+ * Smart spacing around an inserted token. Spacing is judged from the characters **outside** the
40
+ * replaced range: a leading space only when glued to a non-whitespace character, a trailing space
41
+ * unless whitespace already follows (so nothing is doubled). Offsets are clamped to the text and
42
+ * ordered, so a stale or reversed selection never throws.
43
+ */
44
+ export declare function planInsertion(text: string, selStart: number, selEnd: number, token: string): InsertionPlan;
45
+ export type ComposerDrop = {
46
+ kind: "ignore";
47
+ } | {
48
+ kind: "refuse";
49
+ } | {
50
+ kind: "insert";
51
+ plan: InsertionPlan;
52
+ };
53
+ export interface ComposerDropInput {
54
+ /** The decoded path-ref value (`readPathRef`), `null` when absent or blank. */
55
+ refValue: string | null;
56
+ compacting: boolean;
57
+ /** `refRoot` of the composer's own session. */
58
+ root: string | null;
59
+ text: string;
60
+ selStart: number;
61
+ selEnd: number;
62
+ /** The textarea has never been focused since it mounted. */
63
+ neverFocused: boolean;
64
+ }
65
+ /**
66
+ * What a drop on the composer does, composed from the helpers above so the wiring stays DOM-only:
67
+ * nothing (not ours, or compacting), a refusal (not strictly inside the workspace — the draft stays
68
+ * untouched), or an insertion.
69
+ *
70
+ * A textarea mounted with a non-empty draft reports a caret at 0 until first focus (composer spike,
71
+ * swe/notes/composer-path-drop-spike.md), so until then the caret is not trusted and the path goes at
72
+ * the end of the text.
73
+ */
74
+ export declare function decideComposerDrop(input: ComposerDropInput): ComposerDrop;
75
+ //# sourceMappingURL=composer-path-drop.d.ts.map
@@ -0,0 +1,39 @@
1
+ /**
2
+ * Fork target correlation (sprint-072/task-002) — Timeline user rows and Pi's `forkMessages()`
3
+ * entries live in disjoint id spaces (`swe/features/conversation-fork.md` § Ground truth): a live
4
+ * `user_message` event's `messageId` is the client-minted `clientMessageId` echo (`row-model.ts`),
5
+ * while Pi's `entryId` is its own JSONL entry id — nothing correlates them directly. Correlation
6
+ * is therefore POSITIONAL: the clicked row's ordinal among the transcript's CONFIRMED user rows
7
+ * equals the index into `forkMessages()`'s result, since both enumerate the active branch's user
8
+ * messages chronologically. Verified by normalized-text equality before acting — any mismatch
9
+ * (ordinal out of range, or disagreeing text) falls back to the picker rather than forking an
10
+ * unverified entry (the task's own requirement — see `fork-gate.ts` for the separate, session-
11
+ * level visibility gate this correlation sits behind).
12
+ */
13
+ import type { TimelineRow, UserRow } from "../../timeline/row-model.js";
14
+ export interface ForkTarget {
15
+ entryId: string;
16
+ text: string;
17
+ }
18
+ export type ForkCorrelationResult = {
19
+ outcome: "matched";
20
+ target: ForkTarget;
21
+ } | {
22
+ outcome: "fallback-to-picker";
23
+ };
24
+ /** A user row that has been server-confirmed — never a `pending`/`failed` optimistic echo. Only
25
+ * these rows are forkable (visual spec § 03) and only these participate in ordinal correlation. */
26
+ export declare function isConfirmedUserRow(row: TimelineRow): row is UserRow;
27
+ /** Confirmed user-row texts in transcript order — the domain `correlateForkTarget` indexes into. */
28
+ export declare function collectConfirmedUserRows(rows: readonly TimelineRow[]): string[];
29
+ /** Maps each confirmed user row's id to its ordinal (0-based, transcript order) — the same
30
+ * ordinal space a row's click handler passes to `correlateForkTarget`. Only confirmed rows get an
31
+ * entry, so a `pending`/`failed` row's id is never present here. */
32
+ export declare function buildConfirmedOrdinalByRowId(rows: readonly TimelineRow[]): Map<string, number>;
33
+ /**
34
+ * Correlate `clickedIndex` (an ordinal into `confirmedUserRowTexts`, transcript order) against
35
+ * `messages` (a fresh `forkMessages()` result, same order per Pi). Matches only when the ordinal
36
+ * is in range for BOTH arrays AND the normalized texts agree; otherwise falls back to the picker.
37
+ */
38
+ export declare function correlateForkTarget(confirmedUserRowTexts: readonly string[], clickedIndex: number, messages: readonly ForkTarget[]): ForkCorrelationResult;
39
+ //# sourceMappingURL=fork-correlation.d.ts.map
@@ -0,0 +1,27 @@
1
+ /**
2
+ * Fork-affordance visibility gate (sprint-072/task-002) — a single pure predicate deciding
3
+ * whether ANY row in a session can offer a fork button right now (visual spec § 03 "When the
4
+ * affordance exists"). Row-level confirmation (`fork-correlation.ts`'s `isConfirmedUserRow`) is
5
+ * layered on top of this by the caller (`use-fork-action.ts`) — this gate only answers the
6
+ * SESSION-level half: capability, turn state, and process existence.
7
+ */
8
+ export interface ForkGateInput {
9
+ /** `server_info.features.forkTimelineSync` (`protocol/src/client-capabilities.ts`). */
10
+ forkTimelineSync: boolean;
11
+ /** `session.status === "running"` — the same signal the composer's busy state consumes; Pi
12
+ * tears down the runtime on fork, so it must never be offered mid-turn. */
13
+ running: boolean;
14
+ /**
15
+ * `session.agentId` — `null` for a deferred draft with no live process
16
+ * (`stores/materialize.ts`). A materialized-but-never-sent draft can in practice never have a
17
+ * CONFIRMED user row to attach a button to (the very first confirmed row implies a live
18
+ * process already produced the `user_message` broadcast that confirmed it), but this is
19
+ * checked explicitly rather than relied on as a structural side effect, since the acceptance
20
+ * criterion is about observable button absence on such a session, not an inference from a
21
+ * different invariant.
22
+ */
23
+ agentId: string | null;
24
+ }
25
+ /** True iff the fork affordance can offer ANY row in this session a fork button right now. */
26
+ export declare function canOfferFork(input: ForkGateInput): boolean;
27
+ //# sourceMappingURL=fork-gate.d.ts.map
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Fork picker keyboard navigation — pure index arithmetic for `ForkDialog.tsx`'s picker step
3
+ * (sprint-072/task-005, visual spec § 11). Split out so the clamping rule is testable without
4
+ * mounting the dialog or depending on `document.activeElement`, the same rationale `fork-result.ts`
5
+ * documents for its own stores-only split.
6
+ */
7
+ /**
8
+ * Computes the row index ↑/↓ should move focus to. Plain focusable `<button>`s, not a
9
+ * roving-tabindex widget — the caller still calls `.focus()` on the returned index; Enter/Space
10
+ * already activate the focused button natively. Clamps rather than wraps at either end (no cyclic
11
+ * wraparound) and is a no-op when there is nothing to move between.
12
+ */
13
+ export declare function nextPickerFocusIndex(currentIndex: number, key: "ArrowDown" | "ArrowUp", rowCount: number): number;
14
+ //# sourceMappingURL=fork-picker-nav.d.ts.map
@@ -0,0 +1,43 @@
1
+ /**
2
+ * Fork completion — how a settled `fork(entryId)` RPC is applied (sprint-072/task-004). The RPC
3
+ * response does only two things: close the dialog and prefill the composer; the timeline refresh
4
+ * deliberately rides task-001's `agent_timeline_reset` broadcast handler instead — there is no
5
+ * bespoke path here for the requester, so the initiating tab, a second browser window, and a
6
+ * relay-connected phone all converge identically (special-casing the requester would recreate
7
+ * exactly the divergence the broadcast design exists to prevent).
8
+ *
9
+ * Split out of `ForkDialog.tsx` so these decisions are testable without mounting the dialog —
10
+ * each function reads/writes the relevant stores directly via `.getState()`, the same imperative
11
+ * pattern `agent-ui-store.ts`'s `composerTextEffect` already uses for the equivalent
12
+ * `replace_composer_text` effect.
13
+ */
14
+ /** § 12 copy deck — shipped verbatim. */
15
+ export declare const FORK_DECLINED_TOAST = "An extension declined the fork.";
16
+ /** § 12's "generic" toast row — the fallback when a caught error carries no readable message. */
17
+ export declare const FORK_GENERIC_ERROR_TOAST = "Couldn't fork. Try again.";
18
+ /**
19
+ * Applies a resolved (non-throwing) `fork()` result.
20
+ *
21
+ * - `cancelled` (a `session_before_fork` extension handler declined it): toast the § 12 copy,
22
+ * close the dialog, change nothing else — no `agent_timeline_reset` arrives, and none should be
23
+ * expected. The toast's own `role="status"`/`aria-live="polite"` region (`ToastViewport.tsx`)
24
+ * is the resolution announcement here — `clearWhenIdle` below only ends the "Forking…" pending
25
+ * announcement (§ 11) spoken when the confirm step's RPC was fired; it never speaks a second,
26
+ * redundant one.
27
+ * - Otherwise: close the dialog, then write `text` into the FORKED session's own draft — resolved
28
+ * by `agentId` via `session-store`'s `findByAgentId`, never "whichever composer has focus" (the
29
+ * `agent-ui-store.ts` precedent for `replace_composer_text`) — but only when that draft is
30
+ * empty. A user's in-progress draft is never clobbered, and the skip is silent (no toast).
31
+ */
32
+ export declare function applyForkSuccess(agentId: string, result: {
33
+ text: string;
34
+ cancelled: boolean;
35
+ }): void;
36
+ /**
37
+ * Applies a `fork()` rejection (`rpc_error` — e.g. Pi's unsaved-session error, or an unknown/stale
38
+ * `entryId`): toast the daemon's own message (its own aria-live region is the announcement, same
39
+ * rationale as the `cancelled` branch above) and return the dialog to a reusable, non-pending
40
+ * state rather than closing it, so a retry needs no reopening.
41
+ */
42
+ export declare function applyForkError(error: unknown): void;
43
+ //# sourceMappingURL=fork-result.d.ts.map
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Pure ordering helpers for `ModelMenu` (sprint-043) — kept out of the `.tsx` file so they're
3
+ * unit-testable under the root vitest config (which only discovers `.test.ts` files under a node
4
+ * environment; `.tsx` component files are not picked up there).
5
+ */
6
+ export interface ModelLike {
7
+ id: string;
8
+ /** The model's own underlying LLM provider (e.g. `"anthropic"`) — the picker's grouping key,
9
+ * and half of a model's real identity (see `dedupeByModelKey`). */
10
+ provider?: string;
11
+ }
12
+ /**
13
+ * Move the model the session is currently on to the front; keep the rest in server order. Since
14
+ * the picker groups by provider, hoisting also decides which provider band renders first, so
15
+ * `currentProvider` disambiguates when the same `id` is offered by more than one provider — an
16
+ * id-only match could otherwise hoist (and check-mark) the wrong provider's copy.
17
+ */
18
+ export declare function sortCurrentFirst<T extends ModelLike>(models: T[], currentModel?: string, currentProvider?: string): T[];
19
+ /**
20
+ * Drop later entries that repeat an earlier `provider/id` pair. Real provider model lists can
21
+ * list the same underlying model twice (observed live against the `pi` provider: two entries both
22
+ * reporting id `claude-sonnet-5`), which silently collides React list keys and leaves a
23
+ * stale/misplaced row once the list is filtered. The key is `provider/id`, not `id` alone: the
24
+ * same model reachable through two providers is two genuinely different choices (different
25
+ * credentials and billing, and `setModel` takes the provider), and grouping renders them under
26
+ * their own headers rather than as an unexplained duplicate. Call after `sortCurrentFirst` so the
27
+ * kept occurrence of the current model is the one already sorted to the front.
28
+ */
29
+ export declare function dedupeByModelKey<T extends ModelLike>(models: T[]): T[];
30
+ //# sourceMappingURL=model-menu-sort.d.ts.map
@@ -0,0 +1,18 @@
1
+ /**
2
+ * `shouldShowProviderOnboardingNudge` — the pure decision behind the empty-timeline onboarding
3
+ * nudge (sprint-065/task-006, `Timeline.tsx`). Pulled out of the component so the one subtle rule
4
+ * — `configured: "unknown"` must suppress the nudge, not merely fail to trigger it — gets a real
5
+ * unit test; this repo's Vitest runner has no jsdom, so `Timeline.tsx` itself is verified manually
6
+ * in a real browser (see the task's own verification plan) and this module carries the logic that
7
+ * can be tested headlessly.
8
+ */
9
+ import type { ProviderAuthInfo } from "@av-pi-studio/protocol";
10
+ /**
11
+ * The nudge shows only when the daemon has the capability, the provider list has loaded, and
12
+ * every provider is a *confirmed* `false` — a bounded-out `checkAuth()` (`configured: "unknown"`)
13
+ * is not evidence of "unconfigured" and must suppress the nudge exactly like a confirmed `true`
14
+ * does, so a user whose credential actually works (just not confirmed within the probe's bound)
15
+ * is never nagged.
16
+ */
17
+ export declare function shouldShowProviderOnboardingNudge(providerAuthCapable: boolean, providers: ProviderAuthInfo[] | undefined): boolean;
18
+ //# sourceMappingURL=onboarding-nudge.d.ts.map
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Assistant message row (design spec § 04, sprint-059/task-003; bubble added back per user
3
+ * request after the redesign shipped) — `surface2`-filled bubble, distinct from the user's
4
+ * accent-tinted (blue) bubble so the two speakers stay visually distinguishable; identified
5
+ * further by its rail disc + meta line, same as every other row kind.
6
+ *
7
+ * Markdown renders live, mid-stream: `StreamingMarkdown` renders every block the model has
8
+ * finished (parsed once each, memoized) plus the one it is still writing (a short lean parse per
9
+ * token delta), with the caret after the last rendered element. Re-parsing the *whole* message per
10
+ * delta is what would be wasteful (§6 Performance strategy) — ~9–27ms for a 3.5–10KB message,
11
+ * every token. The reducer's `streaming: false` (Pi's `text_end` block-close marker, or the next
12
+ * tool call / turn boundary) now only swaps the split render for one canonical full parse.
13
+ */
14
+ import type { AssistantRow as AssistantRowModel } from "../../../timeline/row-model.js";
15
+ export interface AssistantRowProps {
16
+ row: AssistantRowModel;
17
+ assetBase?: string | null;
18
+ owningPaneId?: string | null;
19
+ workspaceCwd?: string | null;
20
+ /** Draw the rail connector below this row. `false` on the timeline's last row. */
21
+ connector: boolean;
22
+ }
23
+ export declare function AssistantRow({ row, assetBase, owningPaneId, workspaceCwd, connector, }: AssistantRowProps): import("react").JSX.Element;
24
+ //# sourceMappingURL=AssistantRow.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Compaction row (sprint-074) — a full-width divider with a centered label that updates in place
3
+ * from `Compacting context…` to its outcome. Like `SystemRow` it renders outside `RowShell`: it is
4
+ * a marker in the timeline, not a speaker, so it has no rail disc, no actions, and no fork
5
+ * affordance. A completed row with a summary discloses it (collapsed by default) through the same
6
+ * markdown renderer assistant text uses.
7
+ */
8
+ import type { CompactionRow as CompactionRowModel } from "../../../timeline/row-model.js";
9
+ export interface CompactionRowProps {
10
+ row: CompactionRowModel;
11
+ assetBase?: string | null;
12
+ owningPaneId?: string | null;
13
+ workspaceCwd?: string | null;
14
+ }
15
+ export declare function CompactionRow({ row, assetBase, owningPaneId, workspaceCwd, }: CompactionRowProps): import("react").JSX.Element;
16
+ //# sourceMappingURL=CompactionRow.d.ts.map
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Error row — inline destructive-tinted card (design spec § 04), used for `turn_failed`/`error`
3
+ * stream events. Explicitly non-terminal: the timeline continues normally below it, so this is a
4
+ * bordered card wash rather than the old solid-fill block, which read as an end state.
5
+ */
6
+ import type { ErrorRow as ErrorRowModel } from "../../../timeline/row-model.js";
7
+ export interface ErrorRowProps {
8
+ row: ErrorRowModel;
9
+ /** Draw the rail connector below this row. `false` on the timeline's last row. */
10
+ connector: boolean;
11
+ }
12
+ export declare function ErrorRow({ row, connector }: ErrorRowProps): import("react").JSX.Element;
13
+ //# sourceMappingURL=ErrorRow.d.ts.map
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Reasoning row (design spec § 04, sprint-059/task-003) — italic, muted body visually distinct
3
+ * from assistant replies, with a muted rail disc and a small `final` chip on the meta line once
4
+ * the block closes. Renders live markdown while streaming, same split-by-block path and rationale
5
+ * as `AssistantRow`.
6
+ */
7
+ import type { ReasoningRow as ReasoningRowModel } from "../../../timeline/row-model.js";
8
+ export interface ReasoningRowProps {
9
+ row: ReasoningRowModel;
10
+ owningPaneId?: string | null;
11
+ workspaceCwd?: string | null;
12
+ /** Draw the rail connector below this row. `false` on the timeline's last row. */
13
+ connector: boolean;
14
+ }
15
+ export declare function ReasoningRow({ row, owningPaneId, workspaceCwd, connector, }: ReasoningRowProps): import("react").JSX.Element;
16
+ //# sourceMappingURL=ReasoningRow.d.ts.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * RowShell — shared `[rail | content]` scaffold for timeline rows (design spec § 04): a 20px rail
3
+ * column holding an 18px disc and a connector line down to the next row, beside a full-width
4
+ * content column with an optional meta line above the row's own content.
5
+ *
6
+ * `SystemRow` is the one row kind that renders outside this shell entirely — it has no rail entry
7
+ * (design spec § 04's ROW/EVENT table).
8
+ *
9
+ * The connector is passed explicitly per row (`connector={false}` on the timeline's last row)
10
+ * rather than inferred with a `:last-child` CSS selector, which is wrong under virtualization —
11
+ * the last *mounted* row is not necessarily the last row in the timeline (`Timeline.tsx`'s
12
+ * `renderRow` computes it from the row's absolute index against `rows.length`, not from what
13
+ * happens to be mounted).
14
+ *
15
+ * `meta`/`metaTrailing` exist for `UserRow`/`AssistantRow`/`ReasoningRow` (sprint-059/task-003),
16
+ * which render a label + optional trailing chip (e.g. the `final` chip) above their content; this
17
+ * task's own consumers (`ErrorRow`) don't need one.
18
+ */
19
+ import type { ReactNode } from "react";
20
+ export interface RowShellProps {
21
+ /** Disc content — typically an `Icon`. RowShell only sets the disc's shape/size; the caller
22
+ * supplies its background/foreground tint via `discClassName`. */
23
+ disc: ReactNode;
24
+ discClassName?: string;
25
+ /** Draw the connector below this row's disc. `false` on the timeline's last row. */
26
+ connector: boolean;
27
+ /** Meta line label (e.g. "You", "Reasoning"), rendered above `children`. Plain string, or a
28
+ * fragment combining the label with a dimmed/hover-reveal timestamp span (`.metaTime`). */
29
+ meta?: ReactNode;
30
+ /** Optional trailing content on the meta line (e.g. the `final` chip). Ignored without `meta`. */
31
+ metaTrailing?: ReactNode;
32
+ /** Extra class on the content column, for row-kind-specific styling. */
33
+ className?: string;
34
+ children: ReactNode;
35
+ }
36
+ export declare function RowShell({ disc, discClassName, connector, meta, metaTrailing, className, children, }: RowShellProps): import("react").JSX.Element;
37
+ //# sourceMappingURL=RowShell.d.ts.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * System row — centered muted marker (design spec § 04's ROW/EVENT table), used for canceled-turn
3
+ * markers and other system notices. The one row kind that renders outside `RowShell` — it has no
4
+ * rail entry.
5
+ */
6
+ import type { SystemRow as SystemRowModel } from "../../../timeline/row-model.js";
7
+ export interface SystemRowProps {
8
+ row: SystemRowModel;
9
+ }
10
+ export declare function SystemRow({ row }: SystemRowProps): import("react").JSX.Element;
11
+ //# sourceMappingURL=SystemRow.d.ts.map
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Tool call card (design spec § 04, sprint-059/task-004) — a kind badge + full primary field +
3
+ * status in the header, on the shared `RowShell` rail. Collapsed by default; clicking the header
4
+ * reveals the full detail as an ordered list of sections: input detail (`edit` diffs render
5
+ * through the shared `<DiffView>`; shell command/path/query/url/task description render in a
6
+ * monospace block) followed by tool output (stdout, file content, etc.), when present. Cards with
7
+ * no expandable sections (`toolBody` → `[]`) show only the header. The virtualized timeline
8
+ * re-measures on expand via `measureElement`, so height changes need no special handling here.
9
+ *
10
+ * `cursor: pointer` alone wasn't a clear enough signal that the header is clickable (user
11
+ * feedback); `.toolHeader:hover` now lifts the header's background (the app's existing
12
+ * theme-adaptive `foreground`-mix hover idiom), and its own bodyless-card guard
13
+ * (`:not([aria-disabled="true"])`) means a card with nothing to expand shows no hover feedback.
14
+ *
15
+ * The header is a `role="button"` `div`, not a `<button>`, because the `edit`/`write` "Open"
16
+ * control must sit beside it as a real, independently-focusable button — nesting a `<button>`
17
+ * inside a `<button>` is invalid HTML and breaks its own click handling. `stopPropagation` on
18
+ * Open's own handlers keeps it from also toggling the card.
19
+ */
20
+ import type { ToolRow } from "../../../timeline/row-model.js";
21
+ export interface ToolCardProps {
22
+ row: ToolRow;
23
+ assetBase?: string | null;
24
+ owningPaneId?: string | null;
25
+ workspaceCwd?: string | null;
26
+ /** Draw the rail connector below this row. `false` on the timeline's last row. */
27
+ connector: boolean;
28
+ }
29
+ export declare function ToolCard({ row, assetBase, owningPaneId, workspaceCwd, connector, }: ToolCardProps): import("react").JSX.Element;
30
+ //# sourceMappingURL=ToolCard.d.ts.map
@@ -0,0 +1,43 @@
1
+ /**
2
+ * User message row — shrink-to-fit accent bubble on the shared rail scaffold (design spec § 04,
3
+ * sprint-059/task-003), right-aligned within the content column (`.userAligned`, task-005 follow-
4
+ * up) so it stays visually distinct from the left-flowing assistant/tool rows sharing the same
5
+ * rail — the disc/connector stay on the rail's fixed left column for continuity; only the bubble,
6
+ * meta line and image row shift to the content column's right edge. The rail disc is a
7
+ * `color-mix(statusSuccess 65%, surface3)` fill with a `successForeground` (white) icon — a
8
+ * distinct green marker for "this is you" without the raw saturation of the full-strength token
9
+ * (tried and walked back after user feedback), and not the low-opacity muted tint other non-accent
10
+ * discs (`ErrorRow`, `ReasoningRow`) use, which read as too bland here; the bubble itself stays
11
+ * accent-tinted. Images render at up to
12
+ * 200×150 inside the bubble's content column, matching the POC's inline
13
+ * `userBubble.appendChild(img)` styling. Clicking a thumbnail opens it full-size in a `Dialog`.
14
+ *
15
+ * `row.pending` (optimistic echo not yet confirmed by the server's `user_message` broadcast —
16
+ * see Composer.tsx) dims the whole row via CSS; `row.failed` (the RPC rejected before
17
+ * confirmation ever arrived) turns the bubble into a destructive-tinted variant of itself and
18
+ * appends a "failed to send" label to the meta line instead of a solid error fill — this is a
19
+ * transient, retryable state, not an end state. `row.queued` (steered mid-turn, not yet handed to
20
+ * the LLM — cleared by a `queue_update` stream event, see `timeline/reducer.ts`'s
21
+ * `onQueueUpdate`) shows a small "queued" chip on the meta line. All three are terminal/transient
22
+ * states set by the reducer — this component only reflects them.
23
+ */
24
+ import type { UserRow as UserRowModel } from "../../../timeline/row-model.js";
25
+ /** § 12 copy deck — the row affordance's visible tooltip, shown on hover and on focus. */
26
+ export declare const FORK_ROW_TOOLTIP = "Fork from here";
27
+ /** § 11 keyboard/assistive-tech — the accessible name, deliberately more descriptive than the
28
+ * tooltip so a screen-reader user hears the action AND that it targets "this message" without
29
+ * needing row context first. */
30
+ export declare const FORK_ROW_ARIA_LABEL = "Fork conversation from this message";
31
+ export interface UserRowProps {
32
+ row: UserRowModel;
33
+ /** Draw the rail connector below this row. `false` on the timeline's last row. */
34
+ connector: boolean;
35
+ /**
36
+ * Fork affordance click handler (sprint-072/task-002) — `null`/`undefined` when this row
37
+ * cannot offer a fork button (session-level gate false, or an optimistic pending/failed row
38
+ * has no ordinal). Presence alone decides whether the button renders at all.
39
+ */
40
+ onFork?: (() => void) | null;
41
+ }
42
+ export declare function UserRow({ row, connector, onFork }: UserRowProps): import("react").JSX.Element;
43
+ //# sourceMappingURL=UserRow.d.ts.map