@dexto/tui 1.14.6 → 1.15.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (570) hide show
  1. package/dist/InkCLIRefactored.cjs +30 -24
  2. package/dist/InkCLIRefactored.d.ts.map +1 -1
  3. package/dist/InkCLIRefactored.js +30 -24
  4. package/dist/components/ApprovalPrompt.cjs +128 -40
  5. package/dist/components/ApprovalPrompt.d.ts +2 -0
  6. package/dist/components/ApprovalPrompt.d.ts.map +1 -1
  7. package/dist/components/ApprovalPrompt.js +128 -41
  8. package/dist/components/CustomInput.cjs +4 -3
  9. package/dist/components/CustomInput.d.ts.map +1 -1
  10. package/dist/components/CustomInput.js +4 -3
  11. package/dist/components/DeckArea.cjs +43 -0
  12. package/dist/components/DeckArea.d.ts +14 -0
  13. package/dist/components/DeckArea.d.ts.map +1 -0
  14. package/dist/components/DeckArea.js +19 -0
  15. package/dist/components/EditableMultiLineInput.cjs +9 -8
  16. package/dist/components/EditableMultiLineInput.d.ts.map +1 -1
  17. package/dist/components/EditableMultiLineInput.js +9 -8
  18. package/dist/components/ElicitationForm.cjs +78 -18
  19. package/dist/components/ElicitationForm.d.ts.map +1 -1
  20. package/dist/components/ElicitationForm.js +78 -18
  21. package/dist/components/ErrorBoundary.cjs +15 -5
  22. package/dist/components/ErrorBoundary.d.ts.map +1 -1
  23. package/dist/components/ErrorBoundary.js +15 -5
  24. package/dist/components/Footer.cjs +41 -86
  25. package/dist/components/Footer.d.ts +2 -2
  26. package/dist/components/Footer.d.ts.map +1 -1
  27. package/dist/components/Footer.js +44 -92
  28. package/dist/components/Footer.test.cjs +44 -0
  29. package/dist/components/Footer.test.js +44 -0
  30. package/dist/components/HistorySearchBar.cjs +6 -5
  31. package/dist/components/HistorySearchBar.d.ts.map +1 -1
  32. package/dist/components/HistorySearchBar.js +6 -5
  33. package/dist/components/MultiLineInput.cjs +6 -5
  34. package/dist/components/MultiLineInput.d.ts.map +1 -1
  35. package/dist/components/MultiLineInput.js +6 -5
  36. package/dist/components/ResourceAutocomplete.cjs +5 -4
  37. package/dist/components/ResourceAutocomplete.d.ts.map +1 -1
  38. package/dist/components/ResourceAutocomplete.js +5 -4
  39. package/dist/components/SignalGates.test.cjs +215 -0
  40. package/dist/components/SignalGates.test.d.ts +2 -0
  41. package/dist/components/SignalGates.test.d.ts.map +1 -0
  42. package/dist/components/SignalGates.test.js +217 -0
  43. package/dist/components/SlashCommandAutocomplete.cjs +4 -3
  44. package/dist/components/SlashCommandAutocomplete.d.ts.map +1 -1
  45. package/dist/components/SlashCommandAutocomplete.js +4 -3
  46. package/dist/components/StatusBar.cjs +13 -30
  47. package/dist/components/StatusBar.d.ts +1 -3
  48. package/dist/components/StatusBar.d.ts.map +1 -1
  49. package/dist/components/StatusBar.js +13 -30
  50. package/dist/components/TextBufferInput.cjs +13 -12
  51. package/dist/components/TextBufferInput.d.ts.map +1 -1
  52. package/dist/components/TextBufferInput.js +13 -12
  53. package/dist/components/TodoPanel.cjs +23 -16
  54. package/dist/components/TodoPanel.d.ts.map +1 -1
  55. package/dist/components/TodoPanel.js +23 -16
  56. package/dist/components/base/BaseAutocomplete.cjs +7 -6
  57. package/dist/components/base/BaseAutocomplete.d.ts.map +1 -1
  58. package/dist/components/base/BaseAutocomplete.js +7 -6
  59. package/dist/components/base/BaseSelector.cjs +5 -4
  60. package/dist/components/base/BaseSelector.d.ts.map +1 -1
  61. package/dist/components/base/BaseSelector.js +5 -4
  62. package/dist/components/chat/Footer.cjs +2 -1
  63. package/dist/components/chat/Footer.d.ts.map +1 -1
  64. package/dist/components/chat/Footer.js +2 -1
  65. package/dist/components/chat/Header.cjs +20 -16
  66. package/dist/components/chat/Header.d.ts.map +1 -1
  67. package/dist/components/chat/Header.js +20 -16
  68. package/dist/components/chat/MessageItem.cjs +47 -30
  69. package/dist/components/chat/MessageItem.d.ts.map +1 -1
  70. package/dist/components/chat/MessageItem.js +52 -29
  71. package/dist/components/chat/MessageList.cjs +3 -2
  72. package/dist/components/chat/MessageList.d.ts.map +1 -1
  73. package/dist/components/chat/MessageList.js +3 -2
  74. package/dist/components/chat/QueuedMessagesDisplay.cjs +17 -5
  75. package/dist/components/chat/QueuedMessagesDisplay.d.ts.map +1 -1
  76. package/dist/components/chat/QueuedMessagesDisplay.js +18 -6
  77. package/dist/components/chat/SignalMessage.cjs +116 -0
  78. package/dist/components/chat/SignalMessage.d.ts +18 -0
  79. package/dist/components/chat/SignalMessage.d.ts.map +1 -0
  80. package/dist/components/chat/SignalMessage.js +96 -0
  81. package/dist/components/chat/SignalMessage.test.cjs +112 -0
  82. package/dist/components/chat/SignalMessage.test.d.ts +2 -0
  83. package/dist/components/chat/SignalMessage.test.d.ts.map +1 -0
  84. package/dist/components/chat/SignalMessage.test.js +116 -0
  85. package/dist/components/chat/ToolIcon.cjs +6 -5
  86. package/dist/components/chat/ToolIcon.d.ts.map +1 -1
  87. package/dist/components/chat/ToolIcon.js +6 -5
  88. package/dist/components/chat/styled-boxes/ConfigBox.cjs +8 -7
  89. package/dist/components/chat/styled-boxes/ConfigBox.d.ts.map +1 -1
  90. package/dist/components/chat/styled-boxes/ConfigBox.js +8 -7
  91. package/dist/components/chat/styled-boxes/HelpBox.cjs +4 -3
  92. package/dist/components/chat/styled-boxes/HelpBox.d.ts.map +1 -1
  93. package/dist/components/chat/styled-boxes/HelpBox.js +4 -3
  94. package/dist/components/chat/styled-boxes/LogConfigBox.cjs +11 -3
  95. package/dist/components/chat/styled-boxes/LogConfigBox.d.ts.map +1 -1
  96. package/dist/components/chat/styled-boxes/LogConfigBox.js +11 -3
  97. package/dist/components/chat/styled-boxes/SessionHistoryBox.cjs +8 -7
  98. package/dist/components/chat/styled-boxes/SessionHistoryBox.d.ts.map +1 -1
  99. package/dist/components/chat/styled-boxes/SessionHistoryBox.js +8 -7
  100. package/dist/components/chat/styled-boxes/SessionListBox.cjs +19 -11
  101. package/dist/components/chat/styled-boxes/SessionListBox.d.ts.map +1 -1
  102. package/dist/components/chat/styled-boxes/SessionListBox.js +19 -11
  103. package/dist/components/chat/styled-boxes/ShortcutsBox.cjs +4 -3
  104. package/dist/components/chat/styled-boxes/ShortcutsBox.d.ts.map +1 -1
  105. package/dist/components/chat/styled-boxes/ShortcutsBox.js +4 -3
  106. package/dist/components/chat/styled-boxes/StatsBox.cjs +13 -5
  107. package/dist/components/chat/styled-boxes/StatsBox.d.ts.map +1 -1
  108. package/dist/components/chat/styled-boxes/StatsBox.js +13 -5
  109. package/dist/components/chat/styled-boxes/StyledBox.cjs +7 -6
  110. package/dist/components/chat/styled-boxes/StyledBox.d.ts.map +1 -1
  111. package/dist/components/chat/styled-boxes/StyledBox.js +7 -6
  112. package/dist/components/chat/styled-boxes/SyspromptBox.cjs +2 -1
  113. package/dist/components/chat/styled-boxes/SyspromptBox.d.ts.map +1 -1
  114. package/dist/components/chat/styled-boxes/SyspromptBox.js +2 -1
  115. package/dist/components/modes/AlternateBufferCLI.cjs +53 -43
  116. package/dist/components/modes/AlternateBufferCLI.d.ts.map +1 -1
  117. package/dist/components/modes/AlternateBufferCLI.js +53 -43
  118. package/dist/components/modes/StaticCLI.cjs +53 -42
  119. package/dist/components/modes/StaticCLI.d.ts.map +1 -1
  120. package/dist/components/modes/StaticCLI.js +53 -42
  121. package/dist/components/overlays/ApiKeyInput.cjs +12 -11
  122. package/dist/components/overlays/ApiKeyInput.d.ts.map +1 -1
  123. package/dist/components/overlays/ApiKeyInput.js +12 -11
  124. package/dist/components/overlays/ChatGPTUsageCapOverlay.cjs +7 -6
  125. package/dist/components/overlays/ChatGPTUsageCapOverlay.d.ts.map +1 -1
  126. package/dist/components/overlays/ChatGPTUsageCapOverlay.js +7 -6
  127. package/dist/components/overlays/CommandOutputOverlay.cjs +2 -1
  128. package/dist/components/overlays/CommandOutputOverlay.d.ts.map +1 -1
  129. package/dist/components/overlays/CommandOutputOverlay.js +2 -1
  130. package/dist/components/overlays/ConnectOverlay.cjs +10 -9
  131. package/dist/components/overlays/ConnectOverlay.d.ts.map +1 -1
  132. package/dist/components/overlays/ConnectOverlay.js +10 -9
  133. package/dist/components/overlays/ContextStatsOverlay.cjs +48 -37
  134. package/dist/components/overlays/ContextStatsOverlay.d.ts.map +1 -1
  135. package/dist/components/overlays/ContextStatsOverlay.js +48 -37
  136. package/dist/components/overlays/CustomModelWizard.cjs +5 -4
  137. package/dist/components/overlays/CustomModelWizard.d.ts.map +1 -1
  138. package/dist/components/overlays/CustomModelWizard.js +5 -4
  139. package/dist/components/overlays/ExportWizard.cjs +28 -27
  140. package/dist/components/overlays/ExportWizard.d.ts.map +1 -1
  141. package/dist/components/overlays/ExportWizard.js +28 -27
  142. package/dist/components/overlays/InsufficientCreditsOverlay.cjs +25 -9
  143. package/dist/components/overlays/InsufficientCreditsOverlay.d.ts +2 -0
  144. package/dist/components/overlays/InsufficientCreditsOverlay.d.ts.map +1 -1
  145. package/dist/components/overlays/InsufficientCreditsOverlay.js +25 -9
  146. package/dist/components/overlays/LogLevelSelector.cjs +6 -5
  147. package/dist/components/overlays/LogLevelSelector.d.ts.map +1 -1
  148. package/dist/components/overlays/LogLevelSelector.js +6 -5
  149. package/dist/components/overlays/LoginOverlay.cjs +31 -66
  150. package/dist/components/overlays/LoginOverlay.d.ts +1 -3
  151. package/dist/components/overlays/LoginOverlay.d.ts.map +1 -1
  152. package/dist/components/overlays/LoginOverlay.js +32 -71
  153. package/dist/components/overlays/LogoutOverlay.cjs +16 -24
  154. package/dist/components/overlays/LogoutOverlay.d.ts +1 -0
  155. package/dist/components/overlays/LogoutOverlay.d.ts.map +1 -1
  156. package/dist/components/overlays/LogoutOverlay.js +18 -38
  157. package/dist/components/overlays/MarketplaceAddPrompt.cjs +12 -11
  158. package/dist/components/overlays/MarketplaceAddPrompt.d.ts.map +1 -1
  159. package/dist/components/overlays/MarketplaceAddPrompt.js +12 -11
  160. package/dist/components/overlays/MarketplaceBrowser.cjs +27 -26
  161. package/dist/components/overlays/MarketplaceBrowser.d.ts.map +1 -1
  162. package/dist/components/overlays/MarketplaceBrowser.js +27 -26
  163. package/dist/components/overlays/McpAddChoice.cjs +4 -3
  164. package/dist/components/overlays/McpAddChoice.d.ts.map +1 -1
  165. package/dist/components/overlays/McpAddChoice.js +4 -3
  166. package/dist/components/overlays/McpAddSelector.cjs +4 -3
  167. package/dist/components/overlays/McpAddSelector.d.ts.map +1 -1
  168. package/dist/components/overlays/McpAddSelector.js +4 -3
  169. package/dist/components/overlays/McpCustomTypeSelector.cjs +4 -3
  170. package/dist/components/overlays/McpCustomTypeSelector.d.ts.map +1 -1
  171. package/dist/components/overlays/McpCustomTypeSelector.js +4 -3
  172. package/dist/components/overlays/McpCustomWizard.cjs +9 -8
  173. package/dist/components/overlays/McpCustomWizard.d.ts.map +1 -1
  174. package/dist/components/overlays/McpCustomWizard.js +9 -8
  175. package/dist/components/overlays/McpRemoveSelector.cjs +5 -4
  176. package/dist/components/overlays/McpRemoveSelector.d.ts.map +1 -1
  177. package/dist/components/overlays/McpRemoveSelector.js +5 -4
  178. package/dist/components/overlays/McpSelector.cjs +4 -3
  179. package/dist/components/overlays/McpSelector.d.ts.map +1 -1
  180. package/dist/components/overlays/McpSelector.js +4 -3
  181. package/dist/components/overlays/McpServerActions.cjs +7 -6
  182. package/dist/components/overlays/McpServerActions.d.ts.map +1 -1
  183. package/dist/components/overlays/McpServerActions.js +7 -6
  184. package/dist/components/overlays/McpServerList.cjs +6 -5
  185. package/dist/components/overlays/McpServerList.d.ts.map +1 -1
  186. package/dist/components/overlays/McpServerList.js +6 -5
  187. package/dist/components/overlays/ModelSelectorRefactored.cjs +32 -17
  188. package/dist/components/overlays/ModelSelectorRefactored.d.ts.map +1 -1
  189. package/dist/components/overlays/ModelSelectorRefactored.js +32 -17
  190. package/dist/components/overlays/PermissionsSelector.cjs +6 -5
  191. package/dist/components/overlays/PermissionsSelector.d.ts.map +1 -1
  192. package/dist/components/overlays/PermissionsSelector.js +6 -5
  193. package/dist/components/overlays/PluginActions.cjs +7 -6
  194. package/dist/components/overlays/PluginActions.d.ts.map +1 -1
  195. package/dist/components/overlays/PluginActions.js +7 -6
  196. package/dist/components/overlays/PluginList.cjs +12 -11
  197. package/dist/components/overlays/PluginList.d.ts.map +1 -1
  198. package/dist/components/overlays/PluginList.js +12 -11
  199. package/dist/components/overlays/PluginManager.cjs +13 -5
  200. package/dist/components/overlays/PluginManager.d.ts.map +1 -1
  201. package/dist/components/overlays/PluginManager.js +13 -5
  202. package/dist/components/overlays/PromptAddChoice.cjs +5 -4
  203. package/dist/components/overlays/PromptAddChoice.d.ts.map +1 -1
  204. package/dist/components/overlays/PromptAddChoice.js +5 -4
  205. package/dist/components/overlays/PromptAddWizard.cjs +10 -9
  206. package/dist/components/overlays/PromptAddWizard.d.ts.map +1 -1
  207. package/dist/components/overlays/PromptAddWizard.js +10 -9
  208. package/dist/components/overlays/PromptDeleteSelector.cjs +6 -5
  209. package/dist/components/overlays/PromptDeleteSelector.d.ts.map +1 -1
  210. package/dist/components/overlays/PromptDeleteSelector.js +6 -5
  211. package/dist/components/overlays/PromptList.cjs +10 -9
  212. package/dist/components/overlays/PromptList.d.ts.map +1 -1
  213. package/dist/components/overlays/PromptList.js +10 -9
  214. package/dist/components/overlays/ReasoningOverlay.cjs +30 -23
  215. package/dist/components/overlays/ReasoningOverlay.d.ts.map +1 -1
  216. package/dist/components/overlays/ReasoningOverlay.js +30 -23
  217. package/dist/components/overlays/SearchOverlay.cjs +15 -14
  218. package/dist/components/overlays/SearchOverlay.d.ts.map +1 -1
  219. package/dist/components/overlays/SearchOverlay.js +15 -14
  220. package/dist/components/overlays/SessionRenameOverlay.cjs +9 -8
  221. package/dist/components/overlays/SessionRenameOverlay.d.ts.map +1 -1
  222. package/dist/components/overlays/SessionRenameOverlay.js +9 -8
  223. package/dist/components/overlays/SessionSelectorRefactored.cjs +4 -3
  224. package/dist/components/overlays/SessionSelectorRefactored.d.ts.map +1 -1
  225. package/dist/components/overlays/SessionSelectorRefactored.js +4 -3
  226. package/dist/components/overlays/SessionSubcommandSelector.cjs +4 -3
  227. package/dist/components/overlays/SessionSubcommandSelector.d.ts.map +1 -1
  228. package/dist/components/overlays/SessionSubcommandSelector.js +4 -3
  229. package/dist/components/overlays/SoundsSelector.cjs +15 -7
  230. package/dist/components/overlays/SoundsSelector.d.ts.map +1 -1
  231. package/dist/components/overlays/SoundsSelector.js +15 -7
  232. package/dist/components/overlays/StreamSelector.cjs +5 -4
  233. package/dist/components/overlays/StreamSelector.d.ts.map +1 -1
  234. package/dist/components/overlays/StreamSelector.js +5 -4
  235. package/dist/components/overlays/ToolBrowser.cjs +73 -56
  236. package/dist/components/overlays/ToolBrowser.d.ts.map +1 -1
  237. package/dist/components/overlays/ToolBrowser.js +73 -56
  238. package/dist/components/overlays/custom-model-wizard/LocalModelWizard.cjs +103 -69
  239. package/dist/components/overlays/custom-model-wizard/LocalModelWizard.d.ts.map +1 -1
  240. package/dist/components/overlays/custom-model-wizard/LocalModelWizard.js +103 -69
  241. package/dist/components/overlays/custom-model-wizard/provider-config.cjs +4 -4
  242. package/dist/components/overlays/custom-model-wizard/provider-config.js +4 -4
  243. package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.cjs +3 -2
  244. package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.d.ts.map +1 -1
  245. package/dist/components/overlays/custom-model-wizard/shared/ApiKeyStep.js +3 -2
  246. package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.cjs +5 -4
  247. package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.d.ts.map +1 -1
  248. package/dist/components/overlays/custom-model-wizard/shared/ProviderSelector.js +5 -4
  249. package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.cjs +4 -3
  250. package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.d.ts.map +1 -1
  251. package/dist/components/overlays/custom-model-wizard/shared/SetupInfoBanner.js +4 -3
  252. package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.cjs +7 -6
  253. package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.d.ts.map +1 -1
  254. package/dist/components/overlays/custom-model-wizard/shared/WizardStepInput.js +7 -6
  255. package/dist/components/renderers/DiffRenderer.cjs +5 -4
  256. package/dist/components/renderers/DiffRenderer.d.ts.map +1 -1
  257. package/dist/components/renderers/DiffRenderer.js +5 -4
  258. package/dist/components/renderers/FilePreviewRenderer.cjs +23 -13
  259. package/dist/components/renderers/FilePreviewRenderer.d.ts.map +1 -1
  260. package/dist/components/renderers/FilePreviewRenderer.js +23 -13
  261. package/dist/components/renderers/FileRenderer.cjs +9 -8
  262. package/dist/components/renderers/FileRenderer.d.ts.map +1 -1
  263. package/dist/components/renderers/FileRenderer.js +9 -8
  264. package/dist/components/renderers/GenericRenderer.cjs +5 -4
  265. package/dist/components/renderers/GenericRenderer.d.ts.map +1 -1
  266. package/dist/components/renderers/GenericRenderer.js +5 -4
  267. package/dist/components/renderers/SearchRenderer.cjs +4 -3
  268. package/dist/components/renderers/SearchRenderer.d.ts.map +1 -1
  269. package/dist/components/renderers/SearchRenderer.js +4 -3
  270. package/dist/components/renderers/ShellRenderer.cjs +6 -5
  271. package/dist/components/renderers/ShellRenderer.d.ts.map +1 -1
  272. package/dist/components/renderers/ShellRenderer.js +6 -5
  273. package/dist/components/renderers/SignalDiff.cjs +139 -0
  274. package/dist/components/renderers/SignalDiff.d.ts +21 -0
  275. package/dist/components/renderers/SignalDiff.d.ts.map +1 -0
  276. package/dist/components/renderers/SignalDiff.js +106 -0
  277. package/dist/components/renderers/SignalDiff.test.cjs +78 -0
  278. package/dist/components/renderers/SignalDiff.test.d.ts +2 -0
  279. package/dist/components/renderers/SignalDiff.test.d.ts.map +1 -0
  280. package/dist/components/renderers/SignalDiff.test.js +77 -0
  281. package/dist/components/renderers/diff-shared.cjs +13 -7
  282. package/dist/components/renderers/diff-shared.d.ts +5 -0
  283. package/dist/components/renderers/diff-shared.d.ts.map +1 -1
  284. package/dist/components/renderers/diff-shared.js +12 -7
  285. package/dist/components/shared/FocusOverlayFrame.cjs +3 -2
  286. package/dist/components/shared/FocusOverlayFrame.d.ts.map +1 -1
  287. package/dist/components/shared/FocusOverlayFrame.js +3 -2
  288. package/dist/components/shared/HintBar.cjs +2 -1
  289. package/dist/components/shared/HintBar.d.ts.map +1 -1
  290. package/dist/components/shared/HintBar.js +2 -1
  291. package/dist/components/shared/MarkdownText.cjs +36 -53
  292. package/dist/components/shared/MarkdownText.d.ts +2 -0
  293. package/dist/components/shared/MarkdownText.d.ts.map +1 -1
  294. package/dist/components/shared/MarkdownText.js +36 -54
  295. package/dist/components/shared/VirtualizedList.cjs +2 -1
  296. package/dist/components/shared/VirtualizedList.d.ts.map +1 -1
  297. package/dist/components/shared/VirtualizedList.js +2 -1
  298. package/dist/containers/OverlayContainer.cjs +32 -44
  299. package/dist/containers/OverlayContainer.d.ts.map +1 -1
  300. package/dist/containers/OverlayContainer.js +32 -44
  301. package/dist/contexts/KeypressContext.cjs +7 -1
  302. package/dist/contexts/KeypressContext.d.ts.map +1 -1
  303. package/dist/contexts/KeypressContext.js +7 -1
  304. package/dist/contexts/KeypressContext.test.cjs +82 -0
  305. package/dist/contexts/KeypressContext.test.d.ts +2 -0
  306. package/dist/contexts/KeypressContext.test.d.ts.map +1 -0
  307. package/dist/contexts/KeypressContext.test.js +81 -0
  308. package/dist/hooks/useAgentEvents.cjs +1 -74
  309. package/dist/hooks/useAgentEvents.d.ts.map +1 -1
  310. package/dist/hooks/useAgentEvents.js +1 -74
  311. package/dist/hooks/useCLIState.cjs +0 -3
  312. package/dist/hooks/useCLIState.d.ts.map +1 -1
  313. package/dist/hooks/useCLIState.js +0 -3
  314. package/dist/hooks/useContextStats.cjs +91 -0
  315. package/dist/hooks/useContextStats.d.ts +13 -0
  316. package/dist/hooks/useContextStats.d.ts.map +1 -0
  317. package/dist/hooks/useContextStats.js +67 -0
  318. package/dist/hooks/useDeckState.cjs +140 -0
  319. package/dist/hooks/useDeckState.d.ts +20 -0
  320. package/dist/hooks/useDeckState.d.ts.map +1 -0
  321. package/dist/hooks/useDeckState.js +123 -0
  322. package/dist/hooks/useDextoCredits.cjs +81 -0
  323. package/dist/hooks/useDextoCredits.d.ts +14 -0
  324. package/dist/hooks/useDextoCredits.d.ts.map +1 -0
  325. package/dist/hooks/useDextoCredits.js +56 -0
  326. package/dist/hooks/useDextoCredits.test.cjs +73 -0
  327. package/dist/hooks/useDextoCredits.test.d.ts +2 -0
  328. package/dist/hooks/useDextoCredits.test.d.ts.map +1 -0
  329. package/dist/hooks/useDextoCredits.test.js +72 -0
  330. package/dist/hooks/useElapsedTime.cjs +13 -24
  331. package/dist/hooks/useElapsedTime.d.ts +3 -1
  332. package/dist/hooks/useElapsedTime.d.ts.map +1 -1
  333. package/dist/hooks/useElapsedTime.js +13 -24
  334. package/dist/hooks/useElapsedTime.test.cjs +35 -0
  335. package/dist/hooks/useElapsedTime.test.d.ts +2 -0
  336. package/dist/hooks/useElapsedTime.test.d.ts.map +1 -0
  337. package/dist/hooks/useElapsedTime.test.js +34 -0
  338. package/dist/hooks/useGitDirtyFiles.cjs +59 -0
  339. package/dist/hooks/useGitDirtyFiles.d.ts +5 -0
  340. package/dist/hooks/useGitDirtyFiles.d.ts.map +1 -0
  341. package/dist/hooks/useGitDirtyFiles.js +34 -0
  342. package/dist/hooks/useGitDirtyFiles.test.cjs +9 -0
  343. package/dist/hooks/useGitDirtyFiles.test.d.ts +2 -0
  344. package/dist/hooks/useGitDirtyFiles.test.d.ts.map +1 -0
  345. package/dist/hooks/useGitDirtyFiles.test.js +8 -0
  346. package/dist/hooks/useHeldValue.cjs +33 -0
  347. package/dist/hooks/useHeldValue.d.ts +3 -0
  348. package/dist/hooks/useHeldValue.d.ts.map +1 -0
  349. package/dist/hooks/useHeldValue.js +9 -0
  350. package/dist/hooks/useHeldValue.test.cjs +31 -0
  351. package/dist/hooks/useHeldValue.test.d.ts +2 -0
  352. package/dist/hooks/useHeldValue.test.d.ts.map +1 -0
  353. package/dist/hooks/useHeldValue.test.js +30 -0
  354. package/dist/hooks/useInputOrchestrator.cjs +22 -30
  355. package/dist/hooks/useInputOrchestrator.d.ts +2 -0
  356. package/dist/hooks/useInputOrchestrator.d.ts.map +1 -1
  357. package/dist/hooks/useInputOrchestrator.js +21 -30
  358. package/dist/hooks/useInputOrchestrator.test.cjs +24 -0
  359. package/dist/hooks/useInputOrchestrator.test.d.ts +2 -0
  360. package/dist/hooks/useInputOrchestrator.test.d.ts.map +1 -0
  361. package/dist/hooks/useInputOrchestrator.test.js +23 -0
  362. package/dist/host/index.cjs +22 -49
  363. package/dist/host/index.d.ts +18 -72
  364. package/dist/host/index.d.ts.map +1 -1
  365. package/dist/host/index.js +18 -42
  366. package/dist/host/index.test.cjs +21 -35
  367. package/dist/host/index.test.js +22 -40
  368. package/dist/index.d.cts +13 -52
  369. package/dist/interactive-commands/command-parser.cjs +13 -21
  370. package/dist/interactive-commands/command-parser.d.ts.map +1 -1
  371. package/dist/interactive-commands/command-parser.js +13 -11
  372. package/dist/interactive-commands/general-commands.cjs +8 -7
  373. package/dist/interactive-commands/general-commands.d.ts.map +1 -1
  374. package/dist/interactive-commands/general-commands.js +8 -7
  375. package/dist/services/processStream.cjs +33 -21
  376. package/dist/services/processStream.d.ts.map +1 -1
  377. package/dist/services/processStream.js +34 -22
  378. package/dist/services/processStream.test.cjs +52 -4
  379. package/dist/services/processStream.test.js +52 -4
  380. package/dist/signal/background.cjs +154 -0
  381. package/dist/signal/background.d.ts +43 -0
  382. package/dist/signal/background.d.ts.map +1 -0
  383. package/dist/signal/background.js +124 -0
  384. package/dist/signal/background.test.cjs +186 -0
  385. package/dist/signal/background.test.d.ts +2 -0
  386. package/dist/signal/background.test.d.ts.map +1 -0
  387. package/dist/signal/background.test.js +192 -0
  388. package/dist/signal/caps.cjs +100 -0
  389. package/dist/signal/caps.d.ts +23 -0
  390. package/dist/signal/caps.d.ts.map +1 -0
  391. package/dist/signal/caps.js +73 -0
  392. package/dist/signal/caps.test.cjs +56 -0
  393. package/dist/signal/caps.test.d.ts +2 -0
  394. package/dist/signal/caps.test.d.ts.map +1 -0
  395. package/dist/signal/caps.test.js +55 -0
  396. package/dist/signal/components.cjs +257 -0
  397. package/dist/signal/components.d.ts +120 -0
  398. package/dist/signal/components.d.ts.map +1 -0
  399. package/dist/signal/components.js +226 -0
  400. package/dist/signal/components.test.cjs +156 -0
  401. package/dist/signal/components.test.d.ts +2 -0
  402. package/dist/signal/components.test.d.ts.map +1 -0
  403. package/dist/signal/components.test.js +133 -0
  404. package/dist/signal/cut.cjs +103 -0
  405. package/dist/signal/cut.d.ts +11 -0
  406. package/dist/signal/cut.d.ts.map +1 -0
  407. package/dist/signal/cut.js +77 -0
  408. package/dist/signal/cut.test.cjs +20 -0
  409. package/dist/signal/cut.test.d.ts +2 -0
  410. package/dist/signal/cut.test.d.ts.map +1 -0
  411. package/dist/signal/cut.test.js +19 -0
  412. package/dist/signal/deck-layout.cjs +57 -0
  413. package/dist/signal/deck-layout.d.ts +29 -0
  414. package/dist/signal/deck-layout.d.ts.map +1 -0
  415. package/dist/signal/deck-layout.js +30 -0
  416. package/dist/signal/deck-parts.cjs +243 -0
  417. package/dist/signal/deck-parts.d.ts +55 -0
  418. package/dist/signal/deck-parts.d.ts.map +1 -0
  419. package/dist/signal/deck-parts.js +205 -0
  420. package/dist/signal/deck.test.cjs +311 -0
  421. package/dist/signal/deck.test.d.ts +2 -0
  422. package/dist/signal/deck.test.d.ts.map +1 -0
  423. package/dist/signal/deck.test.js +288 -0
  424. package/dist/signal/glyphs.cjs +195 -0
  425. package/dist/signal/glyphs.d.ts +8 -0
  426. package/dist/signal/glyphs.d.ts.map +1 -0
  427. package/dist/signal/glyphs.js +171 -0
  428. package/dist/signal/glyphs.test.cjs +17 -0
  429. package/dist/signal/glyphs.test.d.ts +2 -0
  430. package/dist/signal/glyphs.test.d.ts.map +1 -0
  431. package/dist/signal/glyphs.test.js +16 -0
  432. package/dist/signal/harness.cjs +103 -0
  433. package/dist/signal/harness.d.ts +70 -0
  434. package/dist/signal/harness.d.ts.map +1 -0
  435. package/dist/signal/harness.js +67 -0
  436. package/dist/signal/harness.test.cjs +84 -0
  437. package/dist/signal/harness.test.d.ts +2 -0
  438. package/dist/signal/harness.test.d.ts.map +1 -0
  439. package/dist/signal/harness.test.js +61 -0
  440. package/dist/signal/index.cjs +76 -0
  441. package/dist/signal/index.d.ts +8 -0
  442. package/dist/signal/index.d.ts.map +1 -0
  443. package/dist/signal/index.js +45 -0
  444. package/dist/signal/kit.snapshot.test.cjs +56 -0
  445. package/dist/signal/kit.snapshot.test.d.ts +2 -0
  446. package/dist/signal/kit.snapshot.test.d.ts.map +1 -0
  447. package/dist/signal/kit.snapshot.test.js +55 -0
  448. package/dist/signal/no-raw-colours.test.cjs +32 -0
  449. package/dist/signal/no-raw-colours.test.d.ts +2 -0
  450. package/dist/signal/no-raw-colours.test.d.ts.map +1 -0
  451. package/dist/signal/no-raw-colours.test.js +30 -0
  452. package/dist/signal/paint.cjs +76 -0
  453. package/dist/signal/paint.d.ts +15 -0
  454. package/dist/signal/paint.d.ts.map +1 -0
  455. package/dist/signal/paint.js +41 -0
  456. package/dist/signal/paint.test.cjs +98 -0
  457. package/dist/signal/paint.test.d.ts +2 -0
  458. package/dist/signal/paint.test.d.ts.map +1 -0
  459. package/dist/signal/paint.test.js +75 -0
  460. package/dist/signal/tone.cjs +109 -0
  461. package/dist/signal/tone.d.ts +17 -0
  462. package/dist/signal/tone.d.ts.map +1 -0
  463. package/dist/signal/tone.js +83 -0
  464. package/dist/signal/tone.test.cjs +70 -0
  465. package/dist/signal/tone.test.d.ts +2 -0
  466. package/dist/signal/tone.test.d.ts.map +1 -0
  467. package/dist/signal/tone.test.js +69 -0
  468. package/dist/signal/trace.cjs +142 -0
  469. package/dist/signal/trace.d.ts +41 -0
  470. package/dist/signal/trace.d.ts.map +1 -0
  471. package/dist/signal/trace.js +113 -0
  472. package/dist/signal/trace.test.cjs +50 -0
  473. package/dist/signal/trace.test.d.ts +2 -0
  474. package/dist/signal/trace.test.d.ts.map +1 -0
  475. package/dist/signal/trace.test.js +49 -0
  476. package/dist/signal/use-trace.cjs +73 -0
  477. package/dist/signal/use-trace.d.ts +5 -0
  478. package/dist/signal/use-trace.d.ts.map +1 -0
  479. package/dist/signal/use-trace.js +48 -0
  480. package/dist/signal/wordmark-art.generated.cjs +375 -0
  481. package/dist/signal/wordmark-art.generated.d.ts +3 -0
  482. package/dist/signal/wordmark-art.generated.d.ts.map +1 -0
  483. package/dist/signal/wordmark-art.generated.js +351 -0
  484. package/dist/signal/wordmark.cjs +60 -0
  485. package/dist/signal/wordmark.d.ts +23 -0
  486. package/dist/signal/wordmark.d.ts.map +1 -0
  487. package/dist/signal/wordmark.js +34 -0
  488. package/dist/signal/wordmark.test.cjs +71 -0
  489. package/dist/signal/wordmark.test.d.ts +2 -0
  490. package/dist/signal/wordmark.test.d.ts.map +1 -0
  491. package/dist/signal/wordmark.test.js +70 -0
  492. package/dist/state/initialState.cjs +0 -3
  493. package/dist/state/initialState.d.ts.map +1 -1
  494. package/dist/state/initialState.js +0 -3
  495. package/dist/state/types.d.ts +13 -7
  496. package/dist/state/types.d.ts.map +1 -1
  497. package/dist/utils/approval-response.cjs +45 -0
  498. package/dist/utils/approval-response.d.ts +14 -0
  499. package/dist/utils/approval-response.d.ts.map +1 -0
  500. package/dist/utils/approval-response.js +21 -0
  501. package/dist/utils/approval-response.test.cjs +49 -0
  502. package/dist/utils/approval-response.test.d.ts +2 -0
  503. package/dist/utils/approval-response.test.d.ts.map +1 -0
  504. package/dist/utils/approval-response.test.js +55 -0
  505. package/dist/utils/approvalScope.cjs +12 -0
  506. package/dist/utils/approvalScope.d.ts.map +1 -1
  507. package/dist/utils/approvalScope.js +12 -0
  508. package/dist/utils/approvalScope.test.cjs +23 -0
  509. package/dist/utils/approvalScope.test.d.ts +2 -0
  510. package/dist/utils/approvalScope.test.d.ts.map +1 -0
  511. package/dist/utils/approvalScope.test.js +22 -0
  512. package/dist/utils/background-failure.cjs +51 -0
  513. package/dist/utils/background-failure.d.ts +12 -0
  514. package/dist/utils/background-failure.d.ts.map +1 -0
  515. package/dist/utils/background-failure.js +26 -0
  516. package/dist/utils/chatgpt-rate-limit.cjs +10 -0
  517. package/dist/utils/chatgpt-rate-limit.d.ts +9 -0
  518. package/dist/utils/chatgpt-rate-limit.d.ts.map +1 -1
  519. package/dist/utils/chatgpt-rate-limit.js +9 -0
  520. package/dist/utils/chatgpt-rate-limit.test.cjs +10 -0
  521. package/dist/utils/chatgpt-rate-limit.test.js +11 -0
  522. package/dist/utils/deck-state.cjs +107 -0
  523. package/dist/utils/deck-state.d.ts +79 -0
  524. package/dist/utils/deck-state.d.ts.map +1 -0
  525. package/dist/utils/deck-state.js +76 -0
  526. package/dist/utils/deck-state.test.cjs +208 -0
  527. package/dist/utils/deck-state.test.d.ts +2 -0
  528. package/dist/utils/deck-state.test.d.ts.map +1 -0
  529. package/dist/utils/deck-state.test.js +216 -0
  530. package/dist/utils/fault-block.cjs +37 -0
  531. package/dist/utils/fault-block.d.ts +13 -0
  532. package/dist/utils/fault-block.d.ts.map +1 -0
  533. package/dist/utils/fault-block.js +13 -0
  534. package/dist/utils/fault-block.test.cjs +23 -0
  535. package/dist/utils/fault-block.test.d.ts +2 -0
  536. package/dist/utils/fault-block.test.d.ts.map +1 -0
  537. package/dist/utils/fault-block.test.js +22 -0
  538. package/dist/utils/llm-provider-display.cjs +1 -1
  539. package/dist/utils/llm-provider-display.js +1 -1
  540. package/dist/utils/messageFormatting.cjs +26 -23
  541. package/dist/utils/messageFormatting.d.ts +5 -2
  542. package/dist/utils/messageFormatting.d.ts.map +1 -1
  543. package/dist/utils/messageFormatting.js +25 -21
  544. package/dist/utils/messageFormatting.test.cjs +34 -0
  545. package/dist/utils/messageFormatting.test.js +35 -1
  546. package/dist/utils/reasoning-variant.cjs +35 -0
  547. package/dist/utils/reasoning-variant.d.ts +13 -0
  548. package/dist/utils/reasoning-variant.d.ts.map +1 -0
  549. package/dist/utils/reasoning-variant.js +11 -0
  550. package/dist/utils/resize-reflow.cjs +119 -0
  551. package/dist/utils/resize-reflow.d.ts +18 -0
  552. package/dist/utils/resize-reflow.d.ts.map +1 -0
  553. package/dist/utils/resize-reflow.js +83 -0
  554. package/dist/utils/resize-reflow.test.cjs +100 -0
  555. package/dist/utils/resize-reflow.test.d.ts +2 -0
  556. package/dist/utils/resize-reflow.test.d.ts.map +1 -0
  557. package/dist/utils/resize-reflow.test.js +99 -0
  558. package/dist/utils/tool-step.cjs +183 -0
  559. package/dist/utils/tool-step.d.ts +28 -0
  560. package/dist/utils/tool-step.d.ts.map +1 -0
  561. package/dist/utils/tool-step.js +156 -0
  562. package/dist/utils/tool-step.test.cjs +263 -0
  563. package/dist/utils/tool-step.test.d.ts +2 -0
  564. package/dist/utils/tool-step.test.d.ts.map +1 -0
  565. package/dist/utils/tool-step.test.js +262 -0
  566. package/package.json +9 -5
  567. package/dist/components/BackgroundTasksPanel.cjs +0 -117
  568. package/dist/components/BackgroundTasksPanel.d.ts +0 -18
  569. package/dist/components/BackgroundTasksPanel.d.ts.map +0 -1
  570. package/dist/components/BackgroundTasksPanel.js +0 -93
