gencode-ai 0.1.1 → 0.1.3

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 (287) hide show
  1. package/.gencode/settings.local.json +7 -0
  2. package/CLAUDE.md +86 -0
  3. package/README.md +13 -16
  4. package/dist/agent/agent.d.ts +50 -1
  5. package/dist/agent/agent.d.ts.map +1 -1
  6. package/dist/agent/agent.js +96 -16
  7. package/dist/agent/agent.js.map +1 -1
  8. package/dist/agent/index.d.ts +1 -0
  9. package/dist/agent/index.d.ts.map +1 -1
  10. package/dist/agent/types.d.ts +14 -1
  11. package/dist/agent/types.d.ts.map +1 -1
  12. package/dist/cli/components/App.d.ts +8 -1
  13. package/dist/cli/components/App.d.ts.map +1 -1
  14. package/dist/cli/components/App.js +266 -29
  15. package/dist/cli/components/App.js.map +1 -1
  16. package/dist/cli/components/CommandSuggestions.d.ts.map +1 -1
  17. package/dist/cli/components/CommandSuggestions.js +2 -0
  18. package/dist/cli/components/CommandSuggestions.js.map +1 -1
  19. package/dist/cli/components/Header.d.ts +1 -1
  20. package/dist/cli/components/Header.d.ts.map +1 -1
  21. package/dist/cli/components/Header.js +4 -6
  22. package/dist/cli/components/Header.js.map +1 -1
  23. package/dist/cli/components/Logo.d.ts +1 -0
  24. package/dist/cli/components/Logo.d.ts.map +1 -1
  25. package/dist/cli/components/Logo.js +16 -3
  26. package/dist/cli/components/Logo.js.map +1 -1
  27. package/dist/cli/components/Messages.d.ts +4 -4
  28. package/dist/cli/components/Messages.d.ts.map +1 -1
  29. package/dist/cli/components/Messages.js +66 -23
  30. package/dist/cli/components/Messages.js.map +1 -1
  31. package/dist/cli/components/PermissionPrompt.d.ts +60 -0
  32. package/dist/cli/components/PermissionPrompt.d.ts.map +1 -0
  33. package/dist/cli/components/PermissionPrompt.js +192 -0
  34. package/dist/cli/components/PermissionPrompt.js.map +1 -0
  35. package/dist/cli/components/ProviderManager.js +3 -3
  36. package/dist/cli/components/ProviderManager.js.map +1 -1
  37. package/dist/cli/components/QuestionPrompt.d.ts +23 -0
  38. package/dist/cli/components/QuestionPrompt.d.ts.map +1 -0
  39. package/dist/cli/components/QuestionPrompt.js +231 -0
  40. package/dist/cli/components/QuestionPrompt.js.map +1 -0
  41. package/dist/cli/components/Spinner.d.ts +7 -2
  42. package/dist/cli/components/Spinner.d.ts.map +1 -1
  43. package/dist/cli/components/Spinner.js +116 -25
  44. package/dist/cli/components/Spinner.js.map +1 -1
  45. package/dist/cli/components/TodoList.d.ts +7 -0
  46. package/dist/cli/components/TodoList.d.ts.map +1 -0
  47. package/dist/cli/components/TodoList.js +34 -0
  48. package/dist/cli/components/TodoList.js.map +1 -0
  49. package/dist/cli/components/index.d.ts +2 -0
  50. package/dist/cli/components/index.d.ts.map +1 -1
  51. package/dist/cli/components/index.js +2 -0
  52. package/dist/cli/components/index.js.map +1 -1
  53. package/dist/cli/components/theme.d.ts +7 -0
  54. package/dist/cli/components/theme.d.ts.map +1 -1
  55. package/dist/cli/components/theme.js +11 -1
  56. package/dist/cli/components/theme.js.map +1 -1
  57. package/dist/cli/index.js +47 -7
  58. package/dist/cli/index.js.map +1 -1
  59. package/dist/config/index.d.ts +13 -4
  60. package/dist/config/index.d.ts.map +1 -1
  61. package/dist/config/index.js +18 -3
  62. package/dist/config/index.js.map +1 -1
  63. package/dist/config/levels.d.ts +49 -0
  64. package/dist/config/levels.d.ts.map +1 -0
  65. package/dist/config/levels.js +222 -0
  66. package/dist/config/levels.js.map +1 -0
  67. package/dist/config/loader.d.ts +46 -0
  68. package/dist/config/loader.d.ts.map +1 -0
  69. package/dist/config/loader.js +153 -0
  70. package/dist/config/loader.js.map +1 -0
  71. package/dist/config/manager.d.ts +115 -15
  72. package/dist/config/manager.d.ts.map +1 -1
  73. package/dist/config/manager.js +260 -34
  74. package/dist/config/manager.js.map +1 -1
  75. package/dist/config/manager.test.d.ts +5 -0
  76. package/dist/config/manager.test.d.ts.map +1 -0
  77. package/dist/config/manager.test.js +192 -0
  78. package/dist/config/manager.test.js.map +1 -0
  79. package/dist/config/merger.d.ts +56 -0
  80. package/dist/config/merger.d.ts.map +1 -0
  81. package/dist/config/merger.js +177 -0
  82. package/dist/config/merger.js.map +1 -0
  83. package/dist/config/test-utils.d.ts +24 -0
  84. package/dist/config/test-utils.d.ts.map +1 -0
  85. package/dist/config/test-utils.js +55 -0
  86. package/dist/config/test-utils.js.map +1 -0
  87. package/dist/config/types.d.ts +78 -9
  88. package/dist/config/types.d.ts.map +1 -1
  89. package/dist/config/types.js +52 -2
  90. package/dist/config/types.js.map +1 -1
  91. package/dist/memory/import-resolver.d.ts +46 -0
  92. package/dist/memory/import-resolver.d.ts.map +1 -0
  93. package/dist/memory/import-resolver.js +117 -0
  94. package/dist/memory/import-resolver.js.map +1 -0
  95. package/dist/memory/index.d.ts +7 -6
  96. package/dist/memory/index.d.ts.map +1 -1
  97. package/dist/memory/index.js +7 -5
  98. package/dist/memory/index.js.map +1 -1
  99. package/dist/memory/init-prompt.d.ts +22 -0
  100. package/dist/memory/init-prompt.d.ts.map +1 -0
  101. package/dist/memory/init-prompt.js +103 -0
  102. package/dist/memory/init-prompt.js.map +1 -0
  103. package/dist/memory/memory-manager.d.ts +119 -0
  104. package/dist/memory/memory-manager.d.ts.map +1 -0
  105. package/dist/memory/memory-manager.js +587 -0
  106. package/dist/memory/memory-manager.js.map +1 -0
  107. package/dist/memory/rules-parser.d.ts +38 -0
  108. package/dist/memory/rules-parser.d.ts.map +1 -0
  109. package/dist/memory/rules-parser.js +69 -0
  110. package/dist/memory/rules-parser.js.map +1 -0
  111. package/dist/memory/test-utils.d.ts +20 -0
  112. package/dist/memory/test-utils.d.ts.map +1 -0
  113. package/dist/memory/test-utils.js +44 -0
  114. package/dist/memory/test-utils.js.map +1 -0
  115. package/dist/memory/types.d.ts +70 -63
  116. package/dist/memory/types.d.ts.map +1 -1
  117. package/dist/memory/types.js +42 -2
  118. package/dist/memory/types.js.map +1 -1
  119. package/dist/permissions/audit.d.ts +82 -0
  120. package/dist/permissions/audit.d.ts.map +1 -0
  121. package/dist/permissions/audit.js +229 -0
  122. package/dist/permissions/audit.js.map +1 -0
  123. package/dist/permissions/index.d.ts +11 -1
  124. package/dist/permissions/index.d.ts.map +1 -1
  125. package/dist/permissions/index.js +15 -0
  126. package/dist/permissions/index.js.map +1 -1
  127. package/dist/permissions/manager.d.ts +149 -13
  128. package/dist/permissions/manager.d.ts.map +1 -1
  129. package/dist/permissions/manager.js +480 -35
  130. package/dist/permissions/manager.js.map +1 -1
  131. package/dist/permissions/manager.test.d.ts +5 -0
  132. package/dist/permissions/manager.test.d.ts.map +1 -0
  133. package/dist/permissions/manager.test.js +213 -0
  134. package/dist/permissions/manager.test.js.map +1 -0
  135. package/dist/permissions/persistence.d.ts +74 -0
  136. package/dist/permissions/persistence.d.ts.map +1 -0
  137. package/dist/permissions/persistence.js +248 -0
  138. package/dist/permissions/persistence.js.map +1 -0
  139. package/dist/permissions/persistence.test.d.ts +5 -0
  140. package/dist/permissions/persistence.test.d.ts.map +1 -0
  141. package/dist/permissions/persistence.test.js +171 -0
  142. package/dist/permissions/persistence.test.js.map +1 -0
  143. package/dist/permissions/prompt-matcher.d.ts +64 -0
  144. package/dist/permissions/prompt-matcher.d.ts.map +1 -0
  145. package/dist/permissions/prompt-matcher.js +415 -0
  146. package/dist/permissions/prompt-matcher.js.map +1 -0
  147. package/dist/permissions/prompt-matcher.test.d.ts +5 -0
  148. package/dist/permissions/prompt-matcher.test.d.ts.map +1 -0
  149. package/dist/permissions/prompt-matcher.test.js +107 -0
  150. package/dist/permissions/prompt-matcher.test.js.map +1 -0
  151. package/dist/permissions/types.d.ts +157 -0
  152. package/dist/permissions/types.d.ts.map +1 -1
  153. package/dist/permissions/types.js +45 -8
  154. package/dist/permissions/types.js.map +1 -1
  155. package/dist/prompts/index.d.ts +92 -0
  156. package/dist/prompts/index.d.ts.map +1 -0
  157. package/dist/prompts/index.js +241 -0
  158. package/dist/prompts/index.js.map +1 -0
  159. package/dist/tools/builtin/ask-user.d.ts +64 -0
  160. package/dist/tools/builtin/ask-user.d.ts.map +1 -0
  161. package/dist/tools/builtin/ask-user.js +148 -0
  162. package/dist/tools/builtin/ask-user.js.map +1 -0
  163. package/dist/tools/builtin/bash.d.ts.map +1 -1
  164. package/dist/tools/builtin/bash.js +2 -1
  165. package/dist/tools/builtin/bash.js.map +1 -1
  166. package/dist/tools/builtin/edit.d.ts.map +1 -1
  167. package/dist/tools/builtin/edit.js +2 -1
  168. package/dist/tools/builtin/edit.js.map +1 -1
  169. package/dist/tools/builtin/glob.d.ts.map +1 -1
  170. package/dist/tools/builtin/glob.js +2 -1
  171. package/dist/tools/builtin/glob.js.map +1 -1
  172. package/dist/tools/builtin/grep.d.ts.map +1 -1
  173. package/dist/tools/builtin/grep.js +2 -1
  174. package/dist/tools/builtin/grep.js.map +1 -1
  175. package/dist/tools/builtin/read.d.ts.map +1 -1
  176. package/dist/tools/builtin/read.js +2 -1
  177. package/dist/tools/builtin/read.js.map +1 -1
  178. package/dist/tools/builtin/todowrite.d.ts +15 -0
  179. package/dist/tools/builtin/todowrite.d.ts.map +1 -0
  180. package/dist/tools/builtin/todowrite.js +88 -0
  181. package/dist/tools/builtin/todowrite.js.map +1 -0
  182. package/dist/tools/builtin/webfetch.d.ts.map +1 -1
  183. package/dist/tools/builtin/webfetch.js +2 -5
  184. package/dist/tools/builtin/webfetch.js.map +1 -1
  185. package/dist/tools/builtin/websearch.d.ts.map +1 -1
  186. package/dist/tools/builtin/websearch.js +2 -16
  187. package/dist/tools/builtin/websearch.js.map +1 -1
  188. package/dist/tools/builtin/write.d.ts.map +1 -1
  189. package/dist/tools/builtin/write.js +2 -1
  190. package/dist/tools/builtin/write.js.map +1 -1
  191. package/dist/tools/index.d.ts +19 -0
  192. package/dist/tools/index.d.ts.map +1 -1
  193. package/dist/tools/index.js +8 -0
  194. package/dist/tools/index.js.map +1 -1
  195. package/dist/tools/types.d.ts +39 -0
  196. package/dist/tools/types.d.ts.map +1 -1
  197. package/dist/tools/types.js +8 -0
  198. package/dist/tools/types.js.map +1 -1
  199. package/docs/config-system-comparison.md +707 -0
  200. package/docs/memory-system.md +238 -0
  201. package/docs/permissions.md +368 -0
  202. package/docs/proposals/0005-todo-system.md +350 -85
  203. package/docs/proposals/0006-memory-system.md +11 -10
  204. package/docs/proposals/0012-ask-user-question.md +1007 -207
  205. package/docs/proposals/0023-permission-enhancements.md +61 -2
  206. package/docs/proposals/0041-configuration-system.md +33 -2
  207. package/docs/proposals/0042-prompt-optimization.md +866 -0
  208. package/docs/proposals/README.md +7 -6
  209. package/examples/test-ask-user.ts +167 -0
  210. package/jest.config.js +26 -0
  211. package/package.json +8 -2
  212. package/src/agent/agent.ts +130 -16
  213. package/src/agent/index.ts +1 -0
  214. package/src/agent/types.ts +13 -1
  215. package/src/cli/components/App.tsx +362 -37
  216. package/src/cli/components/CommandSuggestions.tsx +2 -0
  217. package/src/cli/components/Header.tsx +11 -17
  218. package/src/cli/components/Logo.tsx +76 -9
  219. package/src/cli/components/Messages.tsx +104 -41
  220. package/src/cli/components/PermissionPrompt.tsx +388 -0
  221. package/src/cli/components/ProviderManager.tsx +5 -5
  222. package/src/cli/components/QuestionPrompt.tsx +462 -0
  223. package/src/cli/components/Spinner.tsx +138 -25
  224. package/src/cli/components/TodoList.tsx +54 -0
  225. package/src/cli/components/index.ts +7 -0
  226. package/src/cli/components/theme.ts +11 -1
  227. package/src/cli/index.tsx +54 -6
  228. package/src/config/index.ts +78 -4
  229. package/src/config/levels.test.ts +163 -0
  230. package/src/config/levels.ts +285 -0
  231. package/src/config/loader.test.ts +120 -0
  232. package/src/config/loader.ts +178 -0
  233. package/src/config/manager.test.ts +215 -0
  234. package/src/config/manager.ts +328 -40
  235. package/src/config/merger.test.ts +360 -0
  236. package/src/config/merger.ts +221 -0
  237. package/src/config/test-utils.ts +79 -0
  238. package/src/config/types.ts +152 -9
  239. package/src/memory/import-resolver.test.ts +117 -0
  240. package/src/memory/import-resolver.ts +149 -0
  241. package/src/memory/index.ts +11 -0
  242. package/src/memory/init-prompt.ts +113 -0
  243. package/src/memory/memory-manager.test.ts +198 -0
  244. package/src/memory/memory-manager.ts +716 -0
  245. package/src/memory/rules-parser.test.ts +182 -0
  246. package/src/memory/rules-parser.ts +82 -0
  247. package/src/memory/test-utils.ts +60 -0
  248. package/src/memory/types.ts +119 -0
  249. package/src/permissions/audit.ts +284 -0
  250. package/src/permissions/index.ts +20 -1
  251. package/src/permissions/manager.test.ts +260 -0
  252. package/src/permissions/manager.ts +592 -40
  253. package/src/permissions/persistence.test.ts +220 -0
  254. package/src/permissions/persistence.ts +301 -0
  255. package/src/permissions/prompt-matcher.test.ts +213 -0
  256. package/src/permissions/prompt-matcher.ts +472 -0
  257. package/src/permissions/types.ts +238 -8
  258. package/src/prompts/index.test.ts +279 -0
  259. package/src/prompts/index.ts +306 -0
  260. package/src/prompts/system/anthropic.txt +29 -0
  261. package/src/prompts/system/base.txt +166 -0
  262. package/src/prompts/system/gemini.txt +35 -0
  263. package/src/prompts/system/generic.txt +128 -0
  264. package/src/prompts/system/openai.txt +29 -0
  265. package/src/prompts/tools/ask-user.txt +110 -0
  266. package/src/prompts/tools/bash.txt +60 -0
  267. package/src/prompts/tools/edit.txt +29 -0
  268. package/src/prompts/tools/glob.txt +35 -0
  269. package/src/prompts/tools/grep.txt +43 -0
  270. package/src/prompts/tools/read.txt +22 -0
  271. package/src/prompts/tools/todowrite.txt +71 -0
  272. package/src/prompts/tools/webfetch.txt +34 -0
  273. package/src/prompts/tools/websearch.txt +41 -0
  274. package/src/prompts/tools/write.txt +23 -0
  275. package/src/tools/builtin/ask-user.ts +185 -0
  276. package/src/tools/builtin/bash.ts +2 -1
  277. package/src/tools/builtin/edit.ts +2 -1
  278. package/src/tools/builtin/glob.ts +2 -1
  279. package/src/tools/builtin/grep.ts +2 -1
  280. package/src/tools/builtin/read.ts +2 -1
  281. package/src/tools/builtin/todowrite.ts +102 -0
  282. package/src/tools/builtin/webfetch.ts +2 -5
  283. package/src/tools/builtin/websearch.ts +2 -16
  284. package/src/tools/builtin/write.ts +2 -1
  285. package/src/tools/index.ts +19 -0
  286. package/src/tools/types.ts +30 -0
  287. package/tsconfig.json +1 -1
