@onpoint-dev-tools/crewcoder-opentui 0.0.0-stage → 0.1.0

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 (325) hide show
  1. package/LICENSE +191 -0
  2. package/README.md +262 -2
  3. package/THIRD_PARTY_NOTICES.md +51 -0
  4. package/dist/App.d.ts +16 -0
  5. package/dist/App.d.ts.map +1 -0
  6. package/dist/App.js +428 -0
  7. package/dist/App.js.map +1 -0
  8. package/dist/Root.d.ts +11 -0
  9. package/dist/Root.d.ts.map +1 -0
  10. package/dist/Root.js +13 -0
  11. package/dist/Root.js.map +1 -0
  12. package/dist/alert-model.d.ts +31 -0
  13. package/dist/alert-model.d.ts.map +1 -0
  14. package/dist/alert-model.js +34 -0
  15. package/dist/alert-model.js.map +1 -0
  16. package/dist/args.d.ts +13 -0
  17. package/dist/args.d.ts.map +1 -0
  18. package/dist/args.js +63 -0
  19. package/dist/args.js.map +1 -0
  20. package/dist/attachments.d.ts +29 -0
  21. package/dist/attachments.d.ts.map +1 -0
  22. package/dist/attachments.js +38 -0
  23. package/dist/attachments.js.map +1 -0
  24. package/dist/block-panels.d.ts +43 -0
  25. package/dist/block-panels.d.ts.map +1 -0
  26. package/dist/block-panels.js +210 -0
  27. package/dist/block-panels.js.map +1 -0
  28. package/dist/cli.d.ts +3 -0
  29. package/dist/cli.d.ts.map +1 -0
  30. package/dist/cli.js +138 -0
  31. package/dist/cli.js.map +1 -0
  32. package/dist/command-format.d.ts +18 -0
  33. package/dist/command-format.d.ts.map +1 -0
  34. package/dist/command-format.js +66 -0
  35. package/dist/command-format.js.map +1 -0
  36. package/dist/command-runner.d.ts +128 -0
  37. package/dist/command-runner.d.ts.map +1 -0
  38. package/dist/command-runner.js +571 -0
  39. package/dist/command-runner.js.map +1 -0
  40. package/dist/commands.d.ts +47 -0
  41. package/dist/commands.d.ts.map +1 -0
  42. package/dist/commands.js +108 -0
  43. package/dist/commands.js.map +1 -0
  44. package/dist/components/AttachmentRow.d.ts +11 -0
  45. package/dist/components/AttachmentRow.d.ts.map +1 -0
  46. package/dist/components/AttachmentRow.js +17 -0
  47. package/dist/components/AttachmentRow.js.map +1 -0
  48. package/dist/components/Composer.d.ts +23 -0
  49. package/dist/components/Composer.d.ts.map +1 -0
  50. package/dist/components/Composer.js +45 -0
  51. package/dist/components/Composer.js.map +1 -0
  52. package/dist/components/ExtensionQuestion.d.ts +18 -0
  53. package/dist/components/ExtensionQuestion.d.ts.map +1 -0
  54. package/dist/components/ExtensionQuestion.js +45 -0
  55. package/dist/components/ExtensionQuestion.js.map +1 -0
  56. package/dist/components/GoalForm.d.ts +18 -0
  57. package/dist/components/GoalForm.d.ts.map +1 -0
  58. package/dist/components/GoalForm.js +26 -0
  59. package/dist/components/GoalForm.js.map +1 -0
  60. package/dist/components/Home.d.ts +21 -0
  61. package/dist/components/Home.d.ts.map +1 -0
  62. package/dist/components/Home.js +48 -0
  63. package/dist/components/Home.js.map +1 -0
  64. package/dist/components/MentionList.d.ts +14 -0
  65. package/dist/components/MentionList.d.ts.map +1 -0
  66. package/dist/components/MentionList.js +24 -0
  67. package/dist/components/MentionList.js.map +1 -0
  68. package/dist/components/SearchBar.d.ts +19 -0
  69. package/dist/components/SearchBar.d.ts.map +1 -0
  70. package/dist/components/SearchBar.js +28 -0
  71. package/dist/components/SearchBar.js.map +1 -0
  72. package/dist/components/Sidebar.d.ts +19 -0
  73. package/dist/components/Sidebar.d.ts.map +1 -0
  74. package/dist/components/Sidebar.js +35 -0
  75. package/dist/components/Sidebar.js.map +1 -0
  76. package/dist/components/SummaryEditor.d.ts +16 -0
  77. package/dist/components/SummaryEditor.d.ts.map +1 -0
  78. package/dist/components/SummaryEditor.js +21 -0
  79. package/dist/components/SummaryEditor.js.map +1 -0
  80. package/dist/components/Transcript.d.ts +37 -0
  81. package/dist/components/Transcript.d.ts.map +1 -0
  82. package/dist/components/Transcript.js +314 -0
  83. package/dist/components/Transcript.js.map +1 -0
  84. package/dist/components/ui/alert.d.ts +9 -0
  85. package/dist/components/ui/alert.d.ts.map +1 -0
  86. package/dist/components/ui/alert.js +18 -0
  87. package/dist/components/ui/alert.js.map +1 -0
  88. package/dist/components/ui/command-palette.d.ts +15 -0
  89. package/dist/components/ui/command-palette.d.ts.map +1 -0
  90. package/dist/components/ui/command-palette.js +14 -0
  91. package/dist/components/ui/command-palette.js.map +1 -0
  92. package/dist/components/ui/confirm.d.ts +12 -0
  93. package/dist/components/ui/confirm.d.ts.map +1 -0
  94. package/dist/components/ui/confirm.js +16 -0
  95. package/dist/components/ui/confirm.js.map +1 -0
  96. package/dist/components/ui/select.d.ts +11 -0
  97. package/dist/components/ui/select.d.ts.map +1 -0
  98. package/dist/components/ui/select.js +29 -0
  99. package/dist/components/ui/select.js.map +1 -0
  100. package/dist/components/ui/spinner.d.ts +14 -0
  101. package/dist/components/ui/spinner.d.ts.map +1 -0
  102. package/dist/components/ui/spinner.js +17 -0
  103. package/dist/components/ui/spinner.js.map +1 -0
  104. package/dist/components/ui/tool-approval.d.ts +14 -0
  105. package/dist/components/ui/tool-approval.d.ts.map +1 -0
  106. package/dist/components/ui/tool-approval.js +37 -0
  107. package/dist/components/ui/tool-approval.js.map +1 -0
  108. package/dist/components/ui/tool-call.d.ts +12 -0
  109. package/dist/components/ui/tool-call.d.ts.map +1 -0
  110. package/dist/components/ui/tool-call.js +69 -0
  111. package/dist/components/ui/tool-call.js.map +1 -0
  112. package/dist/components/ui/types.d.ts +82 -0
  113. package/dist/components/ui/types.d.ts.map +1 -0
  114. package/dist/components/ui/types.js +2 -0
  115. package/dist/components/ui/types.js.map +1 -0
  116. package/dist/crewcoder-cli.d.ts +51 -0
  117. package/dist/crewcoder-cli.d.ts.map +1 -0
  118. package/dist/crewcoder-cli.js +26 -0
  119. package/dist/crewcoder-cli.js.map +1 -0
  120. package/dist/diff-anchors.d.ts +14 -0
  121. package/dist/diff-anchors.d.ts.map +1 -0
  122. package/dist/diff-anchors.js +43 -0
  123. package/dist/diff-anchors.js.map +1 -0
  124. package/dist/footer-layout.d.ts +49 -0
  125. package/dist/footer-layout.d.ts.map +1 -0
  126. package/dist/footer-layout.js +79 -0
  127. package/dist/footer-layout.js.map +1 -0
  128. package/dist/glyphs.d.ts +32 -0
  129. package/dist/glyphs.d.ts.map +1 -0
  130. package/dist/glyphs.js +35 -0
  131. package/dist/glyphs.js.map +1 -0
  132. package/dist/goal-form.d.ts +47 -0
  133. package/dist/goal-form.d.ts.map +1 -0
  134. package/dist/goal-form.js +59 -0
  135. package/dist/goal-form.js.map +1 -0
  136. package/dist/hooks/use-animation.d.ts +6 -0
  137. package/dist/hooks/use-animation.d.ts.map +1 -0
  138. package/dist/hooks/use-animation.js +52 -0
  139. package/dist/hooks/use-animation.js.map +1 -0
  140. package/dist/hooks/use-app-colors.d.ts +6 -0
  141. package/dist/hooks/use-app-colors.d.ts.map +1 -0
  142. package/dist/hooks/use-app-colors.js +6 -0
  143. package/dist/hooks/use-app-colors.js.map +1 -0
  144. package/dist/hooks/use-glyph-set.d.ts +8 -0
  145. package/dist/hooks/use-glyph-set.d.ts.map +1 -0
  146. package/dist/hooks/use-glyph-set.js +22 -0
  147. package/dist/hooks/use-glyph-set.js.map +1 -0
  148. package/dist/hooks/use-motion.d.ts +6 -0
  149. package/dist/hooks/use-motion.d.ts.map +1 -0
  150. package/dist/hooks/use-motion.js +8 -0
  151. package/dist/hooks/use-motion.js.map +1 -0
  152. package/dist/hooks/use-terminal-focus.d.ts +16 -0
  153. package/dist/hooks/use-terminal-focus.d.ts.map +1 -0
  154. package/dist/hooks/use-terminal-focus.js +30 -0
  155. package/dist/hooks/use-terminal-focus.js.map +1 -0
  156. package/dist/hooks/use-theme.d.ts +6 -0
  157. package/dist/hooks/use-theme.d.ts.map +1 -0
  158. package/dist/hooks/use-theme.js +11 -0
  159. package/dist/hooks/use-theme.js.map +1 -0
  160. package/dist/hunk.d.ts +27 -0
  161. package/dist/hunk.d.ts.map +1 -0
  162. package/dist/hunk.js +43 -0
  163. package/dist/hunk.js.map +1 -0
  164. package/dist/image-view.d.ts +33 -0
  165. package/dist/image-view.d.ts.map +1 -0
  166. package/dist/image-view.js +51 -0
  167. package/dist/image-view.js.map +1 -0
  168. package/dist/keybindings.d.ts +28 -0
  169. package/dist/keybindings.d.ts.map +1 -0
  170. package/dist/keybindings.js +105 -0
  171. package/dist/keybindings.js.map +1 -0
  172. package/dist/lib/terminal-themes/default.d.ts +3 -0
  173. package/dist/lib/terminal-themes/default.d.ts.map +1 -0
  174. package/dist/lib/terminal-themes/default.js +49 -0
  175. package/dist/lib/terminal-themes/default.js.map +1 -0
  176. package/dist/logo-pulse.d.ts +23 -0
  177. package/dist/logo-pulse.d.ts.map +1 -0
  178. package/dist/logo-pulse.js +30 -0
  179. package/dist/logo-pulse.js.map +1 -0
  180. package/dist/markdown-style.d.ts +47 -0
  181. package/dist/markdown-style.d.ts.map +1 -0
  182. package/dist/markdown-style.js +138 -0
  183. package/dist/markdown-style.js.map +1 -0
  184. package/dist/mentions.d.ts +57 -0
  185. package/dist/mentions.d.ts.map +1 -0
  186. package/dist/mentions.js +109 -0
  187. package/dist/mentions.js.map +1 -0
  188. package/dist/palette-model.d.ts +42 -0
  189. package/dist/palette-model.d.ts.map +1 -0
  190. package/dist/palette-model.js +77 -0
  191. package/dist/palette-model.js.map +1 -0
  192. package/dist/path-suggestions.d.ts +50 -0
  193. package/dist/path-suggestions.d.ts.map +1 -0
  194. package/dist/path-suggestions.js +99 -0
  195. package/dist/path-suggestions.js.map +1 -0
  196. package/dist/picker-flows.d.ts +78 -0
  197. package/dist/picker-flows.d.ts.map +1 -0
  198. package/dist/picker-flows.js +444 -0
  199. package/dist/picker-flows.js.map +1 -0
  200. package/dist/pickers.d.ts +34 -0
  201. package/dist/pickers.d.ts.map +1 -0
  202. package/dist/pickers.js +136 -0
  203. package/dist/pickers.js.map +1 -0
  204. package/dist/prompt-history.d.ts +32 -0
  205. package/dist/prompt-history.d.ts.map +1 -0
  206. package/dist/prompt-history.js +40 -0
  207. package/dist/prompt-history.js.map +1 -0
  208. package/dist/providers/app-theme-provider.d.ts +12 -0
  209. package/dist/providers/app-theme-provider.d.ts.map +1 -0
  210. package/dist/providers/app-theme-provider.js +14 -0
  211. package/dist/providers/app-theme-provider.js.map +1 -0
  212. package/dist/providers/theme-provider.d.ts +10 -0
  213. package/dist/providers/theme-provider.d.ts.map +1 -0
  214. package/dist/providers/theme-provider.js +57 -0
  215. package/dist/providers/theme-provider.js.map +1 -0
  216. package/dist/question-model.d.ts +71 -0
  217. package/dist/question-model.d.ts.map +1 -0
  218. package/dist/question-model.js +176 -0
  219. package/dist/question-model.js.map +1 -0
  220. package/dist/search-controller.d.ts +46 -0
  221. package/dist/search-controller.d.ts.map +1 -0
  222. package/dist/search-controller.js +89 -0
  223. package/dist/search-controller.js.map +1 -0
  224. package/dist/search-jump.d.ts +27 -0
  225. package/dist/search-jump.d.ts.map +1 -0
  226. package/dist/search-jump.js +65 -0
  227. package/dist/search-jump.js.map +1 -0
  228. package/dist/session-controller.d.ts +268 -0
  229. package/dist/session-controller.d.ts.map +1 -0
  230. package/dist/session-controller.js +941 -0
  231. package/dist/session-controller.js.map +1 -0
  232. package/dist/sidebar-model.d.ts +45 -0
  233. package/dist/sidebar-model.d.ts.map +1 -0
  234. package/dist/sidebar-model.js +223 -0
  235. package/dist/sidebar-model.js.map +1 -0
  236. package/dist/sidebar.d.ts +49 -0
  237. package/dist/sidebar.d.ts.map +1 -0
  238. package/dist/sidebar.js +106 -0
  239. package/dist/sidebar.js.map +1 -0
  240. package/dist/status-line.d.ts +32 -0
  241. package/dist/status-line.d.ts.map +1 -0
  242. package/dist/status-line.js +69 -0
  243. package/dist/status-line.js.map +1 -0
  244. package/dist/syntax/filetype.d.ts +12 -0
  245. package/dist/syntax/filetype.d.ts.map +1 -0
  246. package/dist/syntax/filetype.js +28 -0
  247. package/dist/syntax/filetype.js.map +1 -0
  248. package/dist/syntax/grammars.d.ts +42 -0
  249. package/dist/syntax/grammars.d.ts.map +1 -0
  250. package/dist/syntax/grammars.js +52 -0
  251. package/dist/syntax/grammars.js.map +1 -0
  252. package/dist/text-offset.d.ts +5 -0
  253. package/dist/text-offset.d.ts.map +1 -0
  254. package/dist/text-offset.js +38 -0
  255. package/dist/text-offset.js.map +1 -0
  256. package/dist/text-wrap.d.ts +12 -0
  257. package/dist/text-wrap.d.ts.map +1 -0
  258. package/dist/text-wrap.js +53 -0
  259. package/dist/text-wrap.js.map +1 -0
  260. package/dist/theme-controller.d.ts +77 -0
  261. package/dist/theme-controller.d.ts.map +1 -0
  262. package/dist/theme-controller.js +178 -0
  263. package/dist/theme-controller.js.map +1 -0
  264. package/dist/theme.d.ts +51 -0
  265. package/dist/theme.d.ts.map +1 -0
  266. package/dist/theme.js +86 -0
  267. package/dist/theme.js.map +1 -0
  268. package/dist/tmux-check.d.ts +35 -0
  269. package/dist/tmux-check.d.ts.map +1 -0
  270. package/dist/tmux-check.js +66 -0
  271. package/dist/tmux-check.js.map +1 -0
  272. package/dist/tmux.d.ts +69 -0
  273. package/dist/tmux.d.ts.map +1 -0
  274. package/dist/tmux.js +135 -0
  275. package/dist/tmux.js.map +1 -0
  276. package/dist/tool-diff.d.ts +51 -0
  277. package/dist/tool-diff.d.ts.map +1 -0
  278. package/dist/tool-diff.js +158 -0
  279. package/dist/tool-diff.js.map +1 -0
  280. package/dist/tool-presentation.d.ts +46 -0
  281. package/dist/tool-presentation.d.ts.map +1 -0
  282. package/dist/tool-presentation.js +148 -0
  283. package/dist/tool-presentation.js.map +1 -0
  284. package/dist/tool-renderer-view.d.ts +14 -0
  285. package/dist/tool-renderer-view.d.ts.map +1 -0
  286. package/dist/tool-renderer-view.js +10 -0
  287. package/dist/tool-renderer-view.js.map +1 -0
  288. package/dist/transcript-search.d.ts +54 -0
  289. package/dist/transcript-search.d.ts.map +1 -0
  290. package/dist/transcript-search.js +160 -0
  291. package/dist/transcript-search.js.map +1 -0
  292. package/dist/transcript.d.ts +59 -0
  293. package/dist/transcript.d.ts.map +1 -0
  294. package/dist/transcript.js +123 -0
  295. package/dist/transcript.js.map +1 -0
  296. package/dist/workflow-tools.d.ts +42 -0
  297. package/dist/workflow-tools.d.ts.map +1 -0
  298. package/dist/workflow-tools.js +89 -0
  299. package/dist/workflow-tools.js.map +1 -0
  300. package/examples/themes/ember.json +75 -0
  301. package/grammars/bash/LICENSE +21 -0
  302. package/grammars/bash/highlights.scm +56 -0
  303. package/grammars/bash/tree-sitter-bash.wasm +0 -0
  304. package/grammars/css/LICENSE +21 -0
  305. package/grammars/css/highlights.scm +76 -0
  306. package/grammars/css/tree-sitter-css.wasm +0 -0
  307. package/grammars/go/LICENSE +21 -0
  308. package/grammars/go/highlights.scm +123 -0
  309. package/grammars/go/tree-sitter-go.wasm +0 -0
  310. package/grammars/html/LICENSE +21 -0
  311. package/grammars/html/highlights.scm +13 -0
  312. package/grammars/html/tree-sitter-html.wasm +0 -0
  313. package/grammars/json/LICENSE +21 -0
  314. package/grammars/json/highlights.scm +16 -0
  315. package/grammars/json/tree-sitter-json.wasm +0 -0
  316. package/grammars/python/LICENSE +21 -0
  317. package/grammars/python/highlights.scm +137 -0
  318. package/grammars/python/tree-sitter-python.wasm +0 -0
  319. package/grammars/rust/LICENSE +21 -0
  320. package/grammars/rust/highlights.scm +161 -0
  321. package/grammars/rust/tree-sitter-rust.wasm +0 -0
  322. package/grammars/yaml/LICENSE +20 -0
  323. package/grammars/yaml/highlights.scm +79 -0
  324. package/grammars/yaml/tree-sitter-yaml.wasm +0 -0
  325. package/package.json +56 -5
