@deepseek-harness-tui/dsh-tui 0.6.0 → 0.7.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 (379) hide show
  1. package/README.md +74 -21
  2. package/bin/dsh-tui.js +115 -25
  3. package/cordis.patch.yml +69 -17
  4. package/cordis.yml +50 -12
  5. package/lib/types/activityPrefs.d.ts +1 -1
  6. package/lib/types/activityPrefs.js +3 -3
  7. package/lib/types/cc/figures.d.ts +27 -20
  8. package/lib/types/cc/figures.d.ts.map +1 -1
  9. package/lib/types/cc/figures.js +43 -34
  10. package/lib/types/cc/format.d.ts +18 -9
  11. package/lib/types/cc/format.d.ts.map +1 -1
  12. package/lib/types/cc/format.js +26 -18
  13. package/lib/types/cc/markdown.d.ts +31 -16
  14. package/lib/types/cc/markdown.d.ts.map +1 -1
  15. package/lib/types/cc/markdown.js +283 -260
  16. package/lib/types/cc/terminal.d.ts +10 -7
  17. package/lib/types/cc/terminal.d.ts.map +1 -1
  18. package/lib/types/cc/terminal.js +62 -50
  19. package/lib/types/command-trees.d.ts +3 -0
  20. package/lib/types/command-trees.d.ts.map +1 -0
  21. package/lib/types/command-trees.js +4 -0
  22. package/lib/types/commands.d.ts +37 -1
  23. package/lib/types/commands.d.ts.map +1 -1
  24. package/lib/types/commands.js +68 -3
  25. package/lib/types/components/ActivityLine.d.ts +1 -1
  26. package/lib/types/components/ActivityLine.d.ts.map +1 -1
  27. package/lib/types/components/ActivityPicker.d.ts.map +1 -1
  28. package/lib/types/components/ActivityPicker.js +3 -4
  29. package/lib/types/components/BtwPanel.d.ts +16 -0
  30. package/lib/types/components/BtwPanel.d.ts.map +1 -0
  31. package/lib/types/components/BtwPanel.js +47 -0
  32. package/lib/types/components/CommandSuggestions.d.ts +4 -2
  33. package/lib/types/components/CommandSuggestions.d.ts.map +1 -1
  34. package/lib/types/components/CommandSuggestions.js +2 -2
  35. package/lib/types/components/EffortSlider.d.ts +15 -0
  36. package/lib/types/components/EffortSlider.d.ts.map +1 -0
  37. package/lib/types/components/EffortSlider.js +17 -0
  38. package/lib/types/components/GoalTodoPanel.d.ts +1 -1
  39. package/lib/types/components/GoalTodoPanel.d.ts.map +1 -1
  40. package/lib/types/components/HelpMenu.d.ts +5 -2
  41. package/lib/types/components/HelpMenu.d.ts.map +1 -1
  42. package/lib/types/components/HelpMenu.js +8 -3
  43. package/lib/types/components/HistorySearchDialog.d.ts +1 -1
  44. package/lib/types/components/HistorySearchDialog.d.ts.map +1 -1
  45. package/lib/types/components/HistorySearchDialog.js +21 -10
  46. package/lib/types/components/InterruptedByUser.d.ts +2 -2
  47. package/lib/types/components/InterruptedByUser.d.ts.map +1 -1
  48. package/lib/types/components/InterruptedByUser.js +4 -3
  49. package/lib/types/components/LoadedContextPanel.d.ts +1 -1
  50. package/lib/types/components/LoadedContextPanel.d.ts.map +1 -1
  51. package/lib/types/components/LogoV2.d.ts.map +1 -1
  52. package/lib/types/components/LogoV2.js +2 -1
  53. package/lib/types/components/Markdown.d.ts +11 -11
  54. package/lib/types/components/Markdown.d.ts.map +1 -1
  55. package/lib/types/components/Markdown.js +63 -57
  56. package/lib/types/components/MarkdownTable.d.ts +1 -1
  57. package/lib/types/components/MarkdownTable.js +2 -2
  58. package/lib/types/components/MessageList.d.ts +10 -2
  59. package/lib/types/components/MessageList.d.ts.map +1 -1
  60. package/lib/types/components/MessageList.js +17 -10
  61. package/lib/types/components/ModelPicker.d.ts +4 -1
  62. package/lib/types/components/ModelPicker.d.ts.map +1 -1
  63. package/lib/types/components/ModelPicker.js +16 -4
  64. package/lib/types/components/OverlayAbove.d.ts +20 -0
  65. package/lib/types/components/OverlayAbove.d.ts.map +1 -0
  66. package/lib/types/components/OverlayAbove.js +18 -0
  67. package/lib/types/components/PresetPicker.d.ts +1 -1
  68. package/lib/types/components/PresetPicker.d.ts.map +1 -1
  69. package/lib/types/components/PresetPicker.js +2 -3
  70. package/lib/types/components/PromptInput.d.ts +5 -4
  71. package/lib/types/components/PromptInput.d.ts.map +1 -1
  72. package/lib/types/components/PromptInput.js +186 -39
  73. package/lib/types/components/ResumePicker.d.ts +15 -4
  74. package/lib/types/components/ResumePicker.d.ts.map +1 -1
  75. package/lib/types/components/ResumePicker.js +25 -9
  76. package/lib/types/components/RewindPicker.d.ts +1 -1
  77. package/lib/types/components/RewindPicker.d.ts.map +1 -1
  78. package/lib/types/components/RewindPicker.js +14 -5
  79. package/lib/types/components/SearchBox.d.ts +1 -1
  80. package/lib/types/components/SearchBox.js +1 -1
  81. package/lib/types/components/Spinner/GlimmerMessage.d.ts +1 -2
  82. package/lib/types/components/Spinner/GlimmerMessage.d.ts.map +1 -1
  83. package/lib/types/components/Spinner/GlimmerMessage.js +1 -2
  84. package/lib/types/components/Spinner/SpinnerAnimationRow.d.ts +1 -1
  85. package/lib/types/components/Spinner/SpinnerAnimationRow.js +2 -2
  86. package/lib/types/components/Spinner/SpinnerGlyph.d.ts +1 -1
  87. package/lib/types/components/Spinner/SpinnerGlyph.js +1 -1
  88. package/lib/types/components/Spinner/spinnerUtils.d.ts +13 -18
  89. package/lib/types/components/Spinner/spinnerUtils.d.ts.map +1 -1
  90. package/lib/types/components/Spinner/spinnerUtils.js +67 -71
  91. package/lib/types/components/Spinner/useStalledAnimation.d.ts +1 -2
  92. package/lib/types/components/Spinner/useStalledAnimation.d.ts.map +1 -1
  93. package/lib/types/components/Spinner/useStalledAnimation.js +1 -2
  94. package/lib/types/components/StreamingMarkdown.d.ts +1 -1
  95. package/lib/types/components/StreamingMarkdown.js +1 -1
  96. package/lib/types/components/ThemePicker.d.ts +13 -9
  97. package/lib/types/components/ThemePicker.d.ts.map +1 -1
  98. package/lib/types/components/ThemePicker.js +21 -15
  99. package/lib/types/components/ThinkingToggle.d.ts +1 -1
  100. package/lib/types/components/ThinkingToggle.d.ts.map +1 -1
  101. package/lib/types/components/ThinkingToggle.js +8 -8
  102. package/lib/types/components/ToolUseLoader.d.ts +1 -1
  103. package/lib/types/components/ToolUseLoader.js +1 -1
  104. package/lib/types/components/WorkingSpinner.d.ts +2 -2
  105. package/lib/types/components/WorkingSpinner.js +2 -2
  106. package/lib/types/components/WorkspaceFlowPicker.d.ts +15 -0
  107. package/lib/types/components/WorkspaceFlowPicker.d.ts.map +1 -0
  108. package/lib/types/components/WorkspaceFlowPicker.js +19 -0
  109. package/lib/types/components/WorkspacePicker.d.ts +9 -0
  110. package/lib/types/components/WorkspacePicker.d.ts.map +1 -0
  111. package/lib/types/components/WorkspacePicker.js +13 -0
  112. package/lib/types/components/approvals/ApprovalPanel.d.ts +1 -1
  113. package/lib/types/components/approvals/ApprovalPanel.d.ts.map +1 -1
  114. package/lib/types/components/approvals/ApprovalPanel.js +2 -1
  115. package/lib/types/components/design-system/Byline.d.ts +1 -1
  116. package/lib/types/components/design-system/Byline.js +1 -1
  117. package/lib/types/components/design-system/Divider.d.ts +1 -1
  118. package/lib/types/components/design-system/Divider.js +1 -1
  119. package/lib/types/components/design-system/HintLine.d.ts +12 -0
  120. package/lib/types/components/design-system/HintLine.d.ts.map +1 -0
  121. package/lib/types/components/design-system/HintLine.js +15 -0
  122. package/lib/types/components/design-system/KeyboardShortcutHint.d.ts +1 -1
  123. package/lib/types/components/design-system/KeyboardShortcutHint.js +1 -1
  124. package/lib/types/components/design-system/ListItem.d.ts +2 -2
  125. package/lib/types/components/design-system/ListItem.d.ts.map +1 -1
  126. package/lib/types/components/design-system/ListItem.js +35 -3
  127. package/lib/types/components/design-system/LoadingState.d.ts +1 -2
  128. package/lib/types/components/design-system/LoadingState.d.ts.map +1 -1
  129. package/lib/types/components/design-system/LoadingState.js +1 -2
  130. package/lib/types/components/design-system/Pane.d.ts +2 -2
  131. package/lib/types/components/design-system/Pane.js +2 -2
  132. package/lib/types/components/design-system/ProgressBar.d.ts +1 -2
  133. package/lib/types/components/design-system/ProgressBar.d.ts.map +1 -1
  134. package/lib/types/components/design-system/ProgressBar.js +1 -2
  135. package/lib/types/components/design-system/StatusIcon.d.ts +2 -2
  136. package/lib/types/components/design-system/StatusIcon.js +2 -2
  137. package/lib/types/components/design-system/ThemeProvider.d.ts +1 -1
  138. package/lib/types/components/design-system/ThemeProvider.d.ts.map +1 -1
  139. package/lib/types/components/design-system/ThemeProvider.js +87 -26
  140. package/lib/types/components/design-system/ThemedBox.d.ts +1 -1
  141. package/lib/types/components/design-system/ThemedBox.js +1 -1
  142. package/lib/types/components/design-system/ThemedText.d.ts +2 -2
  143. package/lib/types/components/design-system/ThemedText.js +2 -2
  144. package/lib/types/components/listWindow.d.ts +26 -0
  145. package/lib/types/components/listWindow.d.ts.map +1 -0
  146. package/lib/types/components/listWindow.js +47 -0
  147. package/lib/types/components/messages/AssistantTextMessage.d.ts +1 -2
  148. package/lib/types/components/messages/AssistantTextMessage.d.ts.map +1 -1
  149. package/lib/types/components/messages/AssistantTextMessage.js +1 -2
  150. package/lib/types/components/messages/AssistantThinkingMessage.d.ts +2 -2
  151. package/lib/types/components/messages/AssistantThinkingMessage.d.ts.map +1 -1
  152. package/lib/types/components/messages/AssistantThinkingMessage.js +6 -6
  153. package/lib/types/components/messages/AssistantToolUseMessage.d.ts +12 -4
  154. package/lib/types/components/messages/AssistantToolUseMessage.d.ts.map +1 -1
  155. package/lib/types/components/messages/AssistantToolUseMessage.js +9 -5
  156. package/lib/types/components/messages/MessageMetadata.d.ts +1 -1
  157. package/lib/types/components/messages/MessageMetadata.js +1 -1
  158. package/lib/types/components/messages/UserPromptMessage.d.ts +1 -1
  159. package/lib/types/components/messages/UserPromptMessage.js +1 -1
  160. package/lib/types/components/questions/AskUserQuestionPanel.d.ts +5 -1
  161. package/lib/types/components/questions/AskUserQuestionPanel.d.ts.map +1 -1
  162. package/lib/types/components/questions/AskUserQuestionPanel.js +11 -9
  163. package/lib/types/components/questions/PlanReviewPanel.d.ts +1 -1
  164. package/lib/types/components/questions/PlanReviewPanel.d.ts.map +1 -1
  165. package/lib/types/components/questions/PlanReviewPanel.js +3 -2
  166. package/lib/types/components/trajectory/HotspotView.d.ts +14 -0
  167. package/lib/types/components/trajectory/HotspotView.d.ts.map +1 -0
  168. package/lib/types/components/trajectory/HotspotView.js +83 -0
  169. package/lib/types/components/trajectory/Inspector.d.ts +31 -0
  170. package/lib/types/components/trajectory/Inspector.d.ts.map +1 -0
  171. package/lib/types/components/trajectory/Inspector.js +67 -0
  172. package/lib/types/components/trajectory/Ledger.d.ts +20 -0
  173. package/lib/types/components/trajectory/Ledger.d.ts.map +1 -0
  174. package/lib/types/components/trajectory/Ledger.js +112 -0
  175. package/lib/types/components/trajectory/MiniWake.d.ts +24 -0
  176. package/lib/types/components/trajectory/MiniWake.d.ts.map +1 -0
  177. package/lib/types/components/trajectory/MiniWake.js +99 -0
  178. package/lib/types/components/trajectory/WaveBand.d.ts +33 -0
  179. package/lib/types/components/trajectory/WaveBand.d.ts.map +1 -0
  180. package/lib/types/components/trajectory/WaveBand.js +145 -0
  181. package/lib/types/customTheme.d.ts +6 -6
  182. package/lib/types/customTheme.d.ts.map +1 -1
  183. package/lib/types/customTheme.js +15 -12
  184. package/lib/types/dsh-adapter/approvals.d.ts.map +1 -0
  185. package/lib/types/{channel.d.ts → dsh-adapter/channel.d.ts} +184 -43
  186. package/lib/types/dsh-adapter/channel.d.ts.map +1 -0
  187. package/lib/types/{channel.js → dsh-adapter/channel.js} +972 -201
  188. package/lib/types/dsh-adapter/childStderr.d.ts.map +1 -0
  189. package/lib/types/{childStderr.js → dsh-adapter/childStderr.js} +1 -1
  190. package/lib/types/dsh-adapter/command-trees.d.ts +27 -0
  191. package/lib/types/dsh-adapter/command-trees.d.ts.map +1 -0
  192. package/lib/types/dsh-adapter/command-trees.js +42 -0
  193. package/lib/types/dsh-adapter/compat/index.d.ts +22 -0
  194. package/lib/types/dsh-adapter/compat/index.d.ts.map +1 -0
  195. package/lib/types/{compat → dsh-adapter/compat}/index.js +7 -4
  196. package/lib/types/dsh-adapter/compat/sessionLog.d.ts +86 -0
  197. package/lib/types/dsh-adapter/compat/sessionLog.d.ts.map +1 -0
  198. package/lib/types/dsh-adapter/compat/sessionLog.js +347 -0
  199. package/lib/types/dsh-adapter/contract.d.ts +20 -0
  200. package/lib/types/dsh-adapter/contract.d.ts.map +1 -0
  201. package/lib/types/dsh-adapter/contract.js +109 -0
  202. package/lib/types/dsh-adapter/index.d.ts +80 -0
  203. package/lib/types/dsh-adapter/index.d.ts.map +1 -0
  204. package/lib/types/dsh-adapter/index.js +45 -0
  205. package/lib/types/dsh-adapter/invariant.d.ts.map +1 -0
  206. package/lib/types/dsh-adapter/packaged-skills.d.ts.map +1 -0
  207. package/lib/types/{plugin.d.ts → dsh-adapter/plugin.d.ts} +17 -0
  208. package/lib/types/dsh-adapter/plugin.d.ts.map +1 -0
  209. package/lib/types/{plugin.js → dsh-adapter/plugin.js} +280 -80
  210. package/lib/types/dsh-adapter/presets.d.ts.map +1 -0
  211. package/lib/types/dsh-adapter/providerWizard.d.ts +91 -0
  212. package/lib/types/dsh-adapter/providerWizard.d.ts.map +1 -0
  213. package/lib/types/dsh-adapter/providerWizard.js +332 -0
  214. package/lib/types/{questions.d.ts → dsh-adapter/questions.d.ts} +7 -2
  215. package/lib/types/dsh-adapter/questions.d.ts.map +1 -0
  216. package/lib/types/{questions.js → dsh-adapter/questions.js} +15 -7
  217. package/lib/types/dsh-adapter/sideQuestion.d.ts +38 -0
  218. package/lib/types/dsh-adapter/sideQuestion.d.ts.map +1 -0
  219. package/lib/types/dsh-adapter/sideQuestion.js +69 -0
  220. package/lib/types/dsh-adapter/trajectory/aggregate.d.ts +46 -0
  221. package/lib/types/dsh-adapter/trajectory/aggregate.d.ts.map +1 -0
  222. package/lib/types/dsh-adapter/trajectory/aggregate.js +207 -0
  223. package/lib/types/dsh-adapter/trajectory/guards.d.ts +177 -0
  224. package/lib/types/dsh-adapter/trajectory/guards.d.ts.map +1 -0
  225. package/lib/types/dsh-adapter/trajectory/guards.js +235 -0
  226. package/lib/types/dsh-adapter/trajectory/index.d.ts +16 -0
  227. package/lib/types/dsh-adapter/trajectory/index.d.ts.map +1 -0
  228. package/lib/types/dsh-adapter/trajectory/index.js +15 -0
  229. package/lib/types/dsh-adapter/trajectory/inspect.d.ts +40 -0
  230. package/lib/types/dsh-adapter/trajectory/inspect.d.ts.map +1 -0
  231. package/lib/types/dsh-adapter/trajectory/inspect.js +160 -0
  232. package/lib/types/dsh-adapter/trajectory/projection.d.ts +128 -0
  233. package/lib/types/dsh-adapter/trajectory/projection.d.ts.map +1 -0
  234. package/lib/types/dsh-adapter/trajectory/projection.js +653 -0
  235. package/lib/types/dsh-adapter/trajectory/types.d.ts +232 -0
  236. package/lib/types/dsh-adapter/trajectory/types.d.ts.map +1 -0
  237. package/lib/types/dsh-adapter/trajectory/types.js +70 -0
  238. package/lib/types/dsh-adapter/trajectory/wave.d.ts +45 -0
  239. package/lib/types/dsh-adapter/trajectory/wave.d.ts.map +1 -0
  240. package/lib/types/dsh-adapter/trajectory/wave.js +210 -0
  241. package/lib/types/dsh-adapter/types.d.ts +23 -0
  242. package/lib/types/dsh-adapter/types.d.ts.map +1 -0
  243. package/lib/types/dsh-adapter/types.js +1 -0
  244. package/lib/types/dsh-adapter/workspace.d.ts +22 -0
  245. package/lib/types/dsh-adapter/workspace.d.ts.map +1 -0
  246. package/lib/types/dsh-adapter/workspace.js +16 -0
  247. package/lib/types/dsh-adapter/workspaces.d.ts +118 -0
  248. package/lib/types/dsh-adapter/workspaces.d.ts.map +1 -0
  249. package/lib/types/dsh-adapter/workspaces.js +290 -0
  250. package/lib/types/effortPrefs.d.ts +1 -1
  251. package/lib/types/effortPrefs.js +3 -3
  252. package/lib/types/history.js +2 -2
  253. package/lib/types/hooks/useBlink.d.ts +1 -1
  254. package/lib/types/hooks/useBlink.js +1 -1
  255. package/lib/types/i18n.d.ts +977 -36
  256. package/lib/types/i18n.d.ts.map +1 -1
  257. package/lib/types/i18n.js +307 -30
  258. package/lib/types/index.d.ts +1 -69
  259. package/lib/types/index.d.ts.map +1 -1
  260. package/lib/types/index.js +3 -31
  261. package/lib/types/ink/components/App.d.ts.map +1 -1
  262. package/lib/types/ink/components/App.js +33 -19
  263. package/lib/types/ink/dom.d.ts +15 -0
  264. package/lib/types/ink/dom.d.ts.map +1 -1
  265. package/lib/types/ink/dom.js +32 -0
  266. package/lib/types/ink/hooks/use-input.d.ts.map +1 -1
  267. package/lib/types/ink/hooks/use-input.js +8 -0
  268. package/lib/types/ink/hooks/use-terminal-size.d.ts +1 -1
  269. package/lib/types/ink/hooks/use-terminal-size.js +1 -1
  270. package/lib/types/ink/ink.d.ts.map +1 -1
  271. package/lib/types/ink/ink.js +109 -28
  272. package/lib/types/ink/input-suppression.d.ts +20 -0
  273. package/lib/types/ink/input-suppression.d.ts.map +1 -0
  274. package/lib/types/ink/input-suppression.js +26 -0
  275. package/lib/types/ink/log-update.js +21 -6
  276. package/lib/types/ink/parse-keypress.d.ts +31 -0
  277. package/lib/types/ink/parse-keypress.d.ts.map +1 -1
  278. package/lib/types/ink/parse-keypress.js +442 -8
  279. package/lib/types/ink/terminal-querier.d.ts +5 -1
  280. package/lib/types/ink/terminal-querier.d.ts.map +1 -1
  281. package/lib/types/ink/terminal-querier.js +27 -3
  282. package/lib/types/ink/terminal.d.ts +18 -0
  283. package/lib/types/ink/terminal.d.ts.map +1 -1
  284. package/lib/types/ink/terminal.js +32 -4
  285. package/lib/types/ink/termio/csi.d.ts +10 -0
  286. package/lib/types/ink/termio/csi.d.ts.map +1 -1
  287. package/lib/types/ink/termio/csi.js +20 -0
  288. package/lib/types/ink/termio/tokenize.js +10 -0
  289. package/lib/types/modelPrefs.d.ts +1 -1
  290. package/lib/types/modelPrefs.js +3 -3
  291. package/lib/types/presetPrefs.d.ts +1 -1
  292. package/lib/types/presetPrefs.js +3 -3
  293. package/lib/types/screens/Chat.d.ts +20 -4
  294. package/lib/types/screens/Chat.d.ts.map +1 -1
  295. package/lib/types/screens/Chat.js +655 -55
  296. package/lib/types/screens/StatusLine.d.ts +17 -2
  297. package/lib/types/screens/StatusLine.d.ts.map +1 -1
  298. package/lib/types/screens/StatusLine.js +12 -4
  299. package/lib/types/screens/TrajectoryScene.d.ts +16 -0
  300. package/lib/types/screens/TrajectoryScene.d.ts.map +1 -0
  301. package/lib/types/screens/TrajectoryScene.js +305 -0
  302. package/lib/types/sessionHistory.d.ts +9 -1
  303. package/lib/types/sessionHistory.d.ts.map +1 -1
  304. package/lib/types/sessionHistory.js +56 -16
  305. package/lib/types/sessionModes.d.ts +29 -0
  306. package/lib/types/sessionModes.d.ts.map +1 -0
  307. package/lib/types/sessionModes.js +45 -0
  308. package/lib/types/theme.d.ts +27 -3
  309. package/lib/types/theme.d.ts.map +1 -1
  310. package/lib/types/theme.js +48 -4
  311. package/lib/types/themePrefs.d.ts +3 -3
  312. package/lib/types/themePrefs.js +5 -5
  313. package/lib/types/trajectory/format.d.ts +100 -0
  314. package/lib/types/trajectory/format.d.ts.map +1 -0
  315. package/lib/types/trajectory/format.js +213 -0
  316. package/lib/types/trajectory/motion.d.ts +99 -0
  317. package/lib/types/trajectory/motion.d.ts.map +1 -0
  318. package/lib/types/trajectory/motion.js +143 -0
  319. package/lib/types/trajectory/query.d.ts +83 -0
  320. package/lib/types/trajectory/query.d.ts.map +1 -0
  321. package/lib/types/trajectory/query.js +187 -0
  322. package/lib/types/trajectoryPrefs.d.ts +36 -0
  323. package/lib/types/trajectoryPrefs.d.ts.map +1 -0
  324. package/lib/types/trajectoryPrefs.js +65 -0
  325. package/lib/types/update.d.ts +3 -3
  326. package/lib/types/update.d.ts.map +1 -1
  327. package/lib/types/update.js +18 -7
  328. package/lib/types/utils/clipboard.d.ts +101 -29
  329. package/lib/types/utils/clipboard.d.ts.map +1 -1
  330. package/lib/types/utils/clipboard.js +533 -55
  331. package/lib/types/utils/debug.d.ts +1 -1
  332. package/lib/types/utils/debug.js +2 -2
  333. package/lib/types/utils/execFileNoThrow.d.ts.map +1 -1
  334. package/lib/types/utils/execFileNoThrow.js +16 -6
  335. package/lib/types/utils/externalEditor.d.ts +115 -0
  336. package/lib/types/utils/externalEditor.d.ts.map +1 -0
  337. package/lib/types/utils/externalEditor.js +270 -0
  338. package/lib/types/utils/fullscreen.d.ts +2 -2
  339. package/lib/types/utils/fullscreen.js +3 -3
  340. package/lib/types/utils/loaded-context.d.ts +1 -1
  341. package/lib/types/utils/loaded-context.d.ts.map +1 -1
  342. package/lib/types/utils/modifiers.d.ts +24 -0
  343. package/lib/types/utils/modifiers.d.ts.map +1 -1
  344. package/lib/types/utils/modifiers.js +27 -0
  345. package/lib/types/utils/paths.d.ts +45 -0
  346. package/lib/types/utils/paths.d.ts.map +1 -0
  347. package/lib/types/utils/paths.js +69 -0
  348. package/lib/types/utils/shellQuote.d.ts +14 -0
  349. package/lib/types/utils/shellQuote.d.ts.map +1 -0
  350. package/lib/types/utils/shellQuote.js +39 -0
  351. package/lib/types/utils/workspaceRoot.d.ts +21 -0
  352. package/lib/types/utils/workspaceRoot.d.ts.map +1 -0
  353. package/lib/types/utils/workspaceRoot.js +47 -0
  354. package/lib/types/workspaces.d.ts +3 -0
  355. package/lib/types/workspaces.d.ts.map +1 -0
  356. package/lib/types/workspaces.js +4 -0
  357. package/package.json +26 -8
  358. package/lib/types/approvals.d.ts.map +0 -1
  359. package/lib/types/channel.d.ts.map +0 -1
  360. package/lib/types/childStderr.d.ts.map +0 -1
  361. package/lib/types/compat/index.d.ts +0 -20
  362. package/lib/types/compat/index.d.ts.map +0 -1
  363. package/lib/types/compat/sessionLog.d.ts +0 -40
  364. package/lib/types/compat/sessionLog.d.ts.map +0 -1
  365. package/lib/types/compat/sessionLog.js +0 -226
  366. package/lib/types/invariant.d.ts.map +0 -1
  367. package/lib/types/packaged-skills.d.ts.map +0 -1
  368. package/lib/types/plugin.d.ts.map +0 -1
  369. package/lib/types/presets.d.ts.map +0 -1
  370. package/lib/types/questions.d.ts.map +0 -1
  371. /package/lib/types/{approvals.d.ts → dsh-adapter/approvals.d.ts} +0 -0
  372. /package/lib/types/{approvals.js → dsh-adapter/approvals.js} +0 -0
  373. /package/lib/types/{childStderr.d.ts → dsh-adapter/childStderr.d.ts} +0 -0
  374. /package/lib/types/{invariant.d.ts → dsh-adapter/invariant.d.ts} +0 -0
  375. /package/lib/types/{invariant.js → dsh-adapter/invariant.js} +0 -0
  376. /package/lib/types/{packaged-skills.d.ts → dsh-adapter/packaged-skills.d.ts} +0 -0
  377. /package/lib/types/{packaged-skills.js → dsh-adapter/packaged-skills.js} +0 -0
  378. /package/lib/types/{presets.d.ts → dsh-adapter/presets.d.ts} +0 -0
  379. /package/lib/types/{presets.js → dsh-adapter/presets.js} +0 -0