@@ -23,6 +23,7 @@ __export(CustomInput_exports, {
23
23
  module.exports = __toCommonJS(CustomInput_exports);
24
24
  var import_jsx_runtime = require("react/jsx-runtime");
25
25
  var import_ink = require("ink");
26
+ var import_signal = require("../signal/index.js");
26
27
  function CustomInput({
27
28
  value,
28
29
  onChange,
@@ -66,12 +67,12 @@ function CustomInput({
66
67
  const firstChar = placeholder[0] || " ";
67
68
  const rest = placeholder.slice(1);
68
69
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { children: [
69
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "black", backgroundColor: "green", children: firstChar }),
70
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", children: rest })
70
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("bg"), backgroundColor: (0, import_signal.tone)("add"), children: firstChar }),
71
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: rest })
71
72
  ] });
72
73
  }
73
74
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { children: [
74
75
  value,
75
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "black", backgroundColor: "green", children: " " })
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("bg"), backgroundColor: (0, import_signal.tone)("add"), children: " " })
76
77
  ] });
77
78
  }
@@ -1 +1 @@
1
- {"version":3,"file":"CustomInput.d.ts","sourceRoot":"","sources":["../../src/components/CustomInput.tsx"],"names":[],"mappings":"AAEA,UAAU,gBAAgB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,YAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,iBAAiB,GACpB,EAAE,gBAAgB,2CAoElB"}
1
+ {"version":3,"file":"CustomInput.d.ts","sourceRoot":"","sources":["../../src/components/CustomInput.tsx"],"names":[],"mappings":"AAGA,UAAU,gBAAgB;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,WAAW,CAAC,EAChC,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,YAAoB,EACpB,YAAY,EACZ,YAAY,EACZ,iBAAiB,GACpB,EAAE,gBAAgB,2CAoElB"}
@@ -1,5 +1,6 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useInput, Text } from "ink";
3
+ import { tone } from "../signal/index.js";
3
4
  function CustomInput({
4
5
  value,
5
6
  onChange,
@@ -43,13 +44,13 @@ function CustomInput({
43
44
  const firstChar = placeholder[0] || " ";
44
45
  const rest = placeholder.slice(1);
45
46
  return /* @__PURE__ */ jsxs(Text, { children: [
46
- /* @__PURE__ */ jsx(Text, { color: "black", backgroundColor: "green", children: firstChar }),
47
- /* @__PURE__ */ jsx(Text, { color: "gray", children: rest })
47
+ /* @__PURE__ */ jsx(Text, { color: tone("bg"), backgroundColor: tone("add"), children: firstChar }),
48
+ /* @__PURE__ */ jsx(Text, { color: tone("dim"), children: rest })
48
49
  ] });
49
50
  }
50
51
  return /* @__PURE__ */ jsxs(Text, { children: [
51
52
  value,
52
- /* @__PURE__ */ jsx(Text, { color: "black", backgroundColor: "green", children: " " })
53
+ /* @__PURE__ */ jsx(Text, { color: tone("bg"), backgroundColor: tone("add"), children: " " })
53
54
  ] });
54
55
  }
55
56
  export {
@@ -0,0 +1,43 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __export = (target, all) => {
7
+ for (var name in all)
8
+ __defProp(target, name, { get: all[name], enumerable: true });
9
+ };
10
+ var __copyProps = (to, from, except, desc) => {
11
+ if (from && typeof from === "object" || typeof from === "function") {
12
+ for (let key of __getOwnPropNames(from))
13
+ if (!__hasOwnProp.call(to, key) && key !== except)
14
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
+ }
16
+ return to;
17
+ };
18
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
+ var DeckArea_exports = {};
20
+ __export(DeckArea_exports, {
21
+ DeckArea: () => DeckArea
22
+ });
23
+ module.exports = __toCommonJS(DeckArea_exports);
24
+ var import_jsx_runtime = require("react/jsx-runtime");
25
+ var import_signal = require("../signal/index.js");
26
+ var import_useDeckState = require("../hooks/useDeckState.js");
27
+ var import_deck_state = require("../utils/deck-state.js");
28
+ function DeckArea({ children, ...input }) {
29
+ const state = (0, import_useDeckState.useDeckState)(input);
30
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
31
+ import_signal.Deck,
32
+ {
33
+ state,
34
+ collapsed: (0, import_deck_state.deckCollapsed)(input.ui.activeOverlay),
35
+ paused: input.ui.copyModeEnabled,
36
+ children
37
+ }
38
+ );
39
+ }
40
+ // Annotate the CommonJS export names for ESM import in node:
41
+ 0 && (module.exports = {
42
+ DeckArea
43
+ });
@@ -0,0 +1,14 @@
1
+ /**
2
+ * The Signal deck wired to the CLI: the band (wordmark, trace, status) above the input.
3
+ * Mounted only on the Signal palette, so the legacy screens don't pay for its git and credit
4
+ * lookups. Focused overlays budget for the whole screen, so the band collapses under them
5
+ * while the Deck stays mounted, which keeps the input in place in the tree. It stays up during
6
+ * an approval, where its mode says the agent is waiting.
7
+ */
8
+ import type { ReactNode } from 'react';
9
+ import { type DeckStateInput } from '../hooks/useDeckState.js';
10
+ export interface DeckAreaProps extends DeckStateInput {
11
+ children: ReactNode;
12
+ }
13
+ export declare function DeckArea({ children, ...input }: DeckAreaProps): import("react/jsx-runtime").JSX.Element;
14
+ //# sourceMappingURL=DeckArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DeckArea.d.ts","sourceRoot":"","sources":["../../src/components/DeckArea.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAgB,KAAK,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAG7E,MAAM,WAAW,aAAc,SAAQ,cAAc;IACjD,QAAQ,EAAE,SAAS,CAAC;CACvB;AAED,wBAAgB,QAAQ,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,aAAa,2CAW7D"}
@@ -0,0 +1,19 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { Deck } from "../signal/index.js";
3
+ import { useDeckState } from "../hooks/useDeckState.js";
4
+ import { deckCollapsed } from "../utils/deck-state.js";
5
+ function DeckArea({ children, ...input }) {
6
+ const state = useDeckState(input);
7
+ return /* @__PURE__ */ jsx(
8
+ Deck,
9
+ {
10
+ state,
11
+ collapsed: deckCollapsed(input.ui.activeOverlay),
12
+ paused: input.ui.copyModeEnabled,
13
+ children
14
+ }
15
+ );
16
+ }
17
+ export {
18
+ DeckArea
19
+ };
@@ -24,6 +24,7 @@ module.exports = __toCommonJS(EditableMultiLineInput_exports);
24
24
  var import_jsx_runtime = require("react/jsx-runtime");
25
25
  var import_react = require("react");
26
26
  var import_ink = require("ink");
27
+ var import_signal = require("../signal/index.js");
27
28
  function EditableMultiLineInput({
28
29
  value,
29
30
  onChange,
@@ -117,7 +118,7 @@ function EditableMultiLineInput({
117
118
  const prefix = lineIdx === 0 ? "\xBB " : " ";
118
119
  if (cursorCol < 0) {
119
120
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { children: [
120
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "cyan", children: prefix }),
121
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("teal"), children: prefix }),
121
122
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: line || " " })
122
123
  ] }, lineIdx);