@@ -0,0 +1,11 @@
1
+ import * as React from "react";
2
+ import { defaultTheme } from "../lib/terminal-themes/default.js";
3
+ export const ThemeContext = React.createContext({
4
+ setTheme: () => {
5
+ // The default context keeps useTheme provider-optional.
6
+ },
7
+ theme: defaultTheme,
8
+ });
9
+ export const useTheme = () => React.useContext(ThemeContext).theme;
10
+ export const useThemeUpdater = () => React.useContext(ThemeContext).setTheme;
11
+ //# sourceMappingURL=use-theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-theme.js","sourceRoot":"","sources":["../../src/hooks/use-theme.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AAMjE,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,aAAa,CAAoB;IACjE,QAAQ,EAAE,GAAG,EAAE;QACb,wDAAwD;IAC1D,CAAC;IACD,KAAK,EAAE,YAAY;CACpB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,QAAQ,GAAG,GAAU,EAAE,CAAC,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,KAAK,CAAC;AAE1E,MAAM,CAAC,MAAM,eAAe,GAAG,GAA6B,EAAE,CAC5D,KAAK,CAAC,UAAU,CAAC,YAAY,CAAC,CAAC,QAAQ,CAAC","sourcesContent":["import * as React from \"react\";\n\nimport { defaultTheme } from \"../lib/terminal-themes/default.js\";\nimport type {\n Theme,\n ThemeContextValue,\n} from \"../components/ui/types.js\";\n\nexport const ThemeContext = React.createContext<ThemeContextValue>({\n setTheme: () => {\n // The default context keeps useTheme provider-optional.\n },\n theme: defaultTheme,\n});\n\nexport const useTheme = (): Theme => React.useContext(ThemeContext).theme;\n\nexport const useThemeUpdater = (): ((theme: Theme) => void) =>\n React.useContext(ThemeContext).setTheme;\n"]}
package/dist/hunk.d.ts ADDED
@@ -0,0 +1,27 @@
1
+ /** Result of a program that took over the terminal (see `SessionController.runInTerminal`). */
2
+ export type TerminalRunResult = {
3
+ /** Exit code; null when the program was killed by a signal or never started. */
4
+ code: number | null;
5
+ /** The end of what it wrote to stderr, for the error alert. */
6
+ stderr: string;
7
+ /** The executable was not found on PATH. */
8
+ missing: boolean;
9
+ };
10
+ export type TerminalRun = (command: string, args: readonly string[], cwd: string) => Promise<TerminalRunResult>;
11
+ export declare const HUNK_COMMAND = "hunk";
12
+ /** Short lines: alerts clip rather than wrap, and the welcome screen alert is narrow. */
13
+ export declare const HUNK_INSTALL_HINT = "Install: npm install -g hunkdiff\nor: brew install hunk (see hunk.dev)\nThen run /diff again.";
14
+ /**
15
+ * `hunk diff` scoped to the files this session changed, as workspace-relative
16
+ * pathspecs. Hunk compares the git working tree with HEAD, so uncommitted edits
17
+ * the user made to those files show too. With no recorded changes it shows the
18
+ * whole working tree.
19
+ */
20
+ export declare function hunkDiffArgs(changedFiles: readonly string[], cwd: string): string[];
21
+ /**
22
+ * Run a full-screen program on the real terminal: stdin and stdout are
23
+ * inherited, stderr is captured (it is replayed in an alert on failure,
24
+ * because the UI repaints over anything printed there).
25
+ */
26
+ export declare function spawnInTerminal(command: string, args: readonly string[], cwd: string): Promise<TerminalRunResult>;
27
+ //# sourceMappingURL=hunk.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hunk.d.ts","sourceRoot":"","sources":["../src/hunk.ts"],"names":[],"mappings":"AAGA,+FAA+F;AAC/F,MAAM,MAAM,iBAAiB,GAAG;IAC9B,gFAAgF;IAChF,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAEhH,eAAO,MAAM,YAAY,SAAS,CAAC;AACnC,yFAAyF;AACzF,eAAO,MAAM,iBAAiB,kGAAkG,CAAC;AAGjI;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,YAAY,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAGnF;AASD;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAajH"}
package/dist/hunk.js ADDED
@@ -0,0 +1,43 @@
1
+ import { spawn } from "node:child_process";
2
+ import path from "node:path";
3
+ export const HUNK_COMMAND = "hunk";
4
+ /** Short lines: alerts clip rather than wrap, and the welcome screen alert is narrow. */
5
+ export const HUNK_INSTALL_HINT = "Install: npm install -g hunkdiff\nor: brew install hunk (see hunk.dev)\nThen run /diff again.";
6
+ const STDERR_TAIL_CHARS = 2_000;
7
+ /**
8
+ * `hunk diff` scoped to the files this session changed, as workspace-relative
9
+ * pathspecs. Hunk compares the git working tree with HEAD, so uncommitted edits
10
+ * the user made to those files show too. With no recorded changes it shows the
11
+ * whole working tree.
12
+ */
13
+ export function hunkDiffArgs(changedFiles, cwd) {
14
+ const files = [...new Set(changedFiles.map((file) => workspacePath(file, cwd)).filter(Boolean))];
15
+ return files.length ? ["diff", "--", ...files] : ["diff"];
16
+ }
17
+ function workspacePath(file, cwd) {
18
+ if (!path.isAbsolute(file))
19
+ return file;
20
+ const relative = path.relative(cwd, file);
21
+ // Outside the workspace: keep the absolute path; git rejects it with a clear message.
22
+ return relative && !relative.startsWith("..") && !path.isAbsolute(relative) ? relative : file;
23
+ }
24
+ /**
25
+ * Run a full-screen program on the real terminal: stdin and stdout are
26
+ * inherited, stderr is captured (it is replayed in an alert on failure,
27
+ * because the UI repaints over anything printed there).
28
+ */
29
+ export function spawnInTerminal(command, args, cwd) {
30
+ return new Promise((resolve) => {
31
+ let stderr = "";
32
+ const child = spawn(command, [...args], { cwd, stdio: ["inherit", "inherit", "pipe"] });
33
+ child.stderr?.setEncoding("utf8");
34
+ child.stderr?.on("data", (chunk) => {
35
+ stderr = (stderr + chunk).slice(-STDERR_TAIL_CHARS);
36
+ });
37
+ child.once("error", (error) => {
38
+ resolve({ code: null, stderr: error.code === "ENOENT" ? "" : error.message, missing: error.code === "ENOENT" });
39
+ });
40
+ child.once("close", (code) => resolve({ code, stderr, missing: false }));
41
+ });
42
+ }
43
+ //# sourceMappingURL=hunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hunk.js","sourceRoot":"","sources":["../src/hunk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,IAAI,MAAM,WAAW,CAAC;AAc7B,MAAM,CAAC,MAAM,YAAY,GAAG,MAAM,CAAC;AACnC,yFAAyF;AACzF,MAAM,CAAC,MAAM,iBAAiB,GAAG,+FAA+F,CAAC;AACjI,MAAM,iBAAiB,GAAG,KAAK,CAAC;AAEhC;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAC,YAA+B,EAAE,GAAW;IACvE,MAAM,KAAK,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,aAAa,CAAC,IAAI,EAAE,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;IACjG,OAAO,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC;AAC5D,CAAC;AAED,SAAS,aAAa,CAAC,IAAY,EAAE,GAAW;IAC9C,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC;QAAE,OAAO,IAAI,CAAC;IACxC,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;IAC1C,sFAAsF;IACtF,OAAO,QAAQ,IAAI,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC;AAChG,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,OAAe,EAAE,IAAuB,EAAE,GAAW;IACnF,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QAC7B,IAAI,MAAM,GAAG,EAAE,CAAC;QAChB,MAAM,KAAK,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,GAAG,IAAI,CAAC,EAAE,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC;QACxF,KAAK,CAAC,MAAM,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;QAClC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,EAAE,CAAC,KAAa,EAAE,EAAE;YACzC,MAAM,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,iBAAiB,CAAC,CAAC;QACtD,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,KAA4B,EAAE,EAAE;YACnD,OAAO,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,EAAE,OAAO,EAAE,KAAK,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC,CAAC;QAClH,CAAC,CAAC,CAAC;QACH,KAAK,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IAC3E,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { spawn } from \"node:child_process\";\nimport path from \"node:path\";\n\n/** Result of a program that took over the terminal (see `SessionController.runInTerminal`). */\nexport type TerminalRunResult = {\n /** Exit code; null when the program was killed by a signal or never started. */\n code: number | null;\n /** The end of what it wrote to stderr, for the error alert. */\n stderr: string;\n /** The executable was not found on PATH. */\n missing: boolean;\n};\n\nexport type TerminalRun = (command: string, args: readonly string[], cwd: string) => Promise<TerminalRunResult>;\n\nexport const HUNK_COMMAND = \"hunk\";\n/** Short lines: alerts clip rather than wrap, and the welcome screen alert is narrow. */\nexport const HUNK_INSTALL_HINT = \"Install: npm install -g hunkdiff\\nor: brew install hunk (see hunk.dev)\\nThen run /diff again.\";\nconst STDERR_TAIL_CHARS = 2_000;\n\n/**\n * `hunk diff` scoped to the files this session changed, as workspace-relative\n * pathspecs. Hunk compares the git working tree with HEAD, so uncommitted edits\n * the user made to those files show too. With no recorded changes it shows the\n * whole working tree.\n */\nexport function hunkDiffArgs(changedFiles: readonly string[], cwd: string): string[] {\n const files = [...new Set(changedFiles.map((file) => workspacePath(file, cwd)).filter(Boolean))];\n return files.length ? [\"diff\", \"--\", ...files] : [\"diff\"];\n}\n\nfunction workspacePath(file: string, cwd: string): string {\n if (!path.isAbsolute(file)) return file;\n const relative = path.relative(cwd, file);\n // Outside the workspace: keep the absolute path; git rejects it with a clear message.\n return relative && !relative.startsWith(\"..\") && !path.isAbsolute(relative) ? relative : file;\n}\n\n/**\n * Run a full-screen program on the real terminal: stdin and stdout are\n * inherited, stderr is captured (it is replayed in an alert on failure,\n * because the UI repaints over anything printed there).\n */\nexport function spawnInTerminal(command: string, args: readonly string[], cwd: string): Promise<TerminalRunResult> {\n return new Promise((resolve) => {\n let stderr = \"\";\n const child = spawn(command, [...args], { cwd, stdio: [\"inherit\", \"inherit\", \"pipe\"] });\n child.stderr?.setEncoding(\"utf8\");\n child.stderr?.on(\"data\", (chunk: string) => {\n stderr = (stderr + chunk).slice(-STDERR_TAIL_CHARS);\n });\n child.once(\"error\", (error: NodeJS.ErrnoException) => {\n resolve({ code: null, stderr: error.code === \"ENOENT\" ? \"\" : error.message, missing: error.code === \"ENOENT\" });\n });\n child.once(\"close\", (code) => resolve({ code, stderr, missing: false }));\n });\n}\n"]}
@@ -0,0 +1,33 @@
1
+ import type { ImageRenderProtocol } from "@opentui/core";
2
+ /**
3
+ * How transcript images draw. The pixel protocols are OpenTUI's (`<image>`):
4
+ * `auto` follows the terminal probe (kitty graphics, sixel, else half-block
5
+ * cells; always blocks under tmux), and `none` draws no pixels, only the caption.
6
+ */
7
+ export type ImageMode = ImageRenderProtocol | "none";
8
+ /** Environment override, shared with the legacy UI. */
9
+ export declare const IMAGE_PROTOCOL_ENV = "CREWCODER_TUI_IMAGE_PROTOCOL";
10
+ /**
11
+ * The image mode for this process. Unknown values (including legacy's `iterm`,
12
+ * which OpenTUI does not speak) fall back to `auto`; iTerm2 then gets sixel when
13
+ * it reports it. Remote sessions draw no pixels: a tool image path names a file
14
+ * on the SSH host, and reading the same path here could show a different file.
15
+ */
16
+ export declare function resolveImageMode(env: NodeJS.ProcessEnv, remote: boolean): ImageMode;
17
+ export type ImageBox = {
18
+ cols: number;
19
+ rows: number;
20
+ };
21
+ /** Same caps as legacy: at most 80 columns, and 35% of the screen between 4 and 18 rows. */
22
+ export declare const MAX_IMAGE_COLS = 80;
23
+ export declare const MIN_IMAGE_ROWS = 4;
24
+ export declare const MAX_IMAGE_ROWS = 18;
25
+ /**
26
+ * The cell box an image gets in the transcript: the largest box inside the
27
+ * caps that keeps the image's shape, assuming cells twice as tall as wide.
28
+ * OpenTUI fits the pixels inside with the terminal's real cell shape, so a
29
+ * different cell ratio only adds a small margin. Unknown dimensions take the
30
+ * whole cap.
31
+ */
32
+ export declare function imageBox(pixelWidth: number | undefined, pixelHeight: number | undefined, availableCols: number, screenRows: number): ImageBox;
33
+ //# sourceMappingURL=image-view.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-view.d.ts","sourceRoot":"","sources":["../src/image-view.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAEzD;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,mBAAmB,GAAG,MAAM,CAAC;AAErD,uDAAuD;AACvD,eAAO,MAAM,kBAAkB,iCAAiC,CAAC;AAWjE;;;;;GAKG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,GAAG,SAAS,CAGnF;AAED,MAAM,MAAM,QAAQ,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC;AAEtD,4FAA4F;AAC5F,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,cAAc,IAAI,CAAC;AAChC,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,SAAS,EAAE,WAAW,EAAE,MAAM,GAAG,SAAS,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,QAAQ,CAa7I"}
@@ -0,0 +1,51 @@
1
+ /** Environment override, shared with the legacy UI. */
2
+ export const IMAGE_PROTOCOL_ENV = "CREWCODER_TUI_IMAGE_PROTOCOL";
3
+ const MODES = {
4
+ auto: "auto",
5
+ kitty: "kitty",
6
+ sixel: "sixel",
7
+ blocks: "blocks",
8
+ none: "none",
9
+ off: "none"
10
+ };
11
+ /**
12
+ * The image mode for this process. Unknown values (including legacy's `iterm`,
13
+ * which OpenTUI does not speak) fall back to `auto`; iTerm2 then gets sixel when
14
+ * it reports it. Remote sessions draw no pixels: a tool image path names a file
15
+ * on the SSH host, and reading the same path here could show a different file.
16
+ */
17
+ export function resolveImageMode(env, remote) {
18
+ if (remote)
19
+ return "none";
20
+ return MODES[(env[IMAGE_PROTOCOL_ENV] ?? "").trim().toLowerCase()] ?? "auto";
21
+ }
22
+ /** Same caps as legacy: at most 80 columns, and 35% of the screen between 4 and 18 rows. */
23
+ export const MAX_IMAGE_COLS = 80;
24
+ export const MIN_IMAGE_ROWS = 4;
25
+ export const MAX_IMAGE_ROWS = 18;
26
+ /**
27
+ * The cell box an image gets in the transcript: the largest box inside the
28
+ * caps that keeps the image's shape, assuming cells twice as tall as wide.
29
+ * OpenTUI fits the pixels inside with the terminal's real cell shape, so a
30
+ * different cell ratio only adds a small margin. Unknown dimensions take the
31
+ * whole cap.
32
+ */
33
+ export function imageBox(pixelWidth, pixelHeight, availableCols, screenRows) {
34
+ const maxCols = Math.max(1, Math.min(MAX_IMAGE_COLS, availableCols));
35
+ const maxRows = Math.max(1, Math.min(MAX_IMAGE_ROWS, Math.max(MIN_IMAGE_ROWS, Math.floor(screenRows * 0.35))));
36
+ if (!pixelWidth || !pixelHeight)
37
+ return { cols: maxCols, rows: maxRows };
38
+ // Columns per row that keep the shape: width/height in pixels, times 2 for the cell shape.
39
+ const ratio = (pixelWidth / pixelHeight) * 2;
40
+ let cols = maxCols;
41
+ let rows = Math.round(cols / ratio);
42
+ if (rows > maxRows) {
43
+ rows = maxRows;
44
+ cols = Math.round(rows * ratio);
45
+ }
46
+ return { cols: clamp(cols, maxCols), rows: clamp(rows, maxRows) };
47
+ }
48
+ function clamp(value, max) {
49
+ return Math.max(1, Math.min(max, value));
50
+ }
51
+ //# sourceMappingURL=image-view.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"image-view.js","sourceRoot":"","sources":["../src/image-view.ts"],"names":[],"mappings":"AASA,uDAAuD;AACvD,MAAM,CAAC,MAAM,kBAAkB,GAAG,8BAA8B,CAAC;AAEjE,MAAM,KAAK,GAAwC;IACjD,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,GAAG,EAAE,MAAM;CACZ,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,gBAAgB,CAAC,GAAsB,EAAE,MAAe;IACtE,IAAI,MAAM;QAAE,OAAO,MAAM,CAAC;IAC1B,OAAO,KAAK,CAAC,C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AO,CAAC,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,EAAE,CAAC;AACpE,CAAC;AAED,SAAS,KAAK,CAAC,KAAa,EAAE,GAAW;IACvC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,CAAC,CAAC;AAC3C,CAAC","sourcesContent":["import type { ImageRenderProtocol } from \"@opentui/core\";\n\n/**\n * How transcript images draw. The pixel protocols are OpenTUI's (`<image>`):\n * `auto` follows the terminal probe (kitty graphics, sixel, else half-block\n * cells; always blocks under tmux), and `none` draws no pixels, only the caption.\n */\nexport type ImageMode = ImageRenderProtocol | \"none\";\n\n/** Environment override, shared with the legacy UI. */\nexport const IMAGE_PROTOCOL_ENV = \"CREWCODER_TUI_IMAGE_PROTOCOL\";\n\nconst MODES: Readonly<Record<string, ImageMode>> = {\n auto: \"auto\",\n kitty: \"kitty\",\n sixel: \"sixel\",\n blocks: \"blocks\",\n none: \"none\",\n off: \"none\"\n};\n\n/**\n * The image mode for this process. Unknown values (including legacy's `iterm`,\n * which OpenTUI does not speak) fall back to `auto`; iTerm2 then gets sixel when\n * it reports it. Remote sessions draw no pixels: a tool image path names a file\n * on the SSH host, and reading the same path here could show a different file.\n */\nexport function resolveImageMode(env: NodeJS.ProcessEnv, remote: boolean): ImageMode {\n if (remote) return \"none\";\n return MODES[(env[IMAGE_PROTOCOL_ENV] ?? \"\").trim().toLowerCase()] ?? \"auto\";\n}\n\nexport type ImageBox = { cols: number; rows: number };\n\n/** Same caps as legacy: at most 80 columns, and 35% of the screen between 4 and 18 rows. */\nexport const MAX_IMAGE_COLS = 80;\nexport const MIN_IMAGE_ROWS = 4;\nexport const MAX_IMAGE_ROWS = 18;\n\n/**\n * The cell box an image gets in the transcript: the largest box inside the\n * caps that keeps the image's shape, assuming cells twice as tall as wide.\n * OpenTUI fits the pixels inside with the terminal's real cell shape, so a\n * different cell ratio only adds a small margin. Unknown dimensions take the\n * whole cap.\n */\nexport function imageBox(pixelWidth: number | undefined, pixelHeight: number | undefined, availableCols: number, screenRows: number): ImageBox {\n const maxCols = Math.max(1, Math.min(MAX_IMAGE_COLS, availableCols));\n const maxRows = Math.max(1, Math.min(MAX_IMAGE_ROWS, Math.max(MIN_IMAGE_ROWS, Math.floor(screenRows * 0.35))));\n if (!pixelWidth || !pixelHeight) return { cols: maxCols, rows: maxRows };\n // Columns per row that keep the shape: width/height in pixels, times 2 for the cell shape.\n const ratio = (pixelWidth / pixelHeight) * 2;\n let cols = maxCols;\n let rows = Math.round(cols / ratio);\n if (rows > maxRows) {\n rows = maxRows;\n cols = Math.round(rows * ratio);\n }\n return { cols: clamp(cols, maxCols), rows: clamp(rows, maxRows) };\n}\n\nfunction clamp(value: number, max: number): number {\n return Math.max(1, Math.min(max, value));\n}\n"]}
@@ -0,0 +1,28 @@
1
+ export type AppAction = "abort" | "quit" | "approve" | "deny" | "paletteClose" | "paletteUp" | "paletteDown" | "paletteSelect" | "paletteBackspace" | "sessionBranch" | "composerSubmit" | "composerNewline" | "composerHistoryPrev" | "composerHistoryNext" | "mentionUp" | "mentionDown" | "mentionSelect" | "mentionClose" | "pasteClipboard" | "clearAttachments" | "togglePalette" | "openModes" | "toggleSidebar" | "summaryApply" | "summaryReset" | "summaryCancel" | "questionPrev" | "questionNext" | "questionSubmit" | "questionCancel" | "questionYes" | "questionNo" | "questionScrollUp" | "questionScrollDown" | "transcriptPageUp" | "transcriptPageDown" | "transcriptTop" | "transcriptBottom" | "toggleToolOutput" | "toggleDiffs" | "searchOpen" | "searchOlder" | "searchNewer" | "searchClose" | "goalFormNext" | "goalFormPrev" | "goalFormEnter" | "goalFormSubmit" | "goalFormCancel";
2
+ export type KeyLike = {
3
+ name: string;
4
+ ctrl: boolean;
5
+ meta: boolean;
6
+ shift: boolean;
7
+ /** OpenTUI KeyEvent: stops the focused renderable (the composer) from also handling the key. */
8
+ preventDefault?: () => void;
9
+ };
10
+ /**
11
+ * Default key chords per action. Keep key checks routed through this table so
12
+ * bindings stay configurable instead of being hardcoded at call sites.
13
+ */
14
+ export declare const DEFAULT_APP_KEYBINDINGS: Readonly<Record<AppAction, readonly string[]>>;
15
+ /** An OpenTUI textarea key binding (`@opentui/core` `KeyBinding`). */
16
+ export type TextareaBinding<Action extends string> = {
17
+ name: string;
18
+ ctrl?: boolean;
19
+ meta?: boolean;
20
+ shift?: boolean;
21
+ action: Action;
22
+ };
23
+ /** Textarea bindings for app actions, so composer keys stay configurable. */
24
+ export declare function textareaBindings<Action extends string>(actions: Readonly<Partial<Record<AppAction, Action>>>, bindings?: Readonly<Record<AppAction, readonly string[]>>): TextareaBinding<Action>[];
25
+ export declare function matchesAction(key: KeyLike, action: AppAction, bindings?: Readonly<Record<AppAction, readonly string[]>>): boolean;
26
+ /** Short human label for the first chord of an action, e.g. `^Y`. */
27
+ export declare function actionLabel(action: AppAction, bindings?: Readonly<Record<AppAction, readonly string[]>>): string;
28
+ //# sourceMappingURL=keybindings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keybindings.d.ts","sourceRoot":"","sources":["../src/keybindings.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GACjB,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GACrC,cAAc,GAAG,WAAW,GAAG,aAAa,GAAG,eAAe,GAAG,kBAAkB,GAAG,eAAe,GACrG,gBAAgB,GAAG,iBAAiB,GAAG,qBAAqB,GAAG,qBAAqB,GACpF,WAAW,GAAG,aAAa,GAAG,eAAe,GAAG,cAAc,GAC9D,gBAAgB,GAAG,kBAAkB,GAAG,eAAe,GAAG,WAAW,GAAG,eAAe,GACvF,cAAc,GAAG,cAAc,GAAG,eAAe,GACjD,cAAc,GAAG,cAAc,GAAG,gBAAgB,GAAG,gBAAgB,GACrE,aAAa,GAAG,YAAY,GAAG,kBAAkB,GAAG,oBAAoB,GACxE,kBAAkB,GAAG,oBAAoB,GAAG,eAAe,G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,WAAW,CACzB,MAAM,EAAE,SAAS,EACjB,QAAQ,GAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,CAAC,CAA2B,GACjF,MAAM,CAMR"}
@@ -0,0 +1,105 @@
1
+ /**
2
+ * Default key chords per action. Keep key checks routed through this table so
3
+ * bindings stay configurable instead of being hardcoded at call sites.
4
+ */
5
+ export const DEFAULT_APP_KEYBINDINGS = {
6
+ abort: ["escape"],
7
+ quit: ["ctrl+c"],
8
+ approve: ["ctrl+y"],
9
+ deny: ["ctrl+n"],
10
+ paletteClose: ["escape"],
11
+ paletteUp: ["up"],
12
+ paletteDown: ["down"],
13
+ paletteSelect: ["return"],
14
+ paletteBackspace: ["backspace", "delete"],
15
+ // In /sessions: branch the highlighted session instead of resuming it. Not a
16
+ // letter (typed letters search) and not Ctrl+B (the sidebar).
17
+ sessionBranch: ["tab"],
18
+ // Shift+Enter needs the kitty keyboard protocol (on by default). Ctrl+J works
19
+ // everywhere: kitty reports it as ctrl+j, legacy terminals as "linefeed".
20
+ composerSubmit: ["return", "kpenter"],
21
+ composerNewline: ["shift+return", "ctrl+j", "linefeed", "meta+return"],
22
+ // Move between wrapped lines; on the first/last line, recall sent messages.
23
+ composerHistoryPrev: ["up"],
24
+ composerHistoryNext: ["down"],
25
+ // `@` path suggestions under the composer, while the list is open.
26
+ mentionUp: ["up"],
27
+ mentionDown: ["down"],
28
+ mentionSelect: ["return", "tab"],
29
+ mentionClose: ["escape"],
30
+ // Composer shortcuts (legacy). Ctrl+V attaches a clipboard image, else pastes
31
+ // clipboard text; terminal paste (Ctrl+Shift+V) still pastes text directly.
32
+ pasteClipboard: ["ctrl+v", "meta+v"],
33
+ clearAttachments: ["ctrl+x"],
34
+ togglePalette: ["ctrl+p"],
35
+ // Legacy terminals send Tab and Ctrl+I as the same byte; kitty tells them apart.
36
+ openModes: ["tab", "ctrl+i"],
37
+ // The right sidebar (legacy Ctrl+B); /sidebar does the same.
38
+ toggleSidebar: ["ctrl+b"],
39
+ summaryApply: ["ctrl+s"],
40
+ summaryReset: ["ctrl+r"],
41
+ summaryCancel: ["escape"],
42
+ // Extension questions. Left/right only move between choices for confirm,
43
+ // select, and component questions; a text question leaves them to its field.
44
+ questionPrev: ["up", "left"],
45
+ questionNext: ["down", "right"],
46
+ questionSubmit: ["return", "kpenter"],
47
+ questionCancel: ["escape"],
48
+ // Bare y/n answer only a Yes/No question, which has no text field to type into.
49
+ questionYes: ["y"],
50
+ questionNo: ["n"],
51
+ questionScrollUp: ["pageup"],
52
+ questionScrollDown: ["pagedown"],
53
+ // The transcript scrollbox; the mouse wheel scrolls it too.
54
+ transcriptPageUp: ["pageup"],
55
+ transcriptPageDown: ["pagedown"],
56
+ transcriptTop: ["ctrl+home"],
57
+ transcriptBottom: ["ctrl+end"],
58
+ // Expand or collapse every tool's output at once.
59
+ toggleToolOutput: ["ctrl+o"],
60
+ // Hide or show every edit's inline diff at once.
61
+ toggleDiffs: ["ctrl+t"],
62
+ // Transcript search (terminal search cannot see the alternate screen). It starts at
63
+ // the newest match, so Enter keeps going up; Esc closes it and never aborts.
64
+ searchOpen: ["ctrl+f"],
65
+ searchOlder: ["return", "kpenter", "up"],
66
+ searchNewer: ["shift+return", "down"],
67
+ searchClose: ["escape"],
68
+ // The bare /goal form (legacy keys): fields with Tab/Up/Down, Enter for the next field
69
+ // or start on the last, Ctrl+S to start from anywhere, Esc to cancel.
70
+ goalFormNext: ["tab", "down"],
71
+ goalFormPrev: ["shift+tab", "up"],
72
+ goalFormEnter: ["return", "kpenter"],
73
+ goalFormSubmit: ["ctrl+s"],
74
+ goalFormCancel: ["escape"]
75
+ };
76
+ /** Textarea bindings for app actions, so composer keys stay configurable. */
77
+ export function textareaBindings(actions, bindings = DEFAULT_APP_KEYBINDINGS) {
78
+ return Object.entries(actions).flatMap(([appAction, action]) => bindings[appAction].map((chord) => {
79
+ const parts = chord.toLowerCase().split("+");
80
+ const name = parts.pop() ?? "";
81
+ return { name, ctrl: parts.includes("ctrl"), meta: parts.includes("meta"), shift: parts.includes("shift"), action };
82
+ }));
83
+ }
84
+ export function matchesAction(key, action, bindings = DEFAULT_APP_KEYBINDINGS) {
85
+ return bindings[action].some((chord) => matchesChord(key, chord));
86
+ }
87
+ /** Short human label for the first chord of an action, e.g. `^Y`. */
88
+ export function actionLabel(action, bindings = DEFAULT_APP_KEYBINDINGS) {
89
+ const parts = (bindings[action][0] ?? "").split("+");
90
+ const key = parts.pop() ?? "";
91
+ const prefix = parts.map((modifier) => MODIFIER_LABELS[modifier] ?? `${modifier}+`).join("");
92
+ const name = Object.hasOwn(KEY_LABELS, key) ? KEY_LABELS[key] : key.length === 1 ? key.toUpperCase() : key;
93
+ return `${prefix}${name}`;
94
+ }
95
+ const MODIFIER_LABELS = { ctrl: "^", meta: "M-", shift: "S-" };
96
+ const KEY_LABELS = { return: "Enter", escape: "Esc", pageup: "PgUp", pagedown: "PgDn", tab: "Tab" };
97
+ function matchesChord(key, chord) {
98
+ const parts = chord.toLowerCase().split("+");
99
+ const name = parts.pop();
100
+ return name === key.name.toLowerCase()
101
+ && parts.includes("ctrl") === key.ctrl
102
+ && parts.includes("meta") === key.meta
103
+ && parts.includes("shift") === key.shift;
104
+ }
105
+ //# sourceMappingURL=keybindings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"keybindings.js","sourceRoot":"","sources":["../src/keybindings.ts"],"names":[],"mappings":"AAsBA;;;GAGG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAmD;IACrF,KAAK,EAAE,CAAC,QAAQ,CAAC;IACjB,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,OAAO,EAAE,CAAC,QAAQ,CAAC;IACnB,IAAI,EAAE,CAAC,QAAQ,CAAC;IAChB,YAAY,EAAE,CAAC,QAAQ,CAAC;IACxB,SAAS,EAAE,CAAC,IAAI,CAAC;IACjB,WAAW,EAAE,CAAC,MAAM,CAAC;IACrB,aAAa,EAAE,CAAC,QAAQ,CAAC;IACzB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C;AAED,MAAM,eAAe,GAAqC,EAAE,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC;AACjG,MAAM,UAAU,GAAqC,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,EAAE,CAAC;AAEtI,SAAS,YAAY,CAAC,GAAY,EAAE,KAAa;IAC/C,MAAM,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IAC7C,MAAM,IAAI,GAAG,KAAK,CAAC,GAAG,EAAE,CAAC;IACzB,OAAO,IAAI,KAAK,GAAG,CAAC,IAAI,CAAC,WAAW,EAAE;WACjC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,IAAI;WACnC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,GAAG,CAAC,IAAI;WACnC,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,KAAK,CAAC;AAC7C,CAAC","sourcesContent":["export type AppAction =\n | \"abort\" | \"quit\" | \"approve\" | \"deny\"\n | \"paletteClose\" | \"paletteUp\" | \"paletteDown\" | \"paletteSelect\" | \"paletteBackspace\" | \"sessionBranch\"\n | \"composerSubmit\" | \"composerNewline\" | \"composerHistoryPrev\" | \"composerHistoryNext\"\n | \"mentionUp\" | \"mentionDown\" | \"mentionSelect\" | \"mentionClose\"\n | \"pasteClipboard\" | \"clearAttachments\" | \"togglePalette\" | \"openModes\" | \"toggleSidebar\"\n | \"summaryApply\" | \"summaryReset\" | \"summaryCancel\"\n | \"questionPrev\" | \"questionNext\" | \"questionSubmit\" | \"questionCancel\"\n | \"questionYes\" | \"questionNo\" | \"questionScrollUp\" | \"questionScrollDown\"\n | \"transcriptPageUp\" | \"transcriptPageDown\" | \"transcriptTop\" | \"transcriptBottom\" | \"toggleToolOutput\" | \"toggleDiffs\"\n | \"searchOpen\" | \"searchOlder\" | \"searchNewer\" | \"searchClose\"\n | \"goalFormNext\" | \"goalFormPrev\" | \"goalFormEnter\" | \"goalFormSubmit\" | \"goalFormCancel\";\n\nexport type KeyLike = {\n name: string;\n ctrl: boolean;\n meta: boolean;\n shift: boolean;\n /** OpenTUI KeyEvent: stops the focused renderable (the composer) from also handling the key. */\n preventDefault?: () => void;\n};\n\n/**\n * Default key chords per action. Keep key checks routed through this table so\n * bindings stay configurable instead of being hardcoded at call sites.\n */\nexport const DEFAULT_APP_KEYBINDINGS: Readonly<Record<AppAction, readonly string[]>> = {\n abort: [\"escape\"],\n quit: [\"ctrl+c\"],\n approve: [\"ctrl+y\"],\n deny: [\"ctrl+n\"],\n paletteClose: [\"escape\"],\n paletteUp: [\"up\"],\n paletteDown: [\"down\"],\n paletteSelect: [\"return\"],\n paletteBackspace: [\"backspace\", \"delete\"],\n // In /sessions: branch the highlighted session instead of resuming it. Not a\n // letter (typed letters search) and not Ctrl+B (the sidebar).\n sessionBranch: [\"tab\"],\n // Shift+Enter needs the kitty keyboard protocol (on by default). Ctrl+J works\n // everywhere: kitty reports it as ctrl+j, legacy terminals as \"linefeed\".\n composerSubmit: [\"return\", \"kpenter\"],\n composerNewline: [\"shift+return\", \"ctrl+j\", \"linefeed\", \"meta+return\"],\n // Move between wrapped lines; on the first/last line, recall sent messages.\n composerHistoryPrev: [\"up\"],\n composerHistoryNext: [\"down\"],\n // `@` path suggestions under the composer, while the list is open.\n mentionUp: [\"up\"],\n mentionDown: [\"down\"],\n mentionSelect: [\"return\", \"tab\"],\n mentionClose: [\"escape\"],\n // Composer shortcuts (legacy). Ctrl+V attaches a clipboard image, else pastes\n // clipboard text; terminal paste (Ctrl+Shift+V) still pastes text directly.\n pasteClipboard: [\"ctrl+v\", \"meta+v\"],\n clearAttachments: [\"ctrl+x\"],\n togglePalette: [\"ctrl+p\"],\n // Legacy terminals send Tab and Ctrl+I as the same byte; kitty tells them apart.\n openModes: [\"tab\", \"ctrl+i\"],\n // The right sidebar (legacy Ctrl+B); /sidebar does the same.\n toggleSidebar: [\"ctrl+b\"],\n summaryApply: [\"ctrl+s\"],\n summaryReset: [\"ctrl+r\"],\n summaryCancel: [\"escape\"],\n // Extension questions. Left/right only move between choices for confirm,\n // select, and component questions; a text question leaves them to its field.\n questionPrev: [\"up\", \"left\"],\n questionNext: [\"down\", \"right\"],\n questionSubmit: [\"return\", \"kpenter\"],\n questionCancel: [\"escape\"],\n // Bare y/n answer only a Yes/No question, which has no text field to type into.\n questionYes: [\"y\"],\n questionNo: [\"n\"],\n questionScrollUp: [\"pageup\"],\n questionScrollDown: [\"pagedown\"],\n // The transcript scrollbox; the mouse wheel scrolls it too.\n transcriptPageUp: [\"pageup\"],\n transcriptPageDown: [\"pagedown\"],\n transcriptTop: [\"ctrl+home\"],\n transcriptBottom: [\"ctrl+end\"],\n // Expand or collapse every tool's output at once.\n toggleToolOutput: [\"ctrl+o\"],\n // Hide or show every edit's inline diff at once.\n toggleDiffs: [\"ctrl+t\"],\n // Transcript search (terminal search cannot see the alternate screen). It starts at\n // the newest match, so Enter keeps going up; Esc closes it and never aborts.\n searchOpen: [\"ctrl+f\"],\n searchOlder: [\"return\", \"kpenter\", \"up\"],\n searchNewer: [\"shift+return\", \"down\"],\n searchClose: [\"escape\"],\n // The bare /goal form (legacy keys): fields with Tab/Up/Down, Enter for the next field\n // or start on the last, Ctrl+S to start from anywhere, Esc to cancel.\n goalFormNext: [\"tab\", \"down\"],\n goalFormPrev: [\"shift+tab\", \"up\"],\n goalFormEnter: [\"return\", \"kpenter\"],\n goalFormSubmit: [\"ctrl+s\"],\n goalFormCancel: [\"escape\"]\n};\n\n/** An OpenTUI textarea key binding (`@opentui/core` `KeyBinding`). */\nexport type TextareaBinding<Action extends string> = { name: string; ctrl?: boolean; meta?: boolean; shift?: boolean; action: Action };\n\n/** Textarea bindings for app actions, so composer keys stay configurable. */\nexport function textareaBindings<Action extends string>(\n actions: Readonly<Partial<Record<AppAction, Action>>>,\n bindings: Readonly<Record<AppAction, readonly string[]>> = DEFAULT_APP_KEYBINDINGS\n): TextareaBinding<Action>[] {\n return (Object.entries(actions) as Array<[AppAction, Action]>).flatMap(([appAction, action]) =>\n bindings[appAction].map((chord) => {\n const parts = chord.toLowerCase().split(\"+\");\n const name = parts.pop() ?? \"\";\n return { name, ctrl: parts.includes(\"ctrl\"), meta: parts.includes(\"meta\"), shift: parts.includes(\"shift\"), action };\n }));\n}\n\nexport function matchesAction(\n key: KeyLike,\n action: AppAction,\n bindings: Readonly<Record<AppAction, readonly string[]>> = DEFAULT_APP_KEYBINDINGS\n): boolean {\n return bindings[action].some((chord) => matchesChord(key, chord));\n}\n\n/** Short human label for the first chord of an action, e.g. `^Y`. */\nexport function actionLabel(\n action: AppAction,\n bindings: Readonly<Record<AppAction, readonly string[]>> = DEFAULT_APP_KEYBINDINGS\n): string {\n const parts = (bindings[action][0] ?? \"\").split(\"+\");\n const key = parts.pop() ?? \"\";\n const prefix = parts.map((modifier) => MODIFIER_LABELS[modifier] ?? `${modifier}+`).join(\"\");\n const name = Object.hasOwn(KEY_LABELS, key) ? KEY_LABELS[key] : key.length === 1 ? key.toUpperCase() : key;\n return `${prefix}${name}`;\n}\n\nconst MODIFIER_LABELS: Readonly<Record<string, string>> = { ctrl: \"^\", meta: \"M-\", shift: \"S-\" };\nconst KEY_LABELS: Readonly<Record<string, string>> = { return: \"Enter\", escape: \"Esc\", pageup: \"PgUp\", pagedown: \"PgDn\", tab: \"Tab\" };\n\nfunction matchesChord(key: KeyLike, chord: string): boolean {\n const parts = chord.toLowerCase().split(\"+\");\n const name = parts.pop();\n return name === key.name.toLowerCase()\n && parts.includes(\"ctrl\") === key.ctrl\n && parts.includes(\"meta\") === key.meta\n && parts.includes(\"shift\") === key.shift;\n}\n"]}
@@ -0,0 +1,3 @@
1
+ import type { Theme } from "../../components/ui/types.js";
2
+ export declare const defaultTheme: Theme;
3
+ //# sourceMappingURL=default.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/lib/terminal-themes/default.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,8BAA8B,CAAC;AAE1D,eAAO,MAAM,YAAY,EAAE,KAkD1B,CAAC"}
@@ -0,0 +1,49 @@
1
+ export const defaultTheme = {
2
+ border: {
3
+ color: "#4B5563",
4
+ focusColor: "#8B5CF6",
5
+ style: "rounded",
6
+ },
7
+ colors: {
8
+ accent: "#8B5CF6",
9
+ accentForeground: "#FFFFFF",
10
+ background: "#000000",
11
+ border: "#4B5563",
12
+ error: "#EF4444",
13
+ errorForeground: "#FFFFFF",
14
+ focusRing: "#8B5CF6",
15
+ foreground: "#FFFFFF",
16
+ info: "#3B82F6",
17
+ infoForeground: "#FFFFFF",
18
+ muted: "#374151",
19
+ mutedForeground: "#9CA3AF",
20
+ primary: "#7C3AED",
21
+ primaryForeground: "#FFFFFF",
22
+ secondary: "#6B7280",
23
+ secondaryForeground: "#FFFFFF",
24
+ selection: "#7C3AED",
25
+ selectionForeground: "#FFFFFF",
26
+ success: "#10B981",
27
+ successForeground: "#FFFFFF",
28
+ warning: "#F59E0B",
29
+ warningForeground: "#000000",
30
+ },
31
+ name: "default",
32
+ spacing: {
33
+ 0: 0,
34
+ 1: 1,
35
+ 2: 2,
36
+ 3: 3,
37
+ 4: 4,
38
+ 6: 6,
39
+ 8: 8,
40
+ },
41
+ typography: {
42
+ base: "",
43
+ bold: true,
44
+ lg: "bold",
45
+ sm: "dim",
46
+ xl: "bold",
47
+ },
48
+ };
49
+ //# sourceMappingURL=default.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/lib/terminal-themes/default.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,YAAY,GAAU;IACjC,MAAM,EAAE;QACN,KAAK,EAAE,SAAS;QAChB,UAAU,EAAE,SAAS;QACrB,KAAK,EAAE,SAAS;KACjB;IACD,MAAM,EAAE;QACN,MAAM,EAAE,SAAS;QACjB,gBAAgB,EAAE,SAAS;QAC3B,UAAU,EAAE,SAAS;QACrB,MAAM,EAAE,SAAS;QACjB,KAAK,EAAE,SAAS;QAChB,eAAe,EAAE,SAAS;QAE1B,SAAS,EAAE,SAAS;QACpB,UAAU,EAAE,SAAS;QACrB,IAAI,EAAE,SAAS;QACf,cAAc,EAAE,SAAS;QACzB,KAAK,EAAE,SAAS;QAChB,eAAe,EAAE,SAAS;QAC1B,OAAO,EAAE,SAAS;QAClB,iBAAiB,EAAE,SAAS;QAE5B,SAAS,EAAE,SAAS;QACpB,mBAAmB,EAAE,SAAS;QAC9B,SAAS,EAAE,SAAS;QACpB,mBAAmB,EAAE,SAAS;QAC9B,OAAO,EAAE,SAAS;QAElB,iBAAiB,EAAE,SAAS;QAC5B,OAAO,EAAE,SAAS;QAClB,iBAAiB,EAAE,SAAS;KAC7B;IACD,IAAI,EAAE,SAAS;IACf,OAAO,EAAE;QACP,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;QACJ,CAAC,EAAE,CAAC;KACL;IACD,UAAU,EAAE;QACV,IAAI,EAAE,EAAE;QACR,IAAI,EAAE,IAAI;QACV,EAAE,EAAE,MAAM;QACV,EAAE,EAAE,KAAK;QACT,EAAE,EAAE,MAAM;KACX;CACF,CAAC","sourcesContent":["import type { Theme } from \"../../components/ui/types.js\";\n\nexport const defaultTheme: Theme = {\n border: {\n color: \"#4B5563\",\n focusColor: \"#8B5CF6\",\n style: \"rounded\",\n },\n colors: {\n accent: \"#8B5CF6\",\n accentForeground: \"#FFFFFF\",\n background: \"#000000\",\n border: \"#4B5563\",\n error: \"#EF4444\",\n errorForeground: \"#FFFFFF\",\n\n focusRing: \"#8B5CF6\",\n foreground: \"#FFFFFF\",\n info: \"#3B82F6\",\n infoForeground: \"#FFFFFF\",\n muted: \"#374151\",\n mutedForeground: \"#9CA3AF\",\n primary: \"#7C3AED\",\n primaryForeground: \"#FFFFFF\",\n\n secondary: \"#6B7280\",\n secondaryForeground: \"#FFFFFF\",\n selection: \"#7C3AED\",\n selectionForeground: \"#FFFFFF\",\n success: \"#10B981\",\n\n successForeground: \"#FFFFFF\",\n warning: \"#F59E0B\",\n warningForeground: \"#000000\",\n },\n name: \"default\",\n spacing: {\n 0: 0,\n 1: 1,\n 2: 2,\n 3: 3,\n 4: 4,\n 6: 6,\n 8: 8,\n },\n typography: {\n base: \"\",\n bold: true,\n lg: \"bold\",\n sm: \"dim\",\n xl: \"bold\",\n },\n};\n"]}
@@ -0,0 +1,23 @@
1
+ import { type LogoColors } from "./theme.js";
2
+ /**
3
+ * Welcome-logo pulse, ported from legacy `crewcoder-tui` `logo-banner.ts`: the
4
+ * whole wordmark breathes in one color between a dimmed accent and the glow
5
+ * color (a pulse, not a sweep). Pure so the timing and colors are testable.
6
+ */
7
+ /** One full breath (dim -> bright -> dim). Same as legacy. */
8
+ export declare const PULSE_PERIOD_MS = 2200;
9
+ /** After this long without a key on the welcome screen the pulse freezes. Same as legacy. */
10
+ export declare const PULSE_FREEZE_MS: number;
11
+ /** Frame interval; about 37 frames per breath, enough for a smooth fade. */
12
+ export declare const PULSE_FRAME_MS = 60;
13
+ /**
14
+ * The time to drive the pulse with: `now` while the user is active, clamped to
15
+ * the freeze instant once they have been idle for `PULSE_FREEZE_MS`, so the logo
16
+ * settles on its current frame without a jump.
17
+ */
18
+ export declare function pulseClock(idleSince: number, now: number): number;
19
+ /** True once the pulse has frozen and needs no more frames. */
20
+ export declare function pulseFrozen(idleSince: number, now: number): boolean;
21
+ /** The logo color at `time`: `dim` at the trough, `bright` at the peak. */
22
+ export declare function logoPulseColor(colors: LogoColors, time: number): string;
23
+ //# sourceMappingURL=logo-pulse.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo-pulse.d.ts","sourceRoot":"","sources":["../src/logo-pulse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAU,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAErD;;;;GAIG;AAEH,8DAA8D;AAC9D,eAAO,MAAM,eAAe,OAAO,CAAC;AAEpC,6FAA6F;AAC7F,eAAO,MAAM,eAAe,QAAgB,CAAC;AAE7C,4EAA4E;AAC5E,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC;;;;GAIG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAEjE;AAED,+DAA+D;AAC/D,wBAAgB,WAAW,CAAC,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAEnE;AAED,2EAA2E;AAC3E,wBAAgB,cAAc,CAAC,MAAM,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAGvE"}
@@ -0,0 +1,30 @@
1
+ import { mixHex } from "./theme.js";
2
+ /**
3
+ * Welcome-logo pulse, ported from legacy `crewcoder-tui` `logo-banner.ts`: the
4
+ * whole wordmark breathes in one color between a dimmed accent and the glow
5
+ * color (a pulse, not a sweep). Pure so the timing and colors are testable.
6
+ */
7
+ /** One full breath (dim -> bright -> dim). Same as legacy. */
8
+ export const PULSE_PERIOD_MS = 2200;
9
+ /** After this long without a key on the welcome screen the pulse freezes. Same as legacy. */
10
+ export const PULSE_FREEZE_MS = 3 * 60 * 1000;
11
+ /** Frame interval; about 37 frames per breath, enough for a smooth fade. */
12
+ export const PULSE_FRAME_MS = 60;
13
+ /**
14
+ * The time to drive the pulse with: `now` while the user is active, clamped to
15
+ * the freeze instant once they have been idle for `PULSE_FREEZE_MS`, so the logo
16
+ * settles on its current frame without a jump.
17
+ */
18
+ export function pulseClock(idleSince, now) {
19
+ return Math.min(now, idleSince + PULSE_FREEZE_MS);
20
+ }
21
+ /** True once the pulse has frozen and needs no more frames. */
22
+ export function pulseFrozen(idleSince, now) {
23
+ return now >= idleSince + PULSE_FREEZE_MS;
24
+ }
25
+ /** The logo color at `time`: `dim` at the trough, `bright` at the peak. */
26
+ export function logoPulseColor(colors, time) {
27
+ const t = (Math.sin((time / PULSE_PERIOD_MS) * Math.PI * 2) + 1) / 2;
28
+ return mixHex(colors.dim, colors.bright, t);
29
+ }
30
+ //# sourceMappingURL=logo-pulse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logo-pulse.js","sourceRoot":"","sources":["../src/logo-pulse.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAmB,MAAM,YAAY,CAAC;AAErD;;;;GAIG;AAEH,8DAA8D;AAC9D,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AAEpC,6FAA6F;AAC7F,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;AAE7C,4EAA4E;AAC5E,MAAM,CAAC,MAAM,cAAc,GAAG,EAAE,CAAC;AAEjC;;;;GAIG;AACH,MAAM,UAAU,UAAU,CAAC,SAAiB,EAAE,GAAW;IACvD,OAAO,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,SAAS,GAAG,eAAe,CAAC,CAAC;AACpD,CAAC;AAED,+DAA+D;AAC/D,MAAM,UAAU,WAAW,CAAC,SAAiB,EAAE,GAAW;IACxD,OAAO,GAAG,IAAI,SAAS,GAAG,eAAe,CAAC;AAC5C,CAAC;AAED,2EAA2E;AAC3E,MAAM,UAAU,cAAc,CAAC,MAAkB,EAAE,IAAY;IAC7D,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,IAAI,GAAG,eAAe,CAAC,GAAG,IAAI,CAAC,EAAE,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC;IACrE,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC;AAC9C,CAAC","sourcesContent":["import { mixHex, type LogoColors } from \"./theme.js\";\n\n/**\n * Welcome-logo pulse, ported from legacy `crewcoder-tui` `logo-banner.ts`: the\n * whole wordmark breathes in one color between a dimmed accent and the glow\n * color (a pulse, not a sweep). Pure so the timing and colors are testable.\n */\n\n/** One full breath (dim -> bright -> dim). Same as legacy. */\nexport const PULSE_PERIOD_MS = 2200;\n\n/** After this long without a key on the welcome screen the pulse freezes. Same as legacy. */\nexport const PULSE_FREEZE_MS = 3 * 60 * 1000;\n\n/** Frame interval; about 37 frames per breath, enough for a smooth fade. */\nexport const PULSE_FRAME_MS = 60;\n\n/**\n * The time to drive the pulse with: `now` while the user is active, clamped to\n * the freeze instant once they have been idle for `PULSE_FREEZE_MS`, so the logo\n * settles on its current frame without a jump.\n */\nexport function pulseClock(idleSince: number, now: number): number {\n return Math.min(now, idleSince + PULSE_FREEZE_MS);\n}\n\n/** True once the pulse has frozen and needs no more frames. */\nexport function pulseFrozen(idleSince: number, now: number): boolean {\n return now >= idleSince + PULSE_FREEZE_MS;\n}\n\n/** The logo color at `time`: `dim` at the trough, `bright` at the peak. */\nexport function logoPulseColor(colors: LogoColors, time: number): string {\n const t = (Math.sin((time / PULSE_PERIOD_MS) * Math.PI * 2) + 1) / 2;\n return mixHex(colors.dim, colors.bright, t);\n}\n"]}
@@ -0,0 +1,47 @@
1
+ import { SyntaxStyle, type RenderContext, type Renderable, type RenderNodeContext, type StyleDefinitionInput } from "@opentui/core";
2
+ import type { MarkdownColors, SyntaxColors } from "@onpoint-dev-tools/crewcoder-tui-core/theme/crewcoder-theme";
3
+ import type { Theme } from "./components/ui/types.js";
4
+ /** Per-block text colors: replies and reasoning differ in body and heading color. */
5
+ export type MarkdownTextColors = {
6
+ /** Body text. */
7
+ base: string;
8
+ /** Headings (bold). Replies use the theme's markdown heading; reasoning keeps its body color. */
9
+ heading: string;
10
+ };
11
+ /**
12
+ * Tree-sitter capture styles for highlighted code (fenced blocks, diffs, read
13
+ * output). OpenTUI's `SyntaxStyle` looks up the exact capture name, then only
14
+ * its first segment (`keyword.function` -> `keyword`), so base names cover
15
+ * dotted captures here. Variables and plain identifiers keep the surrounding
16
+ * text color. Colors come from the active theme's `syntax` palette.
17
+ */
18
+ export declare function codeStyles(c: SyntaxColors): Record<string, StyleDefinitionInput>;
19
+ /**
20
+ * Markdown element styles (`markup.*`), shared by rendered replies and by
21
+ * markdown source (`.md` read output, diffs, ```markdown fences). Every full
22
+ * capture name the markdown grammar emits is listed: OpenTUI would resolve
23
+ * `markup.raw.block` only to `markup`, which has no style.
24
+ */
25
+ export declare function markupStyles(md: MarkdownColors, heading: string, concealed: string): Record<string, StyleDefinitionInput>;
26
+ /**
27
+ * Styles for OpenTUI's markdown engine (`markup.*`, `conceal`, `default`) plus
28
+ * the code scopes for fenced blocks.
29
+ */
30
+ export declare function markdownStyles(theme: Theme, colors: MarkdownTextColors, syntax: SyntaxColors, markdown: MarkdownColors): Record<string, StyleDefinitionInput>;
31
+ export declare function useMarkdownStyle(theme: Theme, colors: MarkdownTextColors): SyntaxStyle;
32
+ /**
33
+ * Highlighted source for `<diff>` and `<code>` (read output): code scopes, and
34
+ * markdown element scopes so `.md` files color their headings, emphasis,
35
+ * links, and code spans like a rendered reply.
36
+ */
37
+ export declare function useCodeStyle(theme: Theme): SyntaxStyle;
38
+ /**
39
+ * A fenced code block behind a left rail. The block itself is OpenTUI's
40
+ * default `CodeRenderable`, highlighted by Tree-sitter when the fence's info
41
+ * string names a language with a parser (`infoStringToFiletype`), plain text
42
+ * otherwise. Markdown reuses that renderable across streaming updates and
43
+ * takes it out of the old rail before dropping it. OpenTUI leaves fenced
44
+ * code unconcealed, so a ```markdown fence keeps its `#` and `**` markers.
45
+ */
46
+ export declare function codeFence(ctx: RenderContext, theme: Theme, context: RenderNodeContext): Renderable | undefined;
47
+ //# sourceMappingURL=markdown-style.d.ts.map
@@ -0,0 +1 @@
1
+ {"version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