@@ -0,0 +1,20 @@
1
+ import React from 'react';
2
+ /**
3
+ * 瞬态面板的浮层容器:absolute 定位 + bottom:'100%' 把面板底边钉在锚点
4
+ * (父元素)顶边,向上覆盖转录尾部行,自身**不占布局高度**。
5
+ *
6
+ * 为什么必须这样:inline 模式下整帧是内容高度。瞬态面板(picker/补全/
7
+ * 对话框)若以 in-flow 方式挂载,帧高随之增长——终端滚动把帧顶行(splash、
8
+ * 历史)推进 scrollback;面板关闭时的收缩重绘又把这些行重新写回视口,同一
9
+ * 行在 scrollback 和视口各存一份("每切一次 /model 多一份启动画"的真机报
10
+ * 告)。浮层只改写既有行的单元格内容(帧高不变、零滚动、零沉积),关闭时
11
+ * 原样写回,全程无重复。
12
+ *
13
+ * 先例:PromptInput 通知行(position=absolute marginTop={-1})。
14
+ */
15
+ export declare function OverlayAbove({ children, maxHeight, }: {
16
+ children: React.ReactNode;
17
+ /** 防止面板高过可用区域时探出帧顶(短会话 + 高列表)。 */
18
+ maxHeight?: number | undefined;
19
+ }): React.ReactNode;
20
+ //# sourceMappingURL=OverlayAbove.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"OverlayAbove.d.ts","sourceRoot":"","sources":["../../../src/components/OverlayAbove.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB;;;;;;;;;;;;GAYG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;IACzB,kCAAkC;IAClC,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC/B,GAAG,KAAK,CAAC,SAAS,CAqBlB"}
@@ -0,0 +1,18 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from '../ui.js';
3
+ /**
4
+ * 瞬态面板的浮层容器:absolute 定位 + bottom:'100%' 把面板底边钉在锚点
5
+ * (父元素)顶边,向上覆盖转录尾部行,自身**不占布局高度**。
6
+ *
7
+ * 为什么必须这样:inline 模式下整帧是内容高度。瞬态面板(picker/补全/
8
+ * 对话框)若以 in-flow 方式挂载,帧高随之增长——终端滚动把帧顶行(splash、
9
+ * 历史)推进 scrollback;面板关闭时的收缩重绘又把这些行重新写回视口,同一
10
+ * 行在 scrollback 和视口各存一份("每切一次 /model 多一份启动画"的真机报
11
+ * 告)。浮层只改写既有行的单元格内容(帧高不变、零滚动、零沉积),关闭时
12
+ * 原样写回,全程无重复。
13
+ *
14
+ * 先例:PromptInput 通知行(position=absolute marginTop={-1})。
15
+ */
16
+ export function OverlayAbove({ children, maxHeight, }) {
17
+ return (_jsx(Box, { position: "absolute", bottom: "100%", left: 0, right: 0, flexDirection: "column", justifyContent: "flex-end", overflow: "hidden", opaque: true, ...(maxHeight === undefined ? {} : { maxHeight }), children: _jsx(Box, { flexDirection: "column", flexShrink: 0, children: children }) }));
18
+ }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { PresetOption } from '../channel.js';
2
+ import type { PresetOption } from '../dsh-adapter/channel.js';
3
3
  /**
4
4
  * Agent-preset picker (issue #8) in the CC ModelPicker style — same chrome
5
5
  * as the ActivityPicker: a permission-colored Pane listing every roster
@@ -1 +1 @@
1
- {"version":3,"file":"PresetPicker.d.ts","sourceRoot":"","sources":["../../../src/components/PresetPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAOzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAEjD;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,UAAU,EACV,aAAa,GACd,EAAE;IACD,OAAO,EAAE,SAAS,YAAY,EAAE,CAAA;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC,GAAG,KAAK,CAAC,SAAS,CA8BlB"}
1
+ {"version":3,"file":"PresetPicker.d.ts","sourceRoot":"","sources":["../../../src/components/PresetPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAE7D;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,EAC3B,OAAO,EACP,UAAU,EACV,aAAa,GACd,EAAE;IACD,OAAO,EAAE,SAAS,YAAY,EAAE,CAAA;IAChC,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,GAAG,SAAS,CAAA;CAClC,GAAG,KAAK,CAAC,SAAS,CA2BlB"}
@@ -3,8 +3,7 @@ import { t } from '../i18n.js';
3
3
  import { Box, Text } from '../ui.js';
4
4
  import { Pane } from './design-system/Pane.js';
5
5
  import { Select } from './Select.js';
6
- import { Byline } from './design-system/Byline.js';
7
- import { KeyboardShortcutHint } from './design-system/KeyboardShortcutHint.js';
6
+ import { HintLine } from './design-system/HintLine.js';
8
7
  /**
9
8
  * Agent-preset picker (issue #8) in the CC ModelPicker style — same chrome
10
9
  * as the ActivityPicker: a permission-colored Pane listing every roster
@@ -21,5 +20,5 @@ export function PresetPicker({ presets, focusIndex, currentPreset, }) {
21
20
  (preset.isDefault ? t('preset-default-tag') : '') +
22
21
  (preset.broken !== undefined ? t('preset-broken-tag') : ''),
23
22
  description: preset.broken ?? preset.description ?? preset.id,
24
- })), focusIndex: focusIndex, selectedValue: currentPreset }), _jsx(Text, { dimColor: true, italic: true, children: _jsxs(Byline, { children: [_jsx(KeyboardShortcutHint, { shortcut: "Enter", action: "confirm", bold: true }), _jsx(KeyboardShortcutHint, { shortcut: "Esc", action: "exit" })] }) })] }) }));
23
+ })), focusIndex: focusIndex, selectedValue: currentPreset }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: t('hint-confirm-exit') }) })] }) }));
25
24
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { Channel } from '../channel.js';
2
+ import type { Channel } from '../dsh-adapter/channel.js';
3
3
  /**
4
4
  * Imperative handle for the Chat-level Ctrl+C rule: Chat's useInput listener
5
5
  * runs BEFORE this component's (EventEmitter registration order), so Chat
@@ -39,7 +39,7 @@ export interface PromptInputProps {
39
39
  * only), `❯ ` prompt char (dimmed while a turn is working), the text with a
40
40
  * block cursor at the cursor position, and below it the slash-command
41
41
  * suggestion overlay (name column + description, selected row in the
42
- * `suggestion` color — ported from the leak's PromptInputFooterSuggestions).
42
+ * `suggestion` color — mirroring Claude Code's PromptInputFooterSuggestions).
43
43
  *
44
44
  * Empty input: a solid block caret on a blank cell and nothing else — no
45
45
  * placeholder text, so the terminal-painted IME preedit (pinyin) at the
@@ -49,8 +49,9 @@ export interface PromptInputProps {
49
49
  * the input spans multiple lines (history/command selection otherwise); the
50
50
  * visible window scrolls to keep the caret row on screen past
51
51
  * MAX_VISIBLE_LINES. Enter submits, backspace/delete edit, ←/→ move the
52
- * cursor, Tab completes the selected command, Escape clears (or closes the
53
- * help menu), `?` toggles the help menu. Windows ConPTY pipelines deliver
52
+ * cursor, Tab completes the selected command, Ctrl+X opens the draft in the
53
+ * external editor ($VISUAL/$EDITOR), Escape clears (or closes the help
54
+ * menu), `?` toggles the help menu. Windows ConPTY pipelines deliver
54
55
  * whole lines with the Enter key lost: a trailing CR/LF in the input marks
55
56
  * a complete line to submit.
56
57
  *
@@ -1 +1 @@
1
- {"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../src/components/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAMzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAyC5C;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,IAAI,OAAO,CAAA;IAClB,KAAK,IAAI,IAAI,CAAA;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,IAAI,IAAI,CAAA;IACpB;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;IACrD,6EAA6E;IAC7E,eAAe,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,cAAc,CAAC,IAAI,IAAI,CAAA;IACvB,8EAA8E;IAC9E,eAAe,CAAC,IAAI,IAAI,CAAA;IACxB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CACzD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,GACd,EAAE,gBAAgB,qBA+xBlB"}
1
+ {"version":3,"file":"PromptInput.d.ts","sourceRoot":"","sources":["../../../src/components/PromptInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AASzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAkDxD;;;;;GAKG;AACH,MAAM,WAAW,gBAAgB;IAC/B,OAAO,IAAI,OAAO,CAAA;IAClB,KAAK,IAAI,IAAI,CAAA;CACd;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,OAAO,CAAA;IAChB,0EAA0E;IAC1E,QAAQ,EAAE,OAAO,CAAA;IACjB,YAAY,IAAI,IAAI,CAAA;IACpB;;;OAGG;IACH,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAA;IACrD,6EAA6E;IAC7E,eAAe,EAAE,OAAO,CAAA;IACxB;;;;OAIG;IACH,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,cAAc,CAAC,IAAI,IAAI,CAAA;IACvB,8EAA8E;IAC9E,eAAe,CAAC,IAAI,IAAI,CAAA;IACxB,0EAA0E;IAC1E,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,GAAG,IAAI,CAAC,CAAA;CACzD;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,WAAW,CAAC,EAC1B,OAAO,EACP,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,eAAe,EACf,QAAQ,EACR,cAAc,EACd,eAAe,EACf,aAAa,GACd,EAAE,gBAAgB,qBAq6BlB"}
@@ -1,18 +1,33 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import React from 'react';
3
+ import { readFile, unlink } from 'node:fs/promises';
4
+ import { basename } from 'node:path';
3
5
  import { t } from '../i18n.js';
4
6
  import { Box, Text, useInput, useTerminalSize } from '../ui.js';
5
7
  import { useDeclaredCursor } from '../ink/hooks/use-declared-cursor.js';
6
8
  import { stringWidth } from '../ink/stringWidth.js';
7
9
  import { formatClipboardInsert, readClipboard } from '../utils/clipboard.js';
8
- import { filterCommands, parseCommandName } from '../commands.js';
10
+ import { editInExternalEditor } from '../utils/externalEditor.js';
11
+ import { parseCommandName } from '../commands.js';
9
12
  import { appendHistory } from '../history.js';
10
13
  import { mentionAtCaret } from '../utils/mentions.js';
11
14
  import { isMod } from '../utils/modifiers.js';
12
15
  import { CommandSuggestions } from './CommandSuggestions.js';
13
16
  import { FileSuggestions } from './FileSuggestions.js';
14
17
  import { HelpMenu } from './HelpMenu.js';
18
+ import { OverlayAbove } from './OverlayAbove.js';
15
19
  const HISTORY_LIMIT = 50;
20
+ function clipboardImageMediaType(path) {
21
+ if (/\.png$/iu.test(path))
22
+ return 'image/png';
23
+ if (/\.jpe?g$/iu.test(path))
24
+ return 'image/jpeg';
25
+ if (/\.webp$/iu.test(path))
26
+ return 'image/webp';
27
+ if (/\.gif$/iu.test(path))
28
+ return 'image/gif';
29
+ return undefined;
30
+ }
16
31
  /** Index of the word boundary at or before `cursor` (readline alt+b). */