@@ -1,8 +1,21 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Text } from 'ink';
3
+ import { colors } from './theme.js';
4
+ // Small G logo for inline use
3
5
  export function Logo() {
4
- // Full G with 3D shadow - subdued slate color
5
- const slateColor = "#64748B"; // Slate 500 - stable, professional
6
- return (_jsxs(Box, { flexDirection: "column", marginRight: 1, children: [_jsx(Text, { color: slateColor, children: " \u2588\u2588\u2588\u2588\u2588\u2588\u2557 " }), _jsx(Text, { color: slateColor, children: " \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D " }), _jsx(Text, { color: slateColor, children: " \u2588\u2588\u2551 \u2588\u2588\u2588\u2557" }), _jsx(Text, { color: slateColor, children: " \u2588\u2588\u2551 \u2588\u2588\u2551" }), _jsx(Text, { color: slateColor, children: " \u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D" }), _jsx(Text, { color: slateColor, children: " \u255A\u2550\u2550\u2550\u2550\u2550\u255D " })] }));
6
+ return (_jsx(Box, { marginRight: 1, children: _jsx(Text, { bold: true, color: colors.brand, children: "\u25C6" }) }));
7
+ }
8
+ // Large ASCII art logo with elegant gradient
9
+ export function BigLogo() {
10
+ // Indigo gradient - brand colors
11
+ const c1 = '#818CF8'; // Indigo 400
12
+ const c2 = '#818CF8'; // Indigo 400
13
+ const c3 = '#A5B4FC'; // Indigo 300
14
+ const c4 = '#A5B4FC'; // Indigo 300
15
+ const c5 = '#C7D2FE'; // Indigo 200
16
+ const c6 = '#C7D2FE'; // Indigo 200
17
+ const c7 = '#C7D2FE'; // Indigo 200
18
+ // G E N C O D E
19
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsxs(Text, { children: [_jsx(Text, { color: c1, children: " \u2588\u2588\u2588\u2588\u2588\u2588\u2557 " }), _jsx(Text, { color: c2, children: "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557" }), _jsx(Text, { color: c3, children: "\u2588\u2588\u2588\u2557 \u2588\u2588\u2557" }), _jsx(Text, { color: c4, children: " \u2588\u2588\u2588\u2588\u2588\u2588\u2557" }), _jsx(Text, { color: c5, children: " \u2588\u2588\u2588\u2588\u2588\u2588\u2557 " }), _jsx(Text, { color: c6, children: "\u2588\u2588\u2588\u2588\u2588\u2588\u2557 " }), _jsx(Text, { color: c7, children: "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557" })] }), _jsxs(Text, { children: [_jsx(Text, { color: c1, children: "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D " }), _jsx(Text, { color: c2, children: "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D" }), _jsx(Text, { color: c3, children: "\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551" }), _jsx(Text, { color: c4, children: "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D" }), _jsx(Text, { color: c5, children: "\u2588\u2588\u2554\u2550\u2550\u2550\u2588\u2588\u2557" }), _jsx(Text, { color: c6, children: "\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557" }), _jsx(Text, { color: c7, children: "\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D" })] }), _jsxs(Text, { children: [_jsx(Text, { color: c1, children: "\u2588\u2588\u2551 \u2588\u2588\u2588\u2557" }), _jsx(Text, { color: c2, children: "\u2588\u2588\u2588\u2588\u2588\u2557 " }), _jsx(Text, { color: c3, children: "\u2588\u2588\u2554\u2588\u2588\u2557 \u2588\u2588\u2551" }), _jsx(Text, { color: c4, children: "\u2588\u2588\u2551 " }), _jsx(Text, { color: c5, children: "\u2588\u2588\u2551 \u2588\u2588\u2551" }), _jsx(Text, { color: c6, children: "\u2588\u2588\u2551 \u2588\u2588\u2551" }), _jsx(Text, { color: c7, children: "\u2588\u2588\u2588\u2588\u2588\u2557 " })] }), _jsxs(Text, { children: [_jsx(Text, { color: c1, children: "\u2588\u2588\u2551 \u2588\u2588\u2551" }), _jsx(Text, { color: c2, children: "\u2588\u2588\u2554\u2550\u2550\u255D " }), _jsx(Text, { color: c3, children: "\u2588\u2588\u2551\u255A\u2588\u2588\u2557\u2588\u2588\u2551" }), _jsx(Text, { color: c4, children: "\u2588\u2588\u2551 " }), _jsx(Text, { color: c5, children: "\u2588\u2588\u2551 \u2588\u2588\u2551" }), _jsx(Text, { color: c6, children: "\u2588\u2588\u2551 \u2588\u2588\u2551" }), _jsx(Text, { color: c7, children: "\u2588\u2588\u2554\u2550\u2550\u255D " })] }), _jsxs(Text, { children: [_jsx(Text, { color: c1, children: "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D" }), _jsx(Text, { color: c2, children: "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557" }), _jsx(Text, { color: c3, children: "\u2588\u2588\u2551 \u255A\u2588\u2588\u2588\u2588\u2551" }), _jsx(Text, { color: c4, children: "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2557" }), _jsx(Text, { color: c5, children: "\u255A\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D" }), _jsx(Text, { color: c6, children: "\u2588\u2588\u2588\u2588\u2588\u2588\u2554\u255D" }), _jsx(Text, { color: c7, children: "\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557" })] }), _jsxs(Text, { children: [_jsx(Text, { color: c1, children: " \u255A\u2550\u2550\u2550\u2550\u2550\u255D " }), _jsx(Text, { color: c2, children: "\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D" }), _jsx(Text, { color: c3, children: "\u255A\u2550\u255D \u255A\u2550\u2550\u2550\u255D" }), _jsx(Text, { color: c4, children: " \u255A\u2550\u2550\u2550\u2550\u2550\u255D" }), _jsx(Text, { color: c5, children: " \u255A\u2550\u2550\u2550\u2550\u2550\u255D " }), _jsx(Text, { color: c6, children: "\u255A\u2550\u2550\u2550\u2550\u2550\u255D " }), _jsx(Text, { color: c7, children: "\u255A\u2550\u2550\u2550\u2550\u2550\u2550\u255D" })] })] }));
7
20
  }