123
124
  }
@@ -125,27 +126,27 @@ function EditableMultiLineInput({
125
126
  const atCursor = line.charAt(cursorCol) || " ";
126
127
  const after = line.slice(cursorCol + 1);
127
128
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { children: [
128
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "cyan", children: prefix }),
129
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("teal"), children: prefix }),
129
130
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: before }),
130
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { backgroundColor: "green", color: "black", children: atCursor }),
131
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { backgroundColor: (0, import_signal.tone)("add"), color: (0, import_signal.tone)("bg"), children: atCursor }),
131
132
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { children: after })
132
133
  ] }, lineIdx);
133
134
  };
134
135
  if (!value && placeholder) {
135
136
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", children: [
136
137
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { children: [
137
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "cyan", children: "\xBB " }),
138
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { backgroundColor: "green", color: "black", children: " " }),
139
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: "gray", children: [
138
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("teal"), children: "\xBB " }),
139
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { backgroundColor: (0, import_signal.tone)("add"), color: (0, import_signal.tone)("bg"), children: " " }),
140
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: [
140
141
  " ",
141
142
  placeholder
142
143
  ] })
143
144
  ] }),
144
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", children: "Multi-line mode \u2022 Cmd/Ctrl+Enter to submit \u2022 Shift+Enter for single-line" })
145
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: "Multi-line mode \u2022 Cmd/Ctrl+Enter to submit \u2022 Shift+Enter for single-line" })
145
146
  ] });