17
32
  function wordBoundaryLeft(text, cursor) {
18
33
  let index = cursor;
@@ -48,7 +63,7 @@ const MAX_VISIBLE_LINES = 5;
48
63
  * only), `❯ ` prompt char (dimmed while a turn is working), the text with a
49
64
  * block cursor at the cursor position, and below it the slash-command
50
65
  * suggestion overlay (name column + description, selected row in the
51
- * `suggestion` color — ported from the leak's PromptInputFooterSuggestions).
66
+ * `suggestion` color — mirroring Claude Code's PromptInputFooterSuggestions).
52
67
  *
53
68
  * Empty input: a solid block caret on a blank cell and nothing else — no
54
69
  * placeholder text, so the terminal-painted IME preedit (pinyin) at the
@@ -58,8 +73,9 @@ const MAX_VISIBLE_LINES = 5;
58
73
  * the input spans multiple lines (history/command selection otherwise); the
59
74
  * visible window scrolls to keep the caret row on screen past
60
75
  * MAX_VISIBLE_LINES. Enter submits, backspace/delete edit, ←/→ move the
61
- * cursor, Tab completes the selected command, Escape clears (or closes the
62
- * help menu), `?` toggles the help menu. Windows ConPTY pipelines deliver
76
+ * cursor, Tab completes the selected command, Ctrl+X opens the draft in the
77
+ * external editor ($VISUAL/$EDITOR), Escape clears (or closes the help
78
+ * menu), `?` toggles the help menu. Windows ConPTY pipelines deliver
63
79
  * whole lines with the Enter key lost: a trailing CR/LF in the input marks
64
80
  * a complete line to submit.
65
81
  *
@@ -75,6 +91,10 @@ const MAX_VISIBLE_LINES = 5;
75
91
  export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, selectionActive, fillText, onFillConsumed, onRewindRequest, controllerRef, }) {
76
92
  const [value, setValue] = React.useState('');
77
93
  const [cursor, setCursor] = React.useState(0);
94
+ const valueRef = React.useRef(value);
95
+ const cursorRef = React.useRef(cursor);
96
+ valueRef.current = value;
97
+ cursorRef.current = cursor;
78
98
  // Publish the live controller (fresh closure over `value` every render).
79
99
  // clear() mirrors the double-tap-Esc clear: text + caret reset.
80
100
  React.useEffect(() => {
@@ -110,6 +130,18 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
110
130
  const escTimerRef = React.useRef(null);
111
131
  /** True while a Ctrl+V clipboard read is in flight (ignore repeat keys). */
112
132
  const clipboardBusyRef = React.useRef(false);
133
+ /** True while the external editor owns the terminal (Ctrl+X round-trip). */
134
+ const editorBusyRef = React.useRef(false);
135
+ /**
136
+ * Latest committed input state. The Ctrl+V clipboard read resolves
137
+ * asynchronously; inserting against the render that STARTED the read
138
+ * would drop whatever the user typed while waiting. The continuation
139
+ * inserts against this mirror instead.
140
+ */
141
+ const liveInputRef = React.useRef({ value: '', cursor: 0 });
142
+ React.useEffect(() => {
143
+ liveInputRef.current = { value, cursor };
144
+ });
113
145
  /** Enter dedupe window: cmd pipelines can deliver one Enter as `\r`+`\n`. */
114
146
  const lastEnterAtRef = React.useRef(0);
115
147
  React.useEffect(() => {
@@ -118,10 +150,8 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
118
150
  clearTimeout(escTimerRef.current);
119
151
  };
120
152
  }, []);
121
- const { columns } = useTerminalSize();
122
- const suggestions = value.startsWith('/')
123
- ? filterCommands(value, channel.commandList)
124
- : [];
153
+ const { columns, rows: terminalRows } = useTerminalSize();
154
+ const suggestions = value.startsWith('/') ? channel.commandCompletions(value) : [];
125
155
  const overlayOpen = suggestions.length > 0 &&
126
156
  !helpOpen &&
127
157
  !selectionActive &&
@@ -314,8 +344,19 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
314
344
  return handled;
315
345
  };
316
346
  const setInput = (next, cursorOffset = next.length) => {
347
+ valueRef.current = next;
348
+ cursorRef.current = Math.max(0, Math.min(cursorOffset, next.length));
317
349
  setValue(next);
318
- setCursor(Math.max(0, Math.min(cursorOffset, next.length)));
350
+ setCursor(cursorRef.current);
351
+ };
352
+ /** Clipboard reads are asynchronous; insert against the latest render so
353
+ * typing while PowerShell owns the clipboard never gets overwritten. */
354
+ const insertClipboardAtCaret = (text) => {
355
+ const current = valueRef.current;
356
+ const position = cursorRef.current;
357
+ setInput(current.slice(0, position) + text + current.slice(position), position + text.length);
358
+ setSelectedCommand(0);
359
+ setFileSelected(0);
319
360
  };
320
361
  /** Line index of the cursor; -1 when the cursor is at the very end. */
321
362
  const cursorLine = () => {
@@ -331,6 +372,11 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
331
372
  useInput((input, key, event) => {
332
373
  if (selectionActive)
333
374
  return;
375
+ // The editor round-trip ends by resuming stdin one microtask before the
376
+ // outcome lands — drop any key squeezed into that gap so the prompt's
377
+ // setValue can never overwrite fresh typing (and vice versa).
378
+ if (editorBusyRef.current)
379
+ return;
334
380
  /** Insert text at the caret (typing, paste) and dismiss overlays. */
335
381
  const insertAtCaret = (text) => {
336
382
  if (helpOpen)
@@ -349,24 +395,106 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
349
395
  return;
350
396
  }
351
397
  // Ctrl+V / Cmd+V: raw mode hands the key to the app, so the clipboard is
352
- // read here — text, or file paths when Explorer copied files (pasted
353
- // files insert their paths).
398
+ // read here — text, file paths when the file manager copied files, or an
399
+ // exported temp-file path when the clipboard holds a raw image.
354
400
  if (isMod(key) && input === 'v') {
355
401
  if (clipboardBusyRef.current)
356
402
  return;
403
+ // Match insertAtCaret's overlay/selection dismissal up front: the
404
+ // async continuation below only sets value/cursor, so a paste landing
405
+ // while the help overlay is open would otherwise insert behind it.
406
+ if (helpOpen)
407
+ onToggleHelp();
408
+ setSelectedCommand(0);
409
+ setFileSelected(0);
357
410
  clipboardBusyRef.current = true;
358
- void readClipboard().then(content => {
359
- clipboardBusyRef.current = false;
411
+ void readClipboard()
412
+ .then(async (content) => {
360
413
  if (content === null) {
361
414
  channel.notify(t('input-clipboard-empty'), { color: 'warning' });
362
415
  return;
363
416
  }
364
- insertAtCaret(formatClipboardInsert(content));
417
+ if (content.kind === 'unavailable') {
418
+ channel.notify(t('input-clipboard-unavailable'), { color: 'warning' });
419
+ return;
420
+ }
421
+ if (content.kind === 'image') {
422
+ const mediaType = clipboardImageMediaType(content.path);
423
+ if (mediaType !== undefined) {
424
+ try {
425
+ const token = await channel.stageImage({
426
+ data: new Uint8Array(await readFile(content.path)),
427
+ mediaType,
428
+ name: basename(content.path),
429
+ });
430
+ await unlink(content.path).catch(() => undefined);
431
+ insertClipboardAtCaret(`${token} `);
432
+ channel.notify(t('input-image-pasted', { token }), { timeoutMs: 2500 });
433
+ return;
434
+ }
435
+ catch (error) {
436
+ const message = error instanceof Error ? error.message : String(error);
437
+ channel.notify(t('input-image-paste-failed', { err: message }), { color: 'warning', timeoutMs: 5000 });
438
+ }
439
+ }
440
+ }
441
+ // Insert against the LIVE input state: the read above resolved
442
+ // asynchronously and the user may have typed while waiting.
443
+ const text = formatClipboardInsert(content);
444
+ const live = liveInputRef.current;
445
+ const caret = Math.min(live.cursor, live.value.length);
446
+ setValue(live.value.slice(0, caret) + text + live.value.slice(caret));
447
+ setCursor(caret + text.length);
448
+ })
449
+ .catch(() => {
450
+ channel.notify(t('input-clipboard-read-failed'), { color: 'warning' });
451
+ })
452
+ .finally(() => {
453
+ // A rejected read must never wedge Ctrl+V for the rest of the
454
+ // session.
455
+ clipboardBusyRef.current = false;
365
456
  });
366
457
  return;
367
458
  }
459
+ // Ctrl+X / Cmd+X: edit the current draft in $VISUAL/$EDITOR (issue #123,
460
+ // readline's edit-and-execute-command). The draft is written to a temp
461
+ // file, the terminal is handed to the editor (Ink's alt-screen handoff),
462
+ // and the saved text replaces the input when it differs. The util maps
463
+ // every failure to an outcome, but the catch/finally here is the hard
464
+ // guarantee: a rejected promise must never kill the process, and the
465
+ // busy flag must always clear or Ctrl+X stays locked forever.
466
+ if (isMod(key) && input === 'x') {
467
+ editorBusyRef.current = true;
468
+ void (async () => {
469
+ try {
470
+ const outcome = await editInExternalEditor(value);
471
+ if (outcome.kind === 'edited') {
472
+ setValue(outcome.text);
473
+ setCursor(outcome.text.length);
474
+ setSelectedCommand(0);
475
+ setFileSelected(0);
476
+ }
477
+ else if (outcome.kind === 'unavailable') {
478
+ channel.notify(t('input-editor-unavailable'), { color: 'warning' });
479
+ }
480
+ else if (outcome.kind === 'failed') {
481
+ channel.notify(t('input-editor-failed', { name: outcome.message }), {
482
+ color: 'warning',
483
+ });
484
+ }
485
+ }
486
+ catch {
487
+ channel.notify(t('input-editor-failed', { name: 'unknown' }), {
488
+ color: 'warning',
489
+ });
490
+ }
491
+ finally {
492
+ editorBusyRef.current = false;
493
+ }
494
+ })();
495
+ return;
496
+ }
368
497
  /**
369
- * Unified Enter semantics (both the parsed `return` key and the raw
370
498
  * CR/LF line from Windows cmd pipelines):
371
499
  * - command menu open → run the SELECTED command (never send `/mo`);
372
500
  * - model working → STEER into the running turn (next step boundary,
@@ -384,7 +512,7 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
384
512
  if (overlayOpen) {
385
513
  const command = suggestions[selectedCommand];
386
514
  if (command) {
387
- tryRunCommand(`/${command.name}`);
515
+ tryRunCommand(command.commandLine);
388
516
  return;
389
517
  }
390
518
  }
@@ -398,6 +526,14 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
398
526
  }
399
527
  }
400
528
  if (channel.working && value.trim() !== '') {
529
+ // CC's immediate-command semantics: /btw is exempt from steering —
530
+ // the side question never interrupts the running turn. Every other
531
+ // input keeps the steer behavior so /new /model etc. stay idle-only.
532
+ const parsed = value.startsWith('/') ? parseCommandName(value) : undefined;
533
+ if (parsed?.name === 'btw' && channel.commandList.some(c => c.name === 'btw')) {
534
+ tryRunCommand(value);
535
+ return;
536
+ }
401
537
  steerSend(value);
402
538
  return;
403
539
  }
@@ -416,9 +552,9 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
416
552
  }
417
553
  const line = (value + input).trim();
418
554
  if (line.startsWith('/')) {
419
- const matches = filterCommands(line, channel.commandList);
555
+ const matches = channel.commandCompletions(line);
420
556
  if (matches.length === 1) {
421
- tryRunCommand(`/${matches[0].name}`);
557
+ tryRunCommand(matches[0].commandLine);
422
558
  return;
423
559
  }
424
560
  }
@@ -432,8 +568,12 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
432
568
  interruptSend();
433
569
  return;
434
570
  }
435
- if (key.return && key.shift) {
436
- // Insert a newline at the caret (multi-line input).
571
+ if (key.return && (key.shift || key.meta)) {
572
+ // Shift+Enter / Option+Enter: insert a newline at the caret
573
+ // (multi-line input). Shift+Enter only arrives when the terminal
574
+ // supports extended key reporting (kitty/modifyOtherKeys allowlist in
575
+ // ink/terminal.ts); Option+Enter (ESC CR) is the fallback on terminals
576
+ // that can't report shift — e.g. macOS Terminal.app (issue #110).
437
577
  const next = value.slice(0, cursor) + '\n' + value.slice(cursor);
438
578
  setValue(next);
439
579
  setCursor(cursor + 1);
@@ -444,11 +584,12 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
444
584
  handleEnter();
445
585
  return;
446
586
  }
447
- // Shift+Tab cycles the reasoning effort (dsh parity: the adapter's own
448
- // level list, e.g. deepseek Off→High→Max). Must precede the plain-Tab
449
- // arms — the parser reports backtab as key.tab + key.shift.
587
+ // Shift+Tab cycles the configured session modes (default: 默认 →
588
+ // 计划模式 → 完全访问; each mode bundles plan/sandbox/approval atoms —
589
+ // see the `modes` config). Must precede the plain-Tab arms — the parser
590
+ // reports backtab as key.tab + key.shift.
450
591
  if (key.tab && key.shift) {
451
- void channel.cycleEffort();
592
+ void channel.cycleMode();
452
593
  return;
453
594
  }
454
595
  if (key.tab && fileOverlayOpen) {
@@ -460,7 +601,7 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
460
601
  if (key.tab && overlayOpen) {
461
602
  const command = suggestions[selectedCommand];
462
603
  if (command)
463
- setInput(`/${command.name} `);
604
+ setInput(command.replacement);
464
605
  return;
465
606
  }
466
607
  // Tab while the model is working = queue for AFTER the turn (followup),
@@ -530,16 +671,9 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
530
671
  setCursor(entry.length);
531
672
  return;
532
673
  }
533
- if (key.leftArrow) {
534
- setCursor(previous => Math.max(0, previous - 1));
535
- return;
536
- }
537
- if (key.rightArrow) {
538
- setCursor(previous => Math.min(value.length, previous + 1));
539
- return;
540
- }
541
674
  if (isMod(key) && key.leftArrow) {
542
- // Jump to the previous word boundary (readline alt+b).
675
+ // Jump to the previous word boundary (readline alt+b). Must precede the
676
+ // bare-arrow arms: Ctrl+Left arrives as leftArrow + ctrl.
543
677
  setCursor(previous => wordBoundaryLeft(value, previous));
544
678
  return;
545
679
  }
@@ -548,6 +682,14 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
548
682
  setCursor(previous => wordBoundaryRight(value, previous));
549
683
  return;
550
684
  }
685
+ if (key.leftArrow) {
686
+ setCursor(previous => Math.max(0, previous - 1));
687
+ return;
688
+ }
689
+ if (key.rightArrow) {
690
+ setCursor(previous => Math.min(value.length, previous + 1));
691
+ return;
692
+ }
551
693
  if (key.backspace) {
552
694
  if (cursor === 0)
553
695
  return;
@@ -741,11 +883,16 @@ export function PromptInput({ channel, helpOpen, onToggleHelp, onRunCommand, sel
741
883
  column: caretVisualCol(),
742
884
  active: !selectionActive,
743
885
  });
744
- return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [lastNotification && (_jsx(Box, { position: "absolute", marginTop: -1, height: 1, width: "100%", paddingLeft: 2, paddingRight: 1, flexDirection: "column", justifyContent: "flex-end", overflow: "hidden", children: _jsx(Box, { justifyContent: "flex-end", children: _jsx(Text, { color: lastNotification.color, dimColor: !lastNotification.color, wrap: "truncate", children: lastNotification.text }) }) })), helpOpen && (_jsx(Box, { marginBottom: 1, children: _jsx(HelpMenu, { commands: channel.commandList }) })), channel.pending.length > 0 && (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, paddingBottom: 1, children: [channel.pending.some(item => item.placement === 'steer') && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["\u26A1 ", t('input-pending-steer-label')] }), channel.pending
745
- .filter(item => item.placement === 'steer')
746
- .map(item => (_jsxs(Text, { dimColor: true, wrap: "truncate", children: [' ', "\u21B3 ", item.text] }, item.id)))] })), channel.pending.some(item => item.placement === 'followup') && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["\u23F3 ", t('input-pending-queue-label')] }), channel.pending
747
- .filter(item => item.placement === 'followup')
748
- .map(item => (_jsxs(Text, { dimColor: true, wrap: "truncate", children: [' ', "\u21B3 ", item.text] }, item.id)))] })), _jsxs(Text, { dimColor: true, children: ["Alt+\u2191 ", t('input-pending-actions-hint')] })] })), fileOverlayOpen && (_jsx(Box, { paddingLeft: 2, paddingBottom: 1, children: _jsx(FileSuggestions, { files: fileMatches, selectedIndex: fileSelected, columns: columns }) })), overlayOpen && (_jsx(Box, { paddingLeft: 2, paddingBottom: 1, children: _jsx(CommandSuggestions, { commands: suggestions, selectedIndex: selectedCommand, columns: columns }) })), _jsx(Box, { flexDirection: "column", alignItems: "flex-start", justifyContent: "flex-start", borderColor: "promptBorder", borderStyle: "round", borderLeft: false, borderRight: false, borderBottom: true, width: "100%", children: _jsxs(Box, { flexDirection: "row", alignItems: "flex-start", width: "100%", children: [_jsx(Text, { dimColor: channel.working, children: "\u276F " }), _jsx(Box, { ref: valueBoxRef, flexGrow: 1, flexShrink: 1, children: value.length === 0 ? (_jsx(Text, { inverse: true, children: " " })) : (_jsx(Box, { flexDirection: "column", children: rendered })) })] }) })] }));
886
+ // 浮层整体挂载条件:与内部面板可见条件精确同值。关闭时必须把整个
887
+ // absolute 浮层移除——渲染器的 absolute-removed 检测只看被移除节点自身
888
+ // 的 style.position,常驻浮层 + 移除普通子节点不会触发 blit 解毒,被
889
+ // 覆盖的转录行会留空(见 Chat.tsx dialogOverlayOpen 注释)。
890
+ const floatersOpen = helpOpen || channel.pending.length > 0 || fileOverlayOpen || overlayOpen;
891
+ return (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [floatersOpen && (_jsxs(OverlayAbove, { maxHeight: Math.max(terminalRows - 6, 4), children: [helpOpen && (_jsx(Box, { marginBottom: 1, children: _jsx(HelpMenu, { commands: channel.commandList }) })), channel.pending.length > 0 && (_jsxs(Box, { flexDirection: "column", paddingLeft: 2, paddingBottom: 1, children: [channel.pending.some(item => item.placement === 'steer') && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["\u26A1 ", t('input-pending-steer-label')] }), channel.pending
892
+ .filter(item => item.placement === 'steer')
893
+ .map(item => (_jsxs(Text, { dimColor: true, wrap: "truncate", children: [' ', "\u21B3 ", item.text] }, item.id)))] })), channel.pending.some(item => item.placement === 'followup') && (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { dimColor: true, children: ["\u23F3 ", t('input-pending-queue-label')] }), channel.pending
894
+ .filter(item => item.placement === 'followup')
895
+ .map(item => (_jsxs(Text, { dimColor: true, wrap: "truncate", children: [' ', "\u21B3 ", item.text] }, item.id)))] })), _jsxs(Text, { dimColor: true, children: ["Alt+\u2191 ", t('input-pending-actions-hint')] })] })), fileOverlayOpen && (_jsx(Box, { paddingLeft: 2, paddingBottom: 1, children: _jsx(FileSuggestions, { files: fileMatches, selectedIndex: fileSelected, columns: columns }) })), overlayOpen && (_jsx(Box, { paddingLeft: 2, paddingBottom: 1, children: _jsx(CommandSuggestions, { commands: suggestions, selectedIndex: selectedCommand, columns: columns }) }))] })), lastNotification && (_jsx(Box, { position: "absolute", marginTop: -1, height: 1, width: "100%", paddingLeft: 2, paddingRight: 1, flexDirection: "column", justifyContent: "flex-end", overflow: "hidden", children: _jsx(Box, { justifyContent: "flex-end", children: _jsx(Text, { color: lastNotification.color, dimColor: !lastNotification.color, wrap: "truncate", children: lastNotification.text }) }) })), _jsx(Box, { flexDirection: "column", alignItems: "flex-start", justifyContent: "flex-start", borderColor: channel.mode.plan === true ? 'planMode' : 'promptBorder', borderStyle: "round", borderLeft: false, borderRight: false, borderBottom: true, width: "100%", children: _jsxs(Box, { flexDirection: "row", alignItems: "flex-start", width: "100%", children: [_jsx(Text, { dimColor: channel.working, children: "\u276F " }), _jsx(Box, { ref: valueBoxRef, flexGrow: 1, flexShrink: 1, children: value.length === 0 ? (_jsx(Text, { inverse: true, children: " " })) : (_jsx(Box, { flexDirection: "column", children: rendered })) })] }) })] }));
749
896
  }
750
897
  /**
751
898
  * Hard-wrap text into visual rows of at most `width` columns (CJK-aware via
@@ -1,15 +1,26 @@
1
1
  import React from 'react';
2
2
  import type { SessionRecord } from '../sessionHistory.js';
3
+ /** Interaction mode of the `/resume` picker (issue #112). */
4
+ export type ResumePickerMode = 'list' | 'confirm-delete' | 'rename';
3
5
  /**
4
6
  * `/resume` session picker in the CC ModelPicker style: a Pane with the
5
7
  * recent sessions as Select rows (title + time description, ✓ on the
6
- * current session), plus the Enter/Esc hint line. Only WINDOW rows render;
7
- * the window follows the focused row, with `↑ N more` / `↓ N more` markers
8
- * at the edges.
8
+ * current session), plus the hint line. Only WINDOW rows render; the window
9
+ * follows the focused row, with `↑ N more` / `↓ N more` markers at the
10
+ * edges.
11
+ *
12
+ * Beyond plain selection (pi-tui style session management, issue #112):
13
+ * - `confirm-delete` replaces the hints with a delete confirmation for the
14
+ * focused session (Enter deletes, Esc backs out);
15
+ * - `rename` shows an inline SearchBox editing the focused session's title
16
+ * (Enter saves, Esc discards).
17
+ * Keyboard handling lives in the caller (Chat).
9
18
  */
10
- export declare function ResumePicker({ sessions, focusIndex, currentSessionId, }: {
19
+ export declare function ResumePicker({ sessions, focusIndex, currentSessionId, mode, renameText, }: {
11
20
  sessions: readonly SessionRecord[];
12
21
  focusIndex: number;
13
22
  currentSessionId: string;
23
+ mode: ResumePickerMode;
24
+ renameText: string;
14
25
  }): React.ReactNode;
15
26
  //# sourceMappingURL=ResumePicker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ResumePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ResumePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAsBzD;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,UAAU,EACV,gBAAgB,GACjB,EAAE;IACD,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAA;IAClC,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;CACzB,GAAG,KAAK,CAAC,SAAS,CA8ClB"}
1
+ {"version":3,"file":"ResumePicker.d.ts","sourceRoot":"","sources":["../../../src/components/ResumePicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAIzB,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAA;AAuBzD,6DAA6D;AAC7D,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,gBAAgB,GAAG,QAAQ,CAAA;AAEnE;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,EAC3B,QAAQ,EACR,UAAU,EACV,gBAAgB,EAChB,IAAI,EACJ,UAAU,GACX,EAAE;IACD,QAAQ,EAAE,SAAS,aAAa,EAAE,CAAA;IAClC,UAAU,EAAE,MAAM,CAAA;IAClB,gBAAgB,EAAE,MAAM,CAAA;IACxB,IAAI,EAAE,gBAAgB,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;CACnB,GAAG,KAAK,CAAC,SAAS,CAsElB"}
@@ -1,13 +1,16 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Text } from '../ui.js';
3
+ import { useTerminalFocus } from '../ink/hooks/use-terminal-focus.js';
4
+ import { t, getLang } from '../i18n.js';
3
5
  import { Pane } from './design-system/Pane.js';
4
6
  import { ListItem } from './design-system/ListItem.js';
5
- import { Byline } from './design-system/Byline.js';
6
- import { KeyboardShortcutHint } from './design-system/KeyboardShortcutHint.js';
7
- /** Compact timestamp like `Jan 2, 03:04` for the resume list. */
7
+ import { HintLine } from './design-system/HintLine.js';
8
+ import { SearchBox } from './SearchBox.js';
9
+ import { modLabel } from '../utils/modifiers.js';
10
+ /** Compact timestamp like `Jan 2, 03:04` (en) / `1月2日 03:04` (zh). */
8
11
  function formatTimestamp(ms) {
9
12
  const date = new Date(ms);
10
- return date.toLocaleString('en-US', {
13
+ return date.toLocaleString(getLang() === 'zh' ? 'zh-CN' : 'en-US', {
11
14
  month: 'short',
12
15
  day: 'numeric',
13
16
  hour: '2-digit',
@@ -21,14 +24,27 @@ const WINDOW = 8;
21
24
  /**
22
25
  * `/resume` session picker in the CC ModelPicker style: a Pane with the
23
26
  * recent sessions as Select rows (title + time description, ✓ on the
24
- * current session), plus the Enter/Esc hint line. Only WINDOW rows render;
25
- * the window follows the focused row, with `↑ N more` / `↓ N more` markers
26
- * at the edges.
27
+ * current session), plus the hint line. Only WINDOW rows render; the window
28
+ * follows the focused row, with `↑ N more` / `↓ N more` markers at the
29
+ * edges.
30
+ *
31
+ * Beyond plain selection (pi-tui style session management, issue #112):
32
+ * - `confirm-delete` replaces the hints with a delete confirmation for the
33
+ * focused session (Enter deletes, Esc backs out);
34
+ * - `rename` shows an inline SearchBox editing the focused session's title
35
+ * (Enter saves, Esc discards).
36
+ * Keyboard handling lives in the caller (Chat).
27
37
  */
28
- export function ResumePicker({ sessions, focusIndex, currentSessionId, }) {
38
+ export function ResumePicker({ sessions, focusIndex, currentSessionId, mode, renameText, }) {
39
+ const isTerminalFocused = useTerminalFocus();
29
40
  const start = Math.max(0, Math.min(focusIndex - Math.floor(WINDOW / 2), sessions.length - WINDOW));
30
41
  const visible = sessions.slice(start, start + WINDOW);
31
42
  const above = start;
32
43
  const below = Math.max(0, sessions.length - (start + WINDOW));
33
- return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children: "Resume" }) }), above > 0 && (_jsxs(Text, { dimColor: true, italic: true, children: ["\u2191 ", above, " more"] })), visible.map(session => (_jsx(ListItem, { isFocused: session.id === sessions[focusIndex]?.id, isSelected: session.id === currentSessionId, description: formatTimestamp(session.updatedAt), children: session.title || session.id }, session.id))), below > 0 && (_jsxs(Text, { dimColor: true, italic: true, children: ["\u2193 ", below, " more"] }))] }), _jsx(Text, { dimColor: true, italic: true, children: _jsxs(Byline, { children: [_jsx(KeyboardShortcutHint, { shortcut: "Enter", action: "confirm", bold: true }), _jsx(KeyboardShortcutHint, { shortcut: "Esc", action: "exit" })] }) })] }));
44
+ const focused = sessions[focusIndex];
45
+ return (_jsxs(Pane, { color: "permission", children: [_jsxs(Box, { flexDirection: "column", children: [_jsx(Box, { marginBottom: 1, children: _jsx(Text, { color: "remember", bold: true, children: t('resume-title') }) }), above > 0 && (_jsx(Text, { dimColor: true, italic: true, children: t('resume-more-above', { n: above }) })), visible.map(session => (_jsx(ListItem, { isFocused: session.id === sessions[focusIndex]?.id, isSelected: session.id === currentSessionId, description: formatTimestamp(session.updatedAt), children: session.title || session.id }, session.id))), below > 0 && (_jsx(Text, { dimColor: true, italic: true, children: t('resume-more-below', { n: below }) })), mode === 'confirm-delete' && focused !== undefined && (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: "error", children: t('resume-delete-confirm', { name: focused.title || focused.id }) }) })), mode === 'rename' && (_jsx(Box, { marginTop: 1, children: _jsx(SearchBox, { query: renameText, isFocused: true, isTerminalFocused: isTerminalFocused, placeholder: t('resume-rename-placeholder'), prefix: "\u270E", borderless: true }) }))] }), _jsx(Text, { dimColor: true, italic: true, children: _jsx(HintLine, { text: mode === 'list'
46
+ ? t('resume-hint-list', { mod: modLabel })
47
+ : mode === 'confirm-delete'
48
+ ? t('resume-hint-delete')
49
+ : t('resume-hint-rename') }) })] }));
34
50
  }
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { ChatRow } from '../channel.js';
2
+ import type { ChatRow } from '../dsh-adapter/channel.js';
3
3
  /**
4
4
  * Double-Esc rewind picker (CC's "Double-tap esc to rewind the code and/or
5
5
  * conversation to a previous point in time"): lists the user's past messages
@@ -1 +1 @@
1
- {"version":3,"file":"RewindPicker.d.ts","sourceRoot":"","sources":["../../../src/components/RewindPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAA;AAM5C;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,UAAU,EACV,UAAU,GACX,EAAE;IACD,IAAI,EAAE,SAAS,OAAO,EAAE,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,OAAO,GAAG,IAAI,CAAA;CAC3B,GAAG,KAAK,CAAC,SAAS,CAuDlB"}
1
+ {"version":3,"file":"RewindPicker.d.ts","sourceRoot":"","sources":["../../../src/components/RewindPicker.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AAGzB,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAA;AAMxD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,EAC3B,IAAI,EACJ,UAAU,EACV,UAAU,GACX,EAAE;IACD,IAAI,EAAE,SAAS,OAAO,EAAE,CAAA;IACxB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,OAAO,GAAG,IAAI,CAAA;CAC3B,GAAG,KAAK,CAAC,SAAS,CA+DlB"}