8
21
  //# sourceMappingURL=Logo.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Logo.js","sourceRoot":"","sources":["../../../src/cli/components/Logo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAEhC,MAAM,UAAU,IAAI;IAClB,8CAA8C;IAC9C,MAAM,UAAU,GAAG,SAAS,CAAC,CAAC,mCAAmC;IACjE,OAAO,CACL,MAAC,GAAG,IAAC,aAAa,EAAC,QAAQ,EAAC,WAAW,EAAE,CAAC,aACxC,KAAC,IAAI,IAAC,KAAK,EAAE,UAAU,8DAAmB,EAC1C,KAAC,IAAI,IAAC,KAAK,EAAE,UAAU,mEAAmB,EAC1C,KAAC,IAAI,IAAC,KAAK,EAAE,UAAU,8DAAmB,EAC1C,KAAC,IAAI,IAAC,KAAK,EAAE,UAAU,yDAAmB,EAC1C,KAAC,IAAI,IAAC,KAAK,EAAE,UAAU,wEAAmB,EAC1C,KAAC,IAAI,IAAC,KAAK,EAAE,UAAU,8DAAmB,IACtC,CACP,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"Logo.js","sourceRoot":"","sources":["../../../src/cli/components/Logo.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,8BAA8B;AAC9B,MAAM,UAAU,IAAI;IAClB,OAAO,CACL,KAAC,GAAG,IAAC,WAAW,EAAE,CAAC,YACjB,KAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,MAAM,CAAC,KAAK,uBAAU,GACpC,CACP,CAAC;AACJ,CAAC;AAED,6CAA6C;AAC7C,MAAM,UAAU,OAAO;IACrB,iCAAiC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,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,4DAAiB,EAChC,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,6DAAkB,EACjC,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,4DAAiB,EAChC,KAAC,IAAI,IAAC,KAAK,EAAE,EAAE,iEAAiB,IAC3B,IACH,CACP,CAAC;AACJ,CAAC"}