146
147
  }
147
148
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", children: [
148
149
  lines.map((line, idx) => renderLine(line, idx)),
149
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", children: "Multi-line mode \u2022 Cmd/Ctrl+Enter to submit \u2022 Shift+Enter for single-line" })
150
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: "Multi-line mode \u2022 Cmd/Ctrl+Enter to submit \u2022 Shift+Enter for single-line" })
150
151
  ] });
151
152
  }
@@ -1 +1 @@
1
- {"version":3,"file":"EditableMultiLineInput.d.ts","sourceRoot":"","sources":["../../src/components/EditableMultiLineInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAKH,UAAU,2BAA2B;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC3C,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,YAAoB,EACpB,kBAAkB,GACrB,EAAE,2BAA2B,2CAoK7B"}
1
+ {"version":3,"file":"EditableMultiLineInput.d.ts","sourceRoot":"","sources":["../../src/components/EditableMultiLineInput.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AAMH,UAAU,2BAA2B;IACjC,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAC;CACnC;AAED;;;GAGG;AACH,MAAM,CAAC,OAAO,UAAU,sBAAsB,CAAC,EAC3C,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,WAAW,EACX,YAAoB,EACpB,kBAAkB,GACrB,EAAE,2BAA2B,2CAoK7B"}
@@ -1,6 +1,7 @@
1
1
  import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useState, useEffect, useMemo } from "react";
3
3
  import { Box, Text, useInput } from "ink";
4
+ import { tone } from "../signal/index.js";
4
5
  function EditableMultiLineInput({
5
6
  value,
6
7
  onChange,
@@ -94,7 +95,7 @@ function EditableMultiLineInput({
94
95
  const prefix = lineIdx === 0 ? "\xBB " : " ";
95
96
  if (cursorCol < 0) {
96
97
  return /* @__PURE__ */ jsxs(Text, { children: [
97
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: prefix }),
98
+ /* @__PURE__ */ jsx(Text, { color: tone("teal"), children: prefix }),
98
99
  /* @__PURE__ */ jsx(Text, { children: line || " " })
99
100
  ] }, lineIdx);
100
101
  }
@@ -102,28 +103,28 @@ function EditableMultiLineInput({
102
103
  const atCursor = line.charAt(cursorCol) || " ";
103
104
  const after = line.slice(cursorCol + 1);
104
105
  return /* @__PURE__ */ jsxs(Text, { children: [
105
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: prefix }),
106
+ /* @__PURE__ */ jsx(Text, { color: tone("teal"), children: prefix }),
106
107
  /* @__PURE__ */ jsx(Text, { children: before }),
107
- /* @__PURE__ */ jsx(Text, { backgroundColor: "green", color: "black", children: atCursor }),
108
+ /* @__PURE__ */ jsx(Text, { backgroundColor: tone("add"), color: tone("bg"), children: atCursor }),
108
109
  /* @__PURE__ */ jsx(Text, { children: after })
109
110
  ] }, lineIdx);
110
111
  };
111
112
  if (!value && placeholder) {
112
113
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
113
114
  /* @__PURE__ */ jsxs(Text, { children: [
114
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: "\xBB " }),
115
- /* @__PURE__ */ jsx(Text, { backgroundColor: "green", color: "black", children: " " }),
116
- /* @__PURE__ */ jsxs(Text, { color: "gray", children: [
115
+ /* @__PURE__ */ jsx(Text, { color: tone("teal"), children: "\xBB " }),
116
+ /* @__PURE__ */ jsx(Text, { backgroundColor: tone("add"), color: tone("bg"), children: " " }),
117
+ /* @__PURE__ */ jsxs(Text, { color: tone("dim"), children: [
117
118
  " ",
118
119
  placeholder
119
120
  ] })
120
121
  ] }),
121
- /* @__PURE__ */ jsx(Text, { color: "gray", children: "Multi-line mode \u2022 Cmd/Ctrl+Enter to submit \u2022 Shift+Enter for single-line" })
122
+ /* @__PURE__ */ jsx(Text, { color: tone("dim"), children: "Multi-line mode \u2022 Cmd/Ctrl+Enter to submit \u2022 Shift+Enter for single-line" })
122
123
  ] });
123
124
  }