@@ -11,12 +11,12 @@ interface ToolCallProps {
11
11
  name: string;
12
12
  input: Record<string, unknown>;
13
13
  }
14
- export declare function ToolCall({ name, input }: ToolCallProps): import("react/jsx-runtime").JSX.Element;
14
+ export declare function ToolCall({ name, input }: ToolCallProps): import("react/jsx-runtime").JSX.Element | null;
15
15
  interface PendingToolCallProps {
16
16
  name: string;
17
17
  input: Record<string, unknown>;
18
18
  }
19
- export declare function PendingToolCall({ name, input }: PendingToolCallProps): import("react/jsx-runtime").JSX.Element;
19
+ export declare function PendingToolCall({ name, input }: PendingToolCallProps): import("react/jsx-runtime").JSX.Element | null;
20
20
  interface ToolResultMetadata {
21
21
  title?: string;
22
22
  subtitle?: string;
@@ -31,7 +31,7 @@ interface ToolResultProps {
31
31
  output: string;
32
32
  metadata?: ToolResultMetadata;
33
33
  }
34
- export declare function ToolResult({ name, success, output, metadata }: ToolResultProps): import("react/jsx-runtime").JSX.Element;
34
+ export declare function ToolResult({ name, success, output, metadata }: ToolResultProps): import("react/jsx-runtime").JSX.Element | null;
35
35
  interface InfoMessageProps {
36
36
  text: string;
37
37
  type?: 'info' | 'success' | 'warning' | 'error';
@@ -41,7 +41,7 @@ export declare function Separator(): import("react/jsx-runtime").JSX.Element;
41
41
  interface WelcomeMessageProps {
42
42
  model: string;
43
43
  }
44
- export declare function WelcomeMessage({ model }: WelcomeMessageProps): import("react/jsx-runtime").JSX.Element;
44
+ export declare function WelcomeMessage({ model: _model }: WelcomeMessageProps): import("react/jsx-runtime").JSX.Element;
45
45
  export declare function ShortcutsHint(): import("react/jsx-runtime").JSX.Element;
46
46
  interface CompletionMessageProps {
47
47
  durationMs: number;
@@ -1 +1 @@
1
- {"version":3,"file":"Messages.d.ts","sourceRoot":"","sources":["../../../src/cli/components/Messages.tsx"],"names":[],"mappings":"AAkCA,UAAU,gBAAgB;IACxB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wBAAgB,WAAW,CAAC,EAAE,IAAI,EAAE,EAAE,gBAAgB,2CAYrD;AAED,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,qBAAqB,kDAsC1E;AAED,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,aAAa,2CAyBtD;AAGD,UAAU,oBAAoB;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAChC;AAED,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,EAAE,oBAAoB,2CA4BpE;AAED,UAAU,kBAAkB;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,kBAAkB,CAAC;CAC/B;AAED,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAA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"react/jsx-runtime";
2
2
  import { Box, Text } from 'ink';
3
3
  import InkSpinner from 'ink-spinner';
4
4
  import { colors, icons } from './theme.js';
@@ -34,7 +34,9 @@ function wrapText(text, width) {
34
34
  }
35
35
  export function UserMessage({ text }) {
36
36
  const lines = text.trimEnd().split('\n');
37
- return (_jsx(Box, { flexDirection: "column", marginTop: 1, marginBottom: 0, children: lines.map((line, i) => (_jsxs(Box, { children: [_jsxs(Text, { color: colors.brand, children: [icons.userPrompt, " "] }), _jsxs(Text, { backgroundColor: colors.inputBg, color: colors.text, children: [" ", line, " "] })] }, i))) }));
37
+ // Subtle gray - ~8% darker than pure white
38
+ const inputBg = '#EFEFEF';
39
+ return (_jsx(Box, { flexDirection: "column", marginTop: 1, marginBottom: 0, children: lines.map((line, i) => (_jsxs(Box, { backgroundColor: inputBg, children: [_jsxs(Text, { color: colors.brand, children: [icons.userPrompt, " "] }), _jsx(Text, { children: line })] }, i))) }));
38
40
  }
39
41
  export function AssistantMessage({ text, streaming }) {
40
42
  if (!text)
@@ -48,37 +50,78 @@ export function AssistantMessage({ text, streaming }) {
48
50
  }
49
51
  // Completed: render with markdown
50
52
  const rendered = renderMarkdown(text);
51
- return (_jsx(Box, { flexDirection: "column", marginTop: 1, marginBottom: 0, children: _jsxs(Box, { children: [_jsxs(Text, { color: colors.success, children: [icons.assistant, " "] }), _jsx(Text, { children: rendered })] }) }));
53
+ return (_jsx(Box, { flexDirection: "column", marginTop: 1, marginBottom: 0, children: _jsxs(Box, { children: [_jsx(Text, { color: colors.success, children: icons.assistant }), _jsx(Text, { children: " " }), _jsx(Text, { wrap: "wrap", children: rendered })] }) }));
54
+ }
55
+ // Format tool input for display
56
+ function formatToolInput(name, input) {
57
+ switch (name) {
58
+ case 'Read':
59
+ return input.file_path || '';
60
+ case 'Write':
61
+ case 'Edit':
62
+ return input.file_path || '';
63
+ case 'Glob':
64
+ return input.pattern || '';
65
+ case 'Grep':
66
+ return `"${input.pattern}"` + (input.path ? ` in ${input.path}` : '');
67
+ case 'Bash':
68
+ return truncate(input.command || '', 50);
69
+ case 'WebFetch':
70
+ return input.url || '';
71
+ case 'WebSearch':
72
+ return `"${input.query}"` || '';
73
+ case 'TodoWrite': {
74
+ const todos = input.todos || [];
75
+ return `${todos.length} task${todos.length !== 1 ? 's' : ''}`;
76
+ }
77
+ case 'AskUserQuestion': {
78
+ // Show collapsed JSON preview
79
+ const json = JSON.stringify(input);
80
+ return truncate(json, 60);
81
+ }
82
+ default:
83
+ return truncate(JSON.stringify(input), 40);
84
+ }
52
85
  }
53
86
  export function ToolCall({ name, input }) {
54
- // WebFetch: Show "Fetch(url)" instead of JSON (Claude Code style)
55
- if (name === 'WebFetch' && input?.url) {
56
- const shortUrl = truncate(input.url, 60);
57
- return (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: colors.tool, children: icons.fetch }), _jsx(Text, { children: " Fetch(" }), _jsx(Text, { color: colors.info, children: shortUrl }), _jsx(Text, { children: ")" })] }));
87
+ // Hide TodoWrite (shown in TodoList component)
88
+ if (name === 'TodoWrite')
89
+ return null;
90
+ // Special display for AskUserQuestion (Claude Code style with expand hint)
91
+ if (name === 'AskUserQuestion') {
92
+ const json = JSON.stringify(input);
93
+ const displayJson = truncate(json, 70);
94
+ return (_jsx(Box, { marginTop: 1, flexDirection: "column", children: _jsxs(Box, { children: [_jsx(Text, { color: colors.tool, children: icons.tool }), _jsx(Text, { children: " " }), _jsx(Text, { bold: true, children: name }), _jsx(Text, { color: colors.textMuted, children: " " }), _jsx(Text, { color: colors.textSecondary, children: displayJson }), _jsx(Text, { color: colors.textMuted, children: " ctrl+o" })] }) }));
58
95
  }
59
- // Default: Show tool name with JSON input
60
- const shortInput = truncate(JSON.stringify(input), 50);
61
- return (_jsx(Box, { marginTop: 1, children: _jsxs(Text, { dimColor: true, children: [_jsx(Text, { color: colors.tool, children: icons.tool }), " ", name, ' ', _jsx(Text, { color: colors.textMuted, children: shortInput })] }) }));
96
+ const displayInput = formatToolInput(name, input);
97
+ return (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: colors.tool, children: icons.tool }), _jsx(Text, { children: " " }), _jsx(Text, { bold: true, children: name }), displayInput && (_jsxs(_Fragment, { children: [_jsx(Text, { color: colors.textMuted, children: " " }), _jsx(Text, { color: colors.textSecondary, children: truncate(displayInput, 60) })] }))] }));
62
98
  }
63
99
  export function PendingToolCall({ name, input }) {
64
- // WebFetch: Show "Fetch(url)" with spinner
65
- if (name === 'WebFetch' && input?.url) {
66
- const shortUrl = truncate(input.url, 60);
67
- return (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: colors.tool, children: _jsx(InkSpinner, { type: "dots" }) }), _jsx(Text, { children: " Fetch(" }), _jsx(Text, { color: colors.info, children: shortUrl }), _jsx(Text, { children: ")" })] }));
100
+ // Hide TodoWrite (shown in TodoList component)
101
+ if (name === 'TodoWrite')
102
+ return null;
103
+ // Special display for AskUserQuestion
104
+ if (name === 'AskUserQuestion') {
105
+ const json = JSON.stringify(input);
106
+ const displayJson = truncate(json, 70);
107
+ return (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: colors.tool, children: _jsx(InkSpinner, { type: "dots" }) }), _jsx(Text, { children: " " }), _jsx(Text, { bold: true, children: name }), _jsx(Text, { color: colors.textMuted, children: " " }), _jsx(Text, { color: colors.textSecondary, children: displayJson }), _jsx(Text, { color: colors.textMuted, children: " ctrl+o" })] }));
68
108
  }
69
- // Default: Show tool name with spinner
70
- const shortInput = truncate(JSON.stringify(input), 50);
71
- return (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: colors.tool, children: _jsx(InkSpinner, { type: "dots" }) }), _jsxs(Text, { children: [" ", name, " "] }), _jsx(Text, { color: colors.textMuted, children: shortInput })] }));
109
+ const displayInput = formatToolInput(name, input);
110
+ return (_jsxs(Box, { marginTop: 1, children: [_jsx(Text, { color: colors.tool, children: _jsx(InkSpinner, { type: "dots" }) }), _jsx(Text, { children: " " }), _jsx(Text, { bold: true, children: name }), displayInput && (_jsxs(_Fragment, { children: [_jsx(Text, { children: " " }), _jsx(Text, { color: colors.textSecondary, children: truncate(displayInput, 60) })] }))] }));
72
111
  }
73
112
  export function ToolResult({ name, success, output, metadata }) {
74
113
  const statusColor = success ? colors.success : colors.error;
75
114
  // If metadata has subtitle (e.g., "Received 540.3KB (200 OK)"), show it
76
115
  if (metadata?.subtitle) {
77
- return (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { dimColor: true, children: [_jsx(Text, { children: icons.treeEnd }), ' ', _jsx(Text, { color: statusColor, children: metadata.subtitle })] }) }));
116
+ return (_jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { color: colors.textMuted, children: icons.treeEnd }), _jsx(Text, { children: " " }), _jsx(Text, { color: statusColor, children: metadata.subtitle })] }));
117
+ }
118
+ // TodoWrite: Don't show result (TodoList component shows the full list)
119
+ if (name === 'TodoWrite') {
120
+ return null;
78
121
  }
79
- // Default: Show first line of output
80
- const displayOutput = truncate(output.split('\n')[0]?.trim() || '', 50);
81
- return (_jsx(Box, { marginLeft: 2, children: _jsxs(Text, { dimColor: true, children: [_jsx(Text, { children: icons.treeEnd }), " ", name, ' ', _jsx(Text, { color: statusColor, children: displayOutput })] }) }));
122
+ // Default: Show first line of output with status icon
123
+ const displayOutput = truncate(output.split('\n')[0]?.trim() || '', 60);
124
+ return (_jsxs(Box, { marginLeft: 2, children: [_jsx(Text, { color: colors.textMuted, children: icons.treeEnd }), _jsx(Text, { children: " " }), _jsx(Text, { color: statusColor, children: displayOutput || (success ? 'Done' : 'Failed') })] }));
82
125
  }
83
126
  export function InfoMessage({ text, type = 'info' }) {
84
127
  const config = {
@@ -94,8 +137,8 @@ export function Separator() {
94
137
  const width = process.stdout.columns || 80;
95
138
  return _jsx(Text, { color: colors.separator, children: '─'.repeat(width) });
96
139
  }
97
- export function WelcomeMessage({ model }) {
98
- return (_jsxs(Box, { marginTop: 1, marginBottom: 0, children: [_jsx(Text, { color: colors.textMuted, children: "Welcome to " }), _jsx(Text, { color: colors.brand, children: model })] }));
140
+ export function WelcomeMessage({ model: _model }) {
141
+ return (_jsx(Box, { marginTop: 1, marginBottom: 0, children: _jsx(Text, { color: colors.textMuted, children: "? for help \u00B7 Ctrl+C to exit" }) }));
99
142
  }
100
143
  export function ShortcutsHint() {
101
144
  return (_jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.textMuted, children: " ? for shortcuts" }) }));