124
125
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", children: [
125
126
  lines.map((line, idx) => renderLine(line, idx)),
126
- /* @__PURE__ */ jsx(Text, { color: "gray", children: "Multi-line mode \u2022 Cmd/Ctrl+Enter to submit \u2022 Shift+Enter for single-line" })
127
+ /* @__PURE__ */ jsx(Text, { color: tone("dim"), children: "Multi-line mode \u2022 Cmd/Ctrl+Enter to submit \u2022 Shift+Enter for single-line" })
127
128
  ] });
128
129
  }
129
130
  export {
@@ -37,6 +37,7 @@ var import_ink = require("ink");
37
37
  var import_wrap_ansi = __toESM(require("wrap-ansi"), 1);
38
38
  var import_useTerminalSize = require("../hooks/useTerminalSize.js");
39
39
  var import_elicitationSchema = require("../utils/elicitationSchema.js");
40
+ var import_signal = require("../signal/index.js");
40
41
  function hasOwn(obj, key) {
41
42
  return Object.prototype.hasOwnProperty.call(obj, key);
42
43
  }
@@ -71,7 +72,9 @@ const ElicitationForm = (0, import_react.forwardRef)(
71
72
  const desired = Math.max(minViewportHeight, Math.floor(terminalRows * 0.6));
72
73
  return Math.min(maxHeight, desired);
73
74
  }, [footerHeight, maxHeaderHeight, minContentHeight, terminalRows]);