@@ -1 +1 @@
1
- {"version":3,"file":"Messages.js","sourceRoot":"","sources":["../../../src/cli/components/Messages.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,CAAC;AAChC,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAC3C,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAE/C,gCAAgC;AAChC,MAAM,QAAQ,GAAG,CAAC,GAAW,EAAE,MAAc,EAAE,EAAE,CAC/C,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,GAAG,CAAC,CAAC,GAAG,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC;AAE/D,mCAAmC;AACnC,SAAS,QAAQ,CAAC,IAAY,EAAE,KAAa;IAC3C,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC;QACpC,IAAI,IAAI,CAAC,MAAM,IAAI,KAAK,EAAE,CAAC;YACzB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACnB,CAAC;aAAM,CAAC;YACN,mBAAmB;YACnB,IAAI,WAAW,GAAG,EAAE,CAAC;YACrB,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YAC9B,KAAK,MAAM,IAAI,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AC,SAAS,kCAA0B,GACnD,CACP,CAAC;AACJ,CAAC;AAED,0DAA0D;AAC1D,MAAM,gBAAgB,GAAG;IACvB,OAAO;IACP,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,QAAQ;IACR,OAAO;IACP,OAAO;IACP,WAAW;IACX,UAAU;IACV,UAAU;IACV,UAAU;IACV,WAAW;CACZ,CAAC;AAEF,SAAS,cAAc,CAAC,EAAU;IAChC,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,GAAG,EAAE,CAAC,CAAC;IACxC,MAAM,IAAI,GAAG,SAAS,GAAG,EAAE,CAAC;IAC5B,IAAI,IAAI,GAAG,CAAC,EAAE,CAAC;QACb,OAAO,GAAG,IAAI,KAAK,IAAI,GAAG,CAAC;IAC7B,CAAC;IACD,OAAO,GAAG,IAAI,GAAG,CAAC;AACpB,CAAC;AAMD,MAAM,UAAU,iBAAiB,CAAC,EAAE,UAAU,EAA0B;IACtE,sFAAsF;IACtF,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,gBAAgB,CAAC,MAAM,CAAC,CAAC,CAAC;IACnF,OAAO,CACL,KAAC,GAAG,IAAC,SAAS,EAAE,CAAC,YACf,MAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,wBACxB,IAAI,WAAO,cAAc,CAAC,UAAU,CAAC,IACnC,GACH,CACP,CAAC;AACJ,CAAC"}
@@ -0,0 +1,60 @@
1
+ /**
2
+ * Permission Prompt Component - Claude Code style approval UI
3
+ *
4
+ * Claude Code design:
5
+ *
6
+ * Tool use
7
+ * Web Search("query text here")
8
+ *
9
+ * Do you want to proceed?
10
+ * [1] Yes
11
+ * [2] Yes, and don't ask again for Web Search in /path/to/project
12
+ * [3] No
13
+ */
14
+ import type { ApprovalAction, ApprovalSuggestion } from '../../permissions/types.js';
15
+ interface PermissionPromptProps {
16
+ /** Tool name */
17
+ tool: string;
18
+ /** Tool input/parameters */
19
+ input: Record<string, unknown>;
20
+ /** Available approval options */
21
+ suggestions: ApprovalSuggestion[];
22
+ /** Callback when user makes a decision */
23
+ onDecision: (action: ApprovalAction) => void;
24
+ /** Project path for "don't ask again" option */
25
+ projectPath?: string;
26
+ }
27
+ export declare function PermissionPrompt({ tool, input, suggestions, onDecision, projectPath, }: PermissionPromptProps): import("react/jsx-runtime").JSX.Element;
28
+ interface SimpleConfirmProps {
29
+ message: string;
30
+ onConfirm: (confirmed: boolean) => void;
31
+ }
32
+ export declare function SimpleConfirmPrompt({ message, onConfirm }: SimpleConfirmProps): import("react/jsx-runtime").JSX.Element;
33
+ interface PermissionRule {
34
+ type: string;
35
+ tool: string;
36
+ pattern?: string;
37
+ scope: string;
38
+ mode: string;
39
+ }
40
+ interface PermissionRulesProps {
41
+ rules: PermissionRule[];
42
+ allowedPrompts?: {
43
+ tool: string;
44
+ prompt: string;
45
+ }[];
46
+ }
47
+ export declare function PermissionRulesDisplay({ rules, allowedPrompts }: PermissionRulesProps): import("react/jsx-runtime").JSX.Element;
48
+ interface AuditEntry {
49
+ time: string;
50
+ tool: string;
51
+ input: string;
52
+ decision: string;
53
+ rule?: string;
54
+ }
55
+ interface PermissionAuditProps {
56
+ entries: AuditEntry[];
57
+ }
58
+ export declare function PermissionAuditDisplay({ entries }: PermissionAuditProps): import("react/jsx-runtime").JSX.Element;
59
+ export {};
60
+ //# sourceMappingURL=PermissionPrompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionPrompt.d.ts","sourceRoot":"","sources":["../../../src/cli/components/PermissionPrompt.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAKH,OAAO,KAAK,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAMrF,UAAU,qBAAqB;IAC7B,gBAAgB;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5B,OAAO,EAAE,UAAU,EAAE,CAAC;CACvB;AAED,wBAAgB,sBAAsB,CAAC,EAAE,OAAO,EAAE,EAAE,oBAAoB,2CAgCvE"}
@@ -0,0 +1,192 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ /**
3
+ * Permission Prompt Component - Claude Code style approval UI
4
+ *
5
+ * Claude Code design:
6
+ *
7
+ * Tool use
8
+ * Web Search("query text here")
9
+ *
10
+ * Do you want to proceed?
11
+ * [1] Yes
12
+ * [2] Yes, and don't ask again for Web Search in /path/to/project
13
+ * [3] No
14
+ */
15
+ import { useState } from 'react';
16
+ import { Box, Text, useInput } from 'ink';
17
+ import { colors, icons } from './theme.js';
18
+ // ============================================================================
19
+ // Helpers
20
+ // ============================================================================
21
+ /**
22
+ * Format tool name for display (Claude Code style: "Web Search" instead of "WebSearch")
23
+ */
24
+ function formatToolName(tool) {
25
+ // Convert camelCase/PascalCase to space-separated
26
+ return tool.replace(/([a-z])([A-Z])/g, '$1 $2');
27
+ }
28
+ /**
29
+ * Format tool input for display
30
+ */
31
+ function formatInput(tool, input) {
32
+ switch (tool) {
33
+ case 'Bash':
34
+ return input.command ?? JSON.stringify(input);
35
+ case 'Read':
36
+ case 'Write':
37
+ case 'Edit':
38
+ return input.file_path ?? input.path ?? '';
39
+ case 'Glob':
40
+ return `${input.pattern ?? ''} in ${input.path ?? '.'}`;
41
+ case 'Grep':
42
+ return `${input.pattern ?? ''} in ${input.path ?? '.'}`;
43
+ case 'WebFetch':
44
+ return input.url ?? '';
45
+ case 'WebSearch':
46
+ return input.query ?? '';
47
+ case 'TodoWrite': {
48
+ const todos = input.todos || [];
49
+ const inProgress = todos.filter(t => t.status === 'in_progress');
50
+ const pending = todos.filter(t => t.status === 'pending');
51
+ return `${todos.length} tasks: ${inProgress.length} active, ${pending.length} pending`;
52
+ }
53
+ default:
54
+ const str = JSON.stringify(input);
55
+ return str.length > 80 ? str.slice(0, 77) + '...' : str;
56
+ }
57
+ }
58
+ /**
59
+ * Format tool call in Claude Code style: Tool("input")
60
+ * Returns an array of lines for proper wrapping
61
+ */
62
+ function formatToolCall(tool, input) {
63
+ const displayName = formatToolName(tool);
64
+ let inputStr = formatInput(tool, input);
65
+ // Truncate very long inputs
66
+ const maxLen = 60;
67
+ if (inputStr.length > maxLen) {
68
+ inputStr = inputStr.slice(0, maxLen - 3) + '...';
69
+ }
70
+ return { name: displayName, input: inputStr };
71
+ }
72
+ /**
73
+ * Get icon for tool
74
+ */
75
+ function getToolIcon(tool) {
76
+ switch (tool) {
77
+ case 'Bash':
78
+ return '⚡';
79
+ case 'Read':
80
+ case 'Write':
81
+ case 'Edit':
82
+ return '📄';
83
+ case 'Glob':
84
+ case 'Grep':
85
+ return '🔍';
86
+ case 'WebFetch':
87
+ case 'WebSearch':
88
+ return '🌐';
89
+ case 'TodoWrite':
90
+ return '📋';
91
+ default:
92
+ return icons.tool;
93
+ }
94
+ }
95
+ /**
96
+ * Get shortcut key display
97
+ */
98
+ function getShortcutDisplay(shortcut) {
99
+ if (!shortcut)
100
+ return '';
101
+ if (shortcut === 'n')
102
+ return 'n';
103
+ return shortcut;
104
+ }
105
+ // ============================================================================
106
+ // Permission Prompt Component
107
+ // ============================================================================
108
+ export function PermissionPrompt({ tool, input, suggestions, onDecision, projectPath, }) {
109
+ const [selectedIndex, setSelectedIndex] = useState(0);
110
+ const [expanded, setExpanded] = useState(false);
111
+ // Handle keyboard input
112
+ useInput((inputChar, key) => {
113
+ // Arrow navigation
114
+ if (key.upArrow) {
115
+ setSelectedIndex((i) => Math.max(0, i - 1));
116
+ }
117
+ else if (key.downArrow) {
118
+ setSelectedIndex((i) => Math.min(suggestions.length - 1, i + 1));
119
+ }
120
+ // Enter to select current option
121
+ if (key.return) {
122
+ const selected = suggestions[selectedIndex];
123
+ if (selected) {
124
+ onDecision(selected.action);
125
+ }
126
+ }
127
+ // Escape to deny
128
+ if (key.escape) {
129
+ onDecision('deny');
130
+ }
131
+ // Tab to toggle expand
132
+ if (key.tab) {
133
+ setExpanded((e) => !e);
134
+ }
135
+ // Number shortcuts (1-3)
136
+ const num = parseInt(inputChar, 10);
137
+ if (num >= 1 && num <= suggestions.length) {
138
+ onDecision(suggestions[num - 1].action);
139
+ }
140
+ // 'y' for allow once, 'n' for deny
141
+ if (inputChar.toLowerCase() === 'y') {
142
+ onDecision('allow_once');
143
+ }
144
+ else if (inputChar.toLowerCase() === 'n') {
145
+ onDecision('deny');
146
+ }
147
+ });
148
+ const toolInfo = formatToolCall(tool, input);
149
+ const displayToolName = formatToolName(tool);
150
+ const fullInput = formatInput(tool, input);
151
+ const isLongInput = fullInput.length > 60;
152
+ // Get dynamic label for "don't ask again" option
153
+ const getDynamicLabel = (suggestion) => {
154
+ if (suggestion.action === 'allow_always' && projectPath) {
155
+ // Shorten project path for display
156
+ const shortPath = projectPath.replace(process.env.HOME || '', '~');
157
+ return `Yes, don't ask again for ${displayToolName} in ${shortPath}`;
158
+ }
159
+ return suggestion.label;
160
+ };
161
+ return (_jsxs(Box, { flexDirection: "column", marginTop: 1, borderStyle: "round", borderColor: colors.warning, paddingX: 1, children: [_jsxs(Box, { children: [_jsx(Text, { color: colors.warning, children: "\u26A1 " }), _jsx(Text, { bold: true, children: toolInfo.name })] }), _jsx(Box, { flexDirection: "column", marginLeft: 2, children: expanded || !isLongInput ? (_jsx(Text, { color: colors.textSecondary, children: fullInput })) : (_jsxs(Box, { children: [_jsx(Text, { color: colors.textSecondary, children: toolInfo.input }), _jsx(Text, { color: colors.textMuted, children: ' [-> expand]' })] })) }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { children: "Allow this action?" }) }), _jsx(Box, { flexDirection: "column", marginTop: 0, marginLeft: 2, children: suggestions.map((suggestion, index) => {
162
+ const isSelected = index === selectedIndex;
163
+ const shortcut = getShortcutDisplay(suggestion.shortcut);
164
+ const label = getDynamicLabel(suggestion);
165
+ return (_jsxs(Box, { children: [_jsx(Text, { color: isSelected ? colors.primary : colors.textMuted, children: isSelected ? '▶' : ' ' }), _jsxs(Text, { color: colors.textMuted, children: [" [", shortcut, "] "] }), _jsx(Text, { color: isSelected ? colors.text : colors.textSecondary, children: label })] }, suggestion.action));
166
+ }) })] }));
167
+ }
168
+ export function SimpleConfirmPrompt({ message, onConfirm }) {
169
+ useInput((inputChar, key) => {
170
+ if (inputChar.toLowerCase() === 'y' || key.return) {
171
+ onConfirm(true);
172
+ }
173
+ else if (inputChar.toLowerCase() === 'n' || key.escape) {
174
+ onConfirm(false);
175
+ }
176
+ });
177
+ return (_jsxs(Box, { children: [_jsxs(Text, { color: colors.warning, children: [icons.warning, " "] }), _jsxs(Text, { children: [message, " "] }), _jsx(Text, { color: colors.textMuted, children: "[y/n] " })] }));
178
+ }
179
+ export function PermissionRulesDisplay({ rules, allowedPrompts }) {
180
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: colors.primary, bold: true, children: "Permission Rules" }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { color: colors.textMuted, children: ['Type'.padEnd(10), 'Tool'.padEnd(12), 'Pattern'.padEnd(20), 'Scope'.padEnd(10), "Mode"] }), _jsx(Text, { color: colors.textMuted, children: '─'.repeat(60) }), rules.map((rule, i) => (_jsxs(Text, { children: [_jsx(Text, { color: colors.textSecondary, children: rule.type.padEnd(10) }), _jsx(Text, { color: colors.tool, children: rule.tool.padEnd(12) }), _jsx(Text, { children: (rule.pattern ?? '*').slice(0, 18).padEnd(20) }), _jsx(Text, { color: colors.textMuted, children: rule.scope.padEnd(10) }), _jsx(Text, { color: rule.mode === 'auto' ? colors.success : rule.mode === 'deny' ? colors.error : colors.warning, children: rule.mode })] }, i)))] }), allowedPrompts && allowedPrompts.length > 0 && (_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { color: colors.primary, children: "Pending Prompts (from plan approval):" }), allowedPrompts.map((p, i) => (_jsxs(Text, { color: colors.textSecondary, children: ["\u2022 ", p.tool, ": ", p.prompt] }, i)))] }))] }));
181
+ }
182
+ export function PermissionAuditDisplay({ entries }) {
183
+ return (_jsxs(Box, { flexDirection: "column", children: [_jsx(Text, { color: colors.primary, bold: true, children: "Recent Permission Decisions" }), _jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsxs(Text, { color: colors.textMuted, children: ['Time'.padEnd(8), 'Decision'.padEnd(11), 'Tool'.padEnd(12), "Input"] }), _jsx(Text, { color: colors.textMuted, children: '─'.repeat(60) }), entries.slice(0, 10).map((entry, i) => {
184
+ const decisionColor = entry.decision === 'allowed' || entry.decision === 'confirmed'
185
+ ? colors.success
186
+ : entry.decision === 'denied' || entry.decision === 'rejected'
187
+ ? colors.error
188
+ : colors.warning;
189
+ return (_jsxs(Text, { children: [_jsx(Text, { color: colors.textMuted, children: entry.time.padEnd(8) }), _jsx(Text, { color: decisionColor, children: entry.decision.padEnd(11) }), _jsx(Text, { color: colors.tool, children: entry.tool.padEnd(12) }), _jsx(Text, { children: entry.input.slice(0, 30) })] }, i));
190
+ })] })] }));
191
+ }
192
+ //# sourceMappingURL=PermissionPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PermissionPrompt.js","sourceRoot":"","sources":["../../../src/cli/components/PermissionPrompt.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAoB3C,+EAA+E;AAC/E,UAAU;AACV,+EAA+E;AAE/E;;GAEG;AACH,SAAS,cAAc,CAAC,IAAY;IAClC,kDAAkD;IAClD,OAAO,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,OAAO,CAAC,CAAC;AAClD,CAAC;AAED;;GAEG;AACH,SAAS,WAAW,CAAC,IAAY,EAAE,KAA8B;IAC/D,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CACd,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC;wBAErB,OAAO,CACL,MAAC,IAAI,eACH,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,SAAS,YAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,GAAQ,EAC5D,KAAC,IAAI,IAAC,KAAK,EAAE,aAAa,YAAG,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,GAAQ,EAC9D,KAAC,IAAI,IAAC,KAAK,EAAE,MAAM,CAAC,IAAI,YAAG,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,CAAC,GAAQ,EACxD,KAAC,IAAI,cAAE,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,GAAQ,KAJ9B,CAAC,CAKL,CACR,CAAC;oBACJ,CAAC,CAAC,IACE,IACF,CACP,CAAC;AACJ,CAAC"}
@@ -263,18 +263,18 @@ export function ProviderManager({ onClose }) {
263
263
  // Find connection name
264
264
  const connOption = item.provider.connections.find((c) => c.method === item.connectionMethod);
265
265
  const connName = connOption?.name || item.connectionMethod;
266
- return (_jsxs(Box, { paddingLeft: 2, children: [_jsx(Text, { color: isSelected ? colors.primary : colors.textMuted, children: isSelected ? icons.arrow : ' ' }), _jsxs(Text, { color: colors.success, children: [icons.success, " "] }), _jsx(Text, { color: isSelected ? colors.text : colors.textSecondary, bold: isSelected, children: item.provider.name }), _jsxs(Text, { color: colors.textMuted, children: [' ', "(", connName, ") \u00B7 ", item.modelCount, " models"] })] }, item.provider.id));
266
+ return (_jsxs(Box, { paddingLeft: 2, children: [_jsxs(Text, { color: isSelected ? colors.primary : colors.textMuted, children: [isSelected ? icons.arrow : ' ', ' '] }), _jsx(Text, { color: isSelected ? colors.text : colors.textSecondary, bold: isSelected, children: item.provider.name }), _jsxs(Text, { color: colors.textMuted, children: [' ', "(", connName, ") \u00B7 ", item.modelCount, " models"] }), _jsxs(Text, { color: colors.success, children: [" ", icons.success] })] }, item.provider.id));
267
267
  })] })), available.length > 0 && (_jsxs(_Fragment, { children: [_jsxs(Text, { color: colors.textMuted, dimColor: connected.length > 0, children: [connected.length > 0 ? '\n' : '', "Available:"] }), available.map((item, idx) => {
268
268
  const actualIndex = connected.length + idx;
269
269
  const isSelected = actualIndex === selectedIndex;
270
270
  const hasReady = item.readyConnections.length > 0;
271
271
  // Show which connection methods are ready
272
272
  const readyNames = item.readyConnections.map((c) => c.name);
273
- return (_jsxs(Box, { paddingLeft: 2, children: [_jsx(Text, { color: isSelected ? colors.primary : colors.textMuted, children: isSelected ? icons.arrow : ' ' }), _jsx(Text, { color: isSelected ? colors.text : colors.textSecondary, bold: isSelected, children: item.provider.name }), hasReady && (_jsxs(Text, { color: colors.success, children: [" (", readyNames.join(', '), ")"] }))] }, item.provider.id));
273
+ return (_jsxs(Box, { paddingLeft: 2, children: [_jsxs(Text, { color: isSelected ? colors.primary : colors.textMuted, children: [isSelected ? icons.arrow : ' ', ' '] }), _jsx(Text, { color: isSelected ? colors.text : colors.textSecondary, bold: isSelected, children: item.provider.name }), hasReady && (_jsxs(Text, { color: colors.success, children: [" (", readyNames.join(', '), ")"] }))] }, item.provider.id));
274
274
  })] })), allItems.length === 0 && (_jsxs(Text, { color: colors.textMuted, children: ["No providers match \"", filter, "\""] }))] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.textMuted, children: "\u2191\u2193 navigate \u00B7 Enter connect \u00B7 r remove \u00B7 Tab/s search \u00B7 Esc exit" }) })] })), tab === 'search' && (_jsxs(_Fragment, { children: [_jsxs(Box, { flexDirection: "column", marginTop: 1, children: [_jsx(Text, { color: colors.textMuted, children: "Select search provider:" }), searchProviders.map((item, idx) => {
275
275
  const isSelected = idx === searchSelectedIndex;
276
276
  const envVars = item.provider.connections[0]?.envVars || [];
277
- return (_jsxs(Box, { paddingLeft: 2, flexDirection: "column", children: [_jsxs(Box, { children: [_jsx(Text, { color: isSelected ? colors.primary : colors.textMuted, children: isSelected ? icons.arrow : ' ' }), item.isSelected && _jsxs(Text, { color: colors.success, children: [icons.success, " "] }), _jsx(Text, { color: isSelected ? colors.text : colors.textSecondary, bold: isSelected, children: item.provider.name }), !item.provider.requiresKey && (_jsx(Text, { color: colors.success, children: " (no key required)" })), item.provider.requiresKey && item.isAvailable && (_jsx(Text, { color: colors.success, children: " (configured)" })), item.provider.requiresKey && !item.isAvailable && (_jsx(Text, { color: colors.textMuted, children: " (not configured)" }))] }), isSelected && item.provider.requiresKey && !item.isAvailable && (_jsxs(Text, { color: colors.textMuted, dimColor: true, children: [' ', "Set: ", envVars.join(' or ')] }))] }, item.provider.id));
277
+ return (_jsxs(Box, { paddingLeft: 2, flexDirection: "column", children: [_jsxs(Box, { children: [_jsxs(Text, { color: isSelected ? colors.primary : colors.textMuted, children: [isSelected ? icons.arrow : ' ', ' '] }), _jsx(Text, { color: isSelected ? colors.text : colors.textSecondary, bold: isSelected, children: item.provider.name }), !item.provider.requiresKey && (_jsx(Text, { color: colors.success, children: " (no key required)" })), item.provider.requiresKey && item.isAvailable && (_jsx(Text, { color: colors.success, children: " (configured)" })), item.provider.requiresKey && !item.isAvailable && (_jsx(Text, { color: colors.textMuted, children: " (not configured)" })), item.isSelected && _jsxs(Text, { color: colors.success, children: [" ", icons.success] })] }), isSelected && item.provider.requiresKey && !item.isAvailable && (_jsxs(Text, { color: colors.textMuted, dimColor: true, children: [' ', "Set: ", envVars.join(' or ')] }))] }, item.provider.id));
278
278
  })] }), _jsx(Box, { marginTop: 1, children: _jsx(Text, { color: colors.textMuted, children: "\u2191\u2193 navigate \u00B7 Enter select \u00B7 Tab/l LLM providers \u00B7 Esc exit" }) })] }))] }));
279
279
  }
280
280
  //# sourceMappingURL=ProviderManager.js.map