74
- const availableWidth = Math.max(20, terminalColumns - 2);
75
+ const { palette, glyphs } = (0, import_signal.useCaps)();
76
+ const signal = palette === "signal";
77
+ const availableWidth = Math.max(20, terminalColumns - (signal ? 6 : 2));
75
78
  const fields = (0, import_react.useMemo)(() => {
76
79
  return (0, import_elicitationSchema.parseElicitationSchema)(metadata.schema);
77
80
  }, [metadata.schema]);
@@ -348,6 +351,10 @@ const ElicitationForm = (0, import_react.forwardRef)(
348
351
  }
349
352
  return true;
350
353
  }
354
+ if (signal && /^[1-9]$/.test(input) && Number(input) <= values.length) {
355
+ setEnumIndex(Number(input) - 1);
356
+ return true;
357
+ }
351
358
  break;
352
359
  }
353
360
  case "array-enum": {
@@ -439,6 +446,7 @@ const ElicitationForm = (0, import_react.forwardRef)(
439
446
  }
440
447
  }),
441
448
  [
449
+ signal,
442
450
  activeField,
443
451
  activeFieldIndex,
444
452
  arraySelections,
@@ -460,7 +468,7 @@ const ElicitationForm = (0, import_react.forwardRef)(
460
468
  ]
461
469
  );
462
470
  if (fields.length === 0) {
463
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "red", children: "Invalid form schema" }) });
471
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("red"), children: "Invalid form schema" }) });
464
472
  }
465
473
  const isAnswered = (field) => {
466
474
  if (field.type === "boolean") return hasOwn(formData, field.name);
@@ -475,7 +483,7 @@ const ElicitationForm = (0, import_react.forwardRef)(
475
483
  return value2 !== void 0 && value2 !== null && value2 !== "";
476
484
  };
477
485
  if (!isReviewing && !activeField) {
478
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "red", children: "Invalid form state" }) });
486
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("red"), children: "Invalid form state" }) });
479
487
  }
480
488
  const value = activeField ? formData[activeField.name] : void 0;
481
489
  const currentInput = activeField && hasOwn(draftInputs, activeField.name) ? draftInputs[activeField.name] ?? "" : value === void 0 || value === null ? "" : String(value);
@@ -488,7 +496,7 @@ const ElicitationForm = (0, import_react.forwardRef)(
488
496
  overflowY: "scroll",
489
497
  overflowX: "hidden",
490
498
  scrollTop: reviewScrollTop,
491
- scrollbarThumbColor: "gray",
499
+ scrollbarThumbColor: (0, import_signal.tone)("dim"),
492
500
  flexDirection: "column",
493
501
  height: contentHeight,
494
502
  paddingRight: 1,
@@ -502,10 +510,10 @@ const ElicitationForm = (0, import_react.forwardRef)(
502
510
  }
503
511
  if (!activeField) return null;
504
512
  if (activeField.type === "string" || activeField.type === "number") {
505
- return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { height: contentHeight, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { wrap: "truncate-end", children: [
506
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "cyan", children: "> " }),
507
- currentInput || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", children: "Type your answer\u2026" }),
508
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "cyan", children: "\u258B" })
513
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Box, { height: signal ? 1 : contentHeight, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Text, { wrap: "truncate-end", children: [
514
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("teal"), children: "> " }),
515
+ currentInput || /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), children: "Type your answer\u2026" }),
516
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("teal"), children: "\u258B" })
509
517
  ] }) });
510
518
  }
511
519
  const options = [];
@@ -550,18 +558,37 @@ const ElicitationForm = (0, import_react.forwardRef)(
550
558
  {
551
559
  overflowY: "scroll",
552
560
  overflowX: "hidden",
553
- scrollbarThumbColor: "gray",
554
- height: contentHeight,
561
+ scrollbarThumbColor: (0, import_signal.tone)("dim"),
562
+ height: signal ? Math.min(contentHeight, options.length) : contentHeight,
555
563
  scrollTop: targetScrollTop,
556
564
  flexDirection: "column",
557
565
  paddingRight: 1,
558
- children: options.map((opt) => {
566
+ children: options.map((opt, index) => {
567
+ if (signal) {
568
+ const check = activeField.type === "array-enum" ? opt.isSelected ? "[\u2713] " : "[ ] " : "";
569
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
570
+ import_ink.Text,
571
+ {
572
+ bold: opt.isFocused,
573
+ color: (0, import_signal.tone)(opt.isFocused ? "hi" : "fg"),
574
+ ...opt.isFocused && { backgroundColor: (0, import_signal.tone)("sel") },
575
+ wrap: "truncate-end",
576
+ children: [
577
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { bold: true, color: (0, import_signal.tone)("amber"), children: opt.isFocused ? (0, import_signal.glyphText)("\u203A ", glyphs) : " " }),
578
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { bold: true, color: (0, import_signal.tone)(opt.isFocused ? "amber" : "dim"), children: activeField.type === "enum" && index < 9 ? `${index + 1} ` : "" }),
579
+ (0, import_signal.glyphText)(check, glyphs),
580
+ opt.label
581
+ ]
582
+ },
583
+ opt.key
584
+ );
585
+ }
559
586
  const prefix = opt.isFocused ? "\u25B6 " : " ";
560
587
  const mark = activeField.type === "array-enum" ? opt.isSelected ? "[\u2713] " : "[ ] " : "";
561
588
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
562
589
  import_ink.Text,
563
590
  {
564
- color: opt.isFocused ? "cyan" : "gray",
591
+ color: opt.isFocused ? (0, import_signal.tone)("teal") : (0, import_signal.tone)("dim"),
565
592
  wrap: "truncate-end",
566
593
  children: [
567
594
  prefix,
@@ -603,15 +630,48 @@ const ElicitationForm = (0, import_react.forwardRef)(
603
630
  const questionLines = wrapClampedLines(questionText, questionLineCount);
604
631
  const helpLines = wrapClampedLines(helpText, helpLineCount);
605
632
  const errorLines = wrapClampedLines(errorLineText, errorLineCount);
633
+ if (signal) {
634
+ const position = fields.length > 1 ? ` \xB7 ${activeFieldIndex + 1} of ${fields.length}` : "";
635
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
636
+ import_signal.GateFrame,
637
+ {
638
+ title: isReviewing ? "QUESTION \xB7 Review your answers" : `QUESTION${position} \xB7 ${questionLines.filter(Boolean).join(" ")}`,
639
+ hint: hintLine.replaceAll(" \u2022 ", " \xB7 "),
640
+ children: [
641
+ helpLines.filter(Boolean).map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), wrap: "truncate-end", children: line }, `help-${index}`)),
642
+ errorLines.filter(Boolean).map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("red"), wrap: "truncate-end", children: line }, `error-${index}`)),
643
+ renderContent()
644
+ ]
645
+ }
646
+ );
647
+ }
606
648
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_ink.Box, { flexDirection: "column", paddingX: 0, height: viewportHeight, children: [
607
- headerLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "yellowBright", bold: true, wrap: "truncate-end", children: line || " " }, `header-${index}`)),
608
- !isReviewing && stepLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", dimColor: true, wrap: "truncate-end", children: line || " " }, `step-${index}`)),
649
+ headerLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("amber"), bold: true, wrap: "truncate-end", children: line || " " }, `header-${index}`)),
650
+ !isReviewing && stepLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
651
+ import_ink.Text,
652
+ {
653
+ color: (0, import_signal.tone)("dim"),
654
+ dimColor: true,
655
+ wrap: "truncate-end",
656
+ children: line || " "
657
+ },
658
+ `step-${index}`
659
+ )),
609
660
  Array.from({ length: spacerAfterStepLineCount }, (_, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { wrap: "truncate-end", children: " " }, `spacer-step-${index}`)),
610
- !isReviewing && questionLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "white", bold: true, wrap: "truncate-end", children: line || " " }, `question-${index}`)),
611
- !isReviewing && helpLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", dimColor: true, wrap: "truncate-end", children: line || " " }, `help-${index}`)),
612
- !isReviewing && errorLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "red", wrap: "truncate-end", children: line || " " }, `error-${index}`)),
661
+ !isReviewing && questionLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("hi"), bold: true, wrap: "truncate-end", children: line || " " }, `question-${index}`)),
662
+ !isReviewing && helpLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
663
+ import_ink.Text,
664
+ {
665
+ color: (0, import_signal.tone)("dim"),
666
+ dimColor: true,
667
+ wrap: "truncate-end",
668
+ children: line || " "
669
+ },
670
+ `help-${index}`
671
+ )),
672
+ !isReviewing && errorLines.map((line, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("red"), wrap: "truncate-end", children: line || " " }, `error-${index}`)),
613
673
  renderContent(),
614
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: "gray", dimColor: true, wrap: "truncate-end", children: hintLine })
674
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_ink.Text, { color: (0, import_signal.tone)("dim"), dimColor: true, wrap: "truncate-end", children: hintLine })
615
675
  ] });
616
676
  }
617
677
  );
@@ -1 +1 @@
1
- {"version":3,"file":"ElicitationForm.d.ts","sourceRoot":"","sources":["../../src/components/ElicitationForm.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAA0E,MAAM,OAAO,CAAC;AAG/F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAI5D,MAAM,WAAW,qBAAqB;IAClC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED,UAAU,oBAAoB;IAC1B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACtD,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAkBD;;GAEG;AACH,eAAO,MAAM,eAAe,oGA6uB3B,CAAC"}
1
+ {"version":3,"file":"ElicitationForm.d.ts","sourceRoot":"","sources":["../../src/components/ElicitationForm.tsx"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAA0E,MAAM,OAAO,CAAC;AAG/F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,kCAAkC,CAAC;AAK5D,MAAM,WAAW,qBAAqB;IAClC,WAAW,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,KAAK,OAAO,CAAC;CACrD;AAED,UAAU,oBAAoB;IAC1B,QAAQ,EAAE,mBAAmB,CAAC;IAC9B,QAAQ,EAAE,CAAC,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;IACtD,QAAQ,EAAE,MAAM,IAAI,CAAC;CACxB;AAkBD;;GAEG;AACH,eAAO,MAAM,eAAe,oGAuzB3B,CAAC"}
@@ -4,6 +4,7 @@ import { Box, Text } from "ink";
4
4
  import wrapAnsi from "wrap-ansi";
5
5
  import { useTerminalSize } from "../hooks/useTerminalSize.js";
6
6
  import { parseElicitationSchema } from "../utils/elicitationSchema.js";
7
+ import { GateFrame, glyphText, tone, useCaps } from "../signal/index.js";
7
8
  function hasOwn(obj, key) {
8
9
  return Object.prototype.hasOwnProperty.call(obj, key);
9
10
  }
@@ -38,7 +39,9 @@ const ElicitationForm = forwardRef(
38
39
  const desired = Math.max(minViewportHeight, Math.floor(terminalRows * 0.6));
39
40
  return Math.min(maxHeight, desired);
40
41
  }, [footerHeight, maxHeaderHeight, minContentHeight, terminalRows]);
41
- const availableWidth = Math.max(20, terminalColumns - 2);
42
+ const { palette, glyphs } = useCaps();
43
+ const signal = palette === "signal";
44
+ const availableWidth = Math.max(20, terminalColumns - (signal ? 6 : 2));
42
45
  const fields = useMemo(() => {
43
46
  return parseElicitationSchema(metadata.schema);
44
47
  }, [metadata.schema]);
@@ -315,6 +318,10 @@ const ElicitationForm = forwardRef(
315
318
  }
316
319
  return true;
317
320
  }
321
+ if (signal && /^[1-9]$/.test(input) && Number(input) <= values.length) {
322
+ setEnumIndex(Number(input) - 1);
323
+ return true;
324
+ }
318
325
  break;
319
326
  }
320
327
  case "array-enum": {
@@ -406,6 +413,7 @@ const ElicitationForm = forwardRef(
406
413
  }
407
414
  }),
408
415
  [
416
+ signal,
409
417
  activeField,
410
418
  activeFieldIndex,
411
419
  arraySelections,
@@ -427,7 +435,7 @@ const ElicitationForm = forwardRef(
427
435
  ]
428
436
  );
429
437
  if (fields.length === 0) {
430
- return /* @__PURE__ */ jsx(Box, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ jsx(Text, { color: "red", children: "Invalid form schema" }) });
438
+ return /* @__PURE__ */ jsx(Box, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ jsx(Text, { color: tone("red"), children: "Invalid form schema" }) });
431
439
  }
432
440
  const isAnswered = (field) => {
433
441
  if (field.type === "boolean") return hasOwn(formData, field.name);
@@ -442,7 +450,7 @@ const ElicitationForm = forwardRef(
442
450
  return value2 !== void 0 && value2 !== null && value2 !== "";
443
451
  };
444
452
  if (!isReviewing && !activeField) {
445
- return /* @__PURE__ */ jsx(Box, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ jsx(Text, { color: "red", children: "Invalid form state" }) });
453
+ return /* @__PURE__ */ jsx(Box, { flexDirection: "column", paddingX: 1, children: /* @__PURE__ */ jsx(Text, { color: tone("red"), children: "Invalid form state" }) });
446
454
  }
447
455
  const value = activeField ? formData[activeField.name] : void 0;
448
456
  const currentInput = activeField && hasOwn(draftInputs, activeField.name) ? draftInputs[activeField.name] ?? "" : value === void 0 || value === null ? "" : String(value);
@@ -455,7 +463,7 @@ const ElicitationForm = forwardRef(
455
463
  overflowY: "scroll",
456
464
  overflowX: "hidden",
457
465
  scrollTop: reviewScrollTop,
458
- scrollbarThumbColor: "gray",
466
+ scrollbarThumbColor: tone("dim"),
459
467
  flexDirection: "column",
460
468
  height: contentHeight,
461
469
  paddingRight: 1,
@@ -469,10 +477,10 @@ const ElicitationForm = forwardRef(
469
477
  }
470
478
  if (!activeField) return null;
471
479
  if (activeField.type === "string" || activeField.type === "number") {
472
- return /* @__PURE__ */ jsx(Box, { height: contentHeight, children: /* @__PURE__ */ jsxs(Text, { wrap: "truncate-end", children: [
473
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: "> " }),
474
- currentInput || /* @__PURE__ */ jsx(Text, { color: "gray", children: "Type your answer\u2026" }),
475
- /* @__PURE__ */ jsx(Text, { color: "cyan", children: "\u258B" })
480
+ return /* @__PURE__ */ jsx(Box, { height: signal ? 1 : contentHeight, children: /* @__PURE__ */ jsxs(Text, { wrap: "truncate-end", children: [
481
+ /* @__PURE__ */ jsx(Text, { color: tone("teal"), children: "> " }),
482
+ currentInput || /* @__PURE__ */ jsx(Text, { color: tone("dim"), children: "Type your answer\u2026" }),
483
+ /* @__PURE__ */ jsx(Text, { color: tone("teal"), children: "\u258B" })
476
484
  ] }) });
477
485
  }
478
486
  const options = [];
@@ -517,18 +525,37 @@ const ElicitationForm = forwardRef(
517
525
  {
518
526
  overflowY: "scroll",
519
527
  overflowX: "hidden",
520
- scrollbarThumbColor: "gray",
521
- height: contentHeight,
528
+ scrollbarThumbColor: tone("dim"),
529
+ height: signal ? Math.min(contentHeight, options.length) : contentHeight,
522
530
  scrollTop: targetScrollTop,
523
531
  flexDirection: "column",
524
532
  paddingRight: 1,
525
- children: options.map((opt) => {
533
+ children: options.map((opt, index) => {
534
+ if (signal) {
535
+ const check = activeField.type === "array-enum" ? opt.isSelected ? "[\u2713] " : "[ ] " : "";
536
+ return /* @__PURE__ */ jsxs(
537
+ Text,
538
+ {
539
+ bold: opt.isFocused,
540
+ color: tone(opt.isFocused ? "hi" : "fg"),
541
+ ...opt.isFocused && { backgroundColor: tone("sel") },
542
+ wrap: "truncate-end",
543
+ children: [
544
+ /* @__PURE__ */ jsx(Text, { bold: true, color: tone("amber"), children: opt.isFocused ? glyphText("\u203A ", glyphs) : " " }),
545
+ /* @__PURE__ */ jsx(Text, { bold: true, color: tone(opt.isFocused ? "amber" : "dim"), children: activeField.type === "enum" && index < 9 ? `${index + 1} ` : "" }),
546
+ glyphText(check, glyphs),
547
+ opt.label
548
+ ]
549
+ },
550
+ opt.key
551
+ );
552
+ }
526
553
  const prefix = opt.isFocused ? "\u25B6 " : " ";
527
554
  const mark = activeField.type === "array-enum" ? opt.isSelected ? "[\u2713] " : "[ ] " : "";
528
555
  return /* @__PURE__ */ jsxs(
529
556
  Text,
530
557
  {
531
- color: opt.isFocused ? "cyan" : "gray",
558
+ color: opt.isFocused ? tone("teal") : tone("dim"),
532
559
  wrap: "truncate-end",
533
560
  children: [
534
561
  prefix,
@@ -570,15 +597,48 @@ const ElicitationForm = forwardRef(
570
597
  const questionLines = wrapClampedLines(questionText, questionLineCount);
571
598
  const helpLines = wrapClampedLines(helpText, helpLineCount);
572
599
  const errorLines = wrapClampedLines(errorLineText, errorLineCount);
600
+ if (signal) {
601
+ const position = fields.length > 1 ? ` \xB7 ${activeFieldIndex + 1} of ${fields.length}` : "";
602
+ return /* @__PURE__ */ jsxs(
603
+ GateFrame,
604
+ {
605
+ title: isReviewing ? "QUESTION \xB7 Review your answers" : `QUESTION${position} \xB7 ${questionLines.filter(Boolean).join(" ")}`,
606
+ hint: hintLine.replaceAll(" \u2022 ", " \xB7 "),
607
+ children: [
608
+ helpLines.filter(Boolean).map((line, index) => /* @__PURE__ */ jsx(Text, { color: tone("dim"), wrap: "truncate-end", children: line }, `help-${index}`)),
609
+ errorLines.filter(Boolean).map((line, index) => /* @__PURE__ */ jsx(Text, { color: tone("red"), wrap: "truncate-end", children: line }, `error-${index}`)),
610
+ renderContent()
611
+ ]
612
+ }
613
+ );
614
+ }
573
615
  return /* @__PURE__ */ jsxs(Box, { flexDirection: "column", paddingX: 0, height: viewportHeight, children: [
574
- headerLines.map((line, index) => /* @__PURE__ */ jsx(Text, { color: "yellowBright", bold: true, wrap: "truncate-end", children: line || " " }, `header-${index}`)),
575
- !isReviewing && stepLines.map((line, index) => /* @__PURE__ */ jsx(Text, { color: "gray", dimColor: true, wrap: "truncate-end", children: line || " " }, `step-${index}`)),
616
+ headerLines.map((line, index) => /* @__PURE__ */ jsx(Text, { color: tone("amber"), bold: true, wrap: "truncate-end", children: line || " " }, `header-${index}`)),
617
+ !isReviewing && stepLines.map((line, index) => /* @__PURE__ */ jsx(
618
+ Text,
619
+ {
620
+ color: tone("dim"),
621
+ dimColor: true,
622
+ wrap: "truncate-end",
623
+ children: line || " "
624
+ },
625
+ `step-${index}`
626
+ )),
576
627
  Array.from({ length: spacerAfterStepLineCount }, (_, index) => /* @__PURE__ */ jsx(Text, { wrap: "truncate-end", children: " " }, `spacer-step-${index}`)),
577
- !isReviewing && questionLines.map((line, index) => /* @__PURE__ */ jsx(Text, { color: "white", bold: true, wrap: "truncate-end", children: line || " " }, `question-${index}`)),
578
- !isReviewing && helpLines.map((line, index) => /* @__PURE__ */ jsx(Text, { color: "gray", dimColor: true, wrap: "truncate-end", children: line || " " }, `help-${index}`)),
579
- !isReviewing && errorLines.map((line, index) => /* @__PURE__ */ jsx(Text, { color: "red", wrap: "truncate-end", children: line || " " }, `error-${index}`)),
628
+ !isReviewing && questionLines.map((line, index) => /* @__PURE__ */ jsx(Text, { color: tone("hi"), bold: true, wrap: "truncate-end", children: line || " " }, `question-${index}`)),
629
+ !isReviewing && helpLines.map((line, index) => /* @__PURE__ */ jsx(
630
+ Text,
631
+ {
632
+ color: tone("dim"),
633
+ dimColor: true,
634
+ wrap: "truncate-end",
635
+ children: line || " "
636
+ },
637
+ `help-${index}`
638
+ )),
639
+ !isReviewing && errorLines.map((line, index) => /* @__PURE__ */ jsx(Text, { color: tone("red"), wrap: "truncate-end", children: line || " " }, `error-${index}`)),
580
640
  renderContent(),
581
- /* @__PURE__ */ jsx(Text, { color: "gray", dimColor: true, wrap: "truncate-end", children: hintLine })
641
+ /* @__PURE__ */ jsx(Text, { color: tone("dim"), dimColor: true, wrap: "truncate-end", children: hintLine })
582
642
  ] });
583
643
  }
584
644
  );