@travisennis/acai 0.0.6 → 0.0.8

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 (586) hide show
  1. package/README.md +225 -39
  2. package/dist/agent/index.d.ts +30 -21
  3. package/dist/agent/index.d.ts.map +1 -1
  4. package/dist/agent/index.js +237 -198
  5. package/dist/cli.d.ts +4 -3
  6. package/dist/cli.d.ts.map +1 -1
  7. package/dist/cli.js +56 -18
  8. package/dist/commands/add-directory/index.d.ts +3 -0
  9. package/dist/commands/add-directory/index.d.ts.map +1 -0
  10. package/dist/commands/add-directory/index.js +50 -0
  11. package/dist/commands/add-directory/types.d.ts +6 -0
  12. package/dist/commands/add-directory/types.d.ts.map +1 -0
  13. package/dist/commands/add-directory/utils.d.ts +3 -0
  14. package/dist/commands/add-directory/utils.d.ts.map +1 -0
  15. package/dist/commands/add-directory/utils.js +15 -0
  16. package/dist/commands/clear/index.d.ts +3 -0
  17. package/dist/commands/clear/index.d.ts.map +1 -0
  18. package/dist/commands/{clear-command.js → clear/index.js} +1 -7
  19. package/dist/commands/copy/index.d.ts +3 -0
  20. package/dist/commands/copy/index.d.ts.map +1 -0
  21. package/dist/commands/copy/index.js +39 -0
  22. package/dist/commands/copy/types.d.ts +3 -0
  23. package/dist/commands/copy/types.d.ts.map +1 -0
  24. package/dist/commands/copy/types.js +1 -0
  25. package/dist/commands/copy/utils.d.ts +3 -0
  26. package/dist/commands/copy/utils.d.ts.map +1 -0
  27. package/dist/commands/copy/utils.js +22 -0
  28. package/dist/commands/exit/index.d.ts +10 -0
  29. package/dist/commands/exit/index.d.ts.map +1 -0
  30. package/dist/commands/exit/index.js +21 -0
  31. package/dist/commands/exit/types.d.ts +8 -0
  32. package/dist/commands/exit/types.d.ts.map +1 -0
  33. package/dist/commands/exit/types.js +1 -0
  34. package/dist/commands/exit/utils.d.ts +2 -0
  35. package/dist/commands/exit/utils.d.ts.map +1 -0
  36. package/dist/commands/exit/utils.js +13 -0
  37. package/dist/commands/generate-rules/index.d.ts +3 -0
  38. package/dist/commands/generate-rules/index.d.ts.map +1 -0
  39. package/dist/commands/{generate-rules-command.js → generate-rules/index.js} +65 -147
  40. package/dist/commands/generate-rules/utils.d.ts +5 -0
  41. package/dist/commands/generate-rules/utils.d.ts.map +1 -0
  42. package/dist/commands/generate-rules/utils.js +25 -0
  43. package/dist/commands/handoff/index.d.ts +3 -0
  44. package/dist/commands/handoff/index.d.ts.map +1 -0
  45. package/dist/commands/handoff/index.js +97 -0
  46. package/dist/commands/handoff/utils.d.ts +4 -0
  47. package/dist/commands/handoff/utils.d.ts.map +1 -0
  48. package/dist/commands/handoff/utils.js +123 -0
  49. package/dist/commands/health/index.d.ts +3 -0
  50. package/dist/commands/health/index.d.ts.map +1 -0
  51. package/dist/commands/health/index.js +56 -0
  52. package/dist/commands/health/utils.d.ts +15 -0
  53. package/dist/commands/health/utils.d.ts.map +1 -0
  54. package/dist/commands/health/utils.js +52 -0
  55. package/dist/commands/help/index.d.ts +3 -0
  56. package/dist/commands/help/index.d.ts.map +1 -0
  57. package/dist/commands/{help-command.js → help/index.js} +6 -14
  58. package/dist/commands/history/index.d.ts +3 -0
  59. package/dist/commands/history/index.d.ts.map +1 -0
  60. package/dist/commands/{history-command.js → history/index.js} +40 -200
  61. package/dist/commands/history/types.d.ts +11 -0
  62. package/dist/commands/history/types.d.ts.map +1 -0
  63. package/dist/commands/history/types.js +1 -0
  64. package/dist/commands/history/utils.d.ts +4 -0
  65. package/dist/commands/history/utils.d.ts.map +1 -0
  66. package/dist/commands/history/utils.js +86 -0
  67. package/dist/commands/init/index.d.ts +3 -0
  68. package/dist/commands/init/index.d.ts.map +1 -0
  69. package/dist/commands/{init-command.js → init/index.js} +17 -27
  70. package/dist/commands/init-project/index.d.ts +3 -0
  71. package/dist/commands/init-project/index.d.ts.map +1 -0
  72. package/dist/commands/init-project/index.js +51 -0
  73. package/dist/commands/init-project/utils.d.ts +9 -0
  74. package/dist/commands/init-project/utils.d.ts.map +1 -0
  75. package/dist/commands/init-project/utils.js +43 -0
  76. package/dist/commands/list-directories/index.d.ts +3 -0
  77. package/dist/commands/list-directories/index.d.ts.map +1 -0
  78. package/dist/commands/{list-directories-command.js → list-directories/index.js} +2 -15
  79. package/dist/commands/list-tools/index.d.ts +3 -0
  80. package/dist/commands/list-tools/index.d.ts.map +1 -0
  81. package/dist/commands/list-tools/index.js +89 -0
  82. package/dist/commands/manager.d.ts +2 -9
  83. package/dist/commands/manager.d.ts.map +1 -1
  84. package/dist/commands/manager.js +38 -83
  85. package/dist/commands/model/index.d.ts +3 -0
  86. package/dist/commands/model/index.d.ts.map +1 -0
  87. package/dist/commands/model/index.js +182 -0
  88. package/dist/commands/model/utils.d.ts +3 -0
  89. package/dist/commands/model/utils.d.ts.map +1 -0
  90. package/dist/commands/model/utils.js +5 -0
  91. package/dist/commands/paste/index.d.ts +3 -0
  92. package/dist/commands/paste/index.d.ts.map +1 -0
  93. package/dist/commands/paste/index.js +94 -0
  94. package/dist/commands/paste/utils.d.ts +5 -0
  95. package/dist/commands/paste/utils.d.ts.map +1 -0
  96. package/dist/commands/paste/utils.js +86 -0
  97. package/dist/commands/pickup/index.d.ts +3 -0
  98. package/dist/commands/pickup/index.d.ts.map +1 -0
  99. package/dist/commands/pickup/index.js +138 -0
  100. package/dist/commands/pickup/types.d.ts +6 -0
  101. package/dist/commands/pickup/types.d.ts.map +1 -0
  102. package/dist/commands/pickup/types.js +1 -0
  103. package/dist/commands/pickup/utils.d.ts +7 -0
  104. package/dist/commands/pickup/utils.d.ts.map +1 -0
  105. package/dist/commands/pickup/utils.js +56 -0
  106. package/dist/commands/prompt/index.d.ts +5 -0
  107. package/dist/commands/prompt/index.d.ts.map +1 -0
  108. package/dist/commands/prompt/index.js +126 -0
  109. package/dist/commands/prompt/types.d.ts +15 -0
  110. package/dist/commands/prompt/types.d.ts.map +1 -0
  111. package/dist/commands/prompt/types.js +1 -0
  112. package/dist/commands/prompt/utils.d.ts +12 -0
  113. package/dist/commands/prompt/utils.d.ts.map +1 -0
  114. package/dist/commands/prompt/utils.js +107 -0
  115. package/dist/commands/remove-directory/index.d.ts +3 -0
  116. package/dist/commands/remove-directory/index.d.ts.map +1 -0
  117. package/dist/commands/{remove-directory-command.js → remove-directory/index.js} +3 -35
  118. package/dist/commands/reset/index.d.ts +3 -0
  119. package/dist/commands/reset/index.d.ts.map +1 -0
  120. package/dist/commands/{reset-command.js → reset/index.js} +8 -11
  121. package/dist/commands/reset/types.d.ts +1 -0
  122. package/dist/commands/reset/types.d.ts.map +1 -0
  123. package/dist/commands/reset/types.js +3 -0
  124. package/dist/commands/resources/index.d.ts +3 -0
  125. package/dist/commands/resources/index.d.ts.map +1 -0
  126. package/dist/commands/resources/index.js +84 -0
  127. package/dist/commands/review/index.d.ts +3 -0
  128. package/dist/commands/review/index.d.ts.map +1 -0
  129. package/dist/commands/review/index.js +126 -0
  130. package/dist/commands/review/types.d.ts +12 -0
  131. package/dist/commands/review/types.d.ts.map +1 -0
  132. package/dist/commands/review/types.js +1 -0
  133. package/dist/commands/review/utils.d.ts +4 -0
  134. package/dist/commands/review/utils.d.ts.map +1 -0
  135. package/dist/commands/review/utils.js +87 -0
  136. package/dist/commands/save/index.d.ts +3 -0
  137. package/dist/commands/save/index.d.ts.map +1 -0
  138. package/dist/commands/{save-command.js → save/index.js} +3 -10
  139. package/dist/commands/session/index.d.ts +3 -0
  140. package/dist/commands/session/index.d.ts.map +1 -0
  141. package/dist/commands/session/index.js +197 -0
  142. package/dist/commands/session/types.d.ts +13 -0
  143. package/dist/commands/session/types.d.ts.map +1 -0
  144. package/dist/commands/session/types.js +7 -0
  145. package/dist/commands/shell/index.d.ts +3 -0
  146. package/dist/commands/shell/index.d.ts.map +1 -0
  147. package/dist/commands/{shell-command.js → shell/index.js} +4 -51
  148. package/dist/commands/types.d.ts +2 -5
  149. package/dist/commands/types.d.ts.map +1 -1
  150. package/dist/config.d.ts +36 -7
  151. package/dist/config.d.ts.map +1 -1
  152. package/dist/config.js +118 -60
  153. package/dist/dedent.d.ts.map +1 -1
  154. package/dist/dedent.js +7 -7
  155. package/dist/execution/index.d.ts +18 -2
  156. package/dist/execution/index.d.ts.map +1 -1
  157. package/dist/execution/index.js +119 -81
  158. package/dist/formatting.d.ts +46 -0
  159. package/dist/formatting.d.ts.map +1 -1
  160. package/dist/formatting.js +94 -0
  161. package/dist/index.d.ts +1 -1
  162. package/dist/index.d.ts.map +1 -1
  163. package/dist/index.js +299 -177
  164. package/dist/logger.d.ts.map +1 -1
  165. package/dist/logger.js +4 -11
  166. package/dist/mentions.d.ts.map +1 -1
  167. package/dist/mentions.js +3 -53
  168. package/dist/middleware/audit-message.d.ts +2 -2
  169. package/dist/middleware/audit-message.d.ts.map +1 -1
  170. package/dist/middleware/audit-message.js +40 -2
  171. package/dist/middleware/cache.d.ts +2 -2
  172. package/dist/middleware/cache.d.ts.map +1 -1
  173. package/dist/middleware/cache.js +111 -27
  174. package/dist/middleware/rate-limit.d.ts +2 -2
  175. package/dist/middleware/rate-limit.d.ts.map +1 -1
  176. package/dist/middleware/rate-limit.js +1 -0
  177. package/dist/models/ai-config.d.ts.map +1 -1
  178. package/dist/models/ai-config.js +46 -29
  179. package/dist/models/anthropic-provider.d.ts +14 -13
  180. package/dist/models/anthropic-provider.d.ts.map +1 -1
  181. package/dist/models/anthropic-provider.js +0 -7
  182. package/dist/models/deepseek-provider.d.ts +9 -8
  183. package/dist/models/deepseek-provider.d.ts.map +1 -1
  184. package/dist/models/deepseek-provider.js +0 -2
  185. package/dist/models/google-provider.d.ts +10 -9
  186. package/dist/models/google-provider.d.ts.map +1 -1
  187. package/dist/models/google-provider.js +0 -3
  188. package/dist/models/groq-provider.d.ts +8 -7
  189. package/dist/models/groq-provider.d.ts.map +1 -1
  190. package/dist/models/groq-provider.js +0 -1
  191. package/dist/models/manager.d.ts +7 -4
  192. package/dist/models/manager.d.ts.map +1 -1
  193. package/dist/models/manager.js +5 -25
  194. package/dist/models/openai-provider.d.ts +11 -10
  195. package/dist/models/openai-provider.d.ts.map +1 -1
  196. package/dist/models/openai-provider.js +0 -4
  197. package/dist/models/opencode-zen-provider.d.ts +23 -0
  198. package/dist/models/opencode-zen-provider.d.ts.map +1 -0
  199. package/dist/models/opencode-zen-provider.js +76 -0
  200. package/dist/models/openrouter-provider.d.ts +34 -28
  201. package/dist/models/openrouter-provider.d.ts.map +1 -1
  202. package/dist/models/openrouter-provider.js +148 -139
  203. package/dist/models/providers.d.ts +6 -16
  204. package/dist/models/providers.d.ts.map +1 -1
  205. package/dist/models/providers.js +8 -58
  206. package/dist/models/xai-provider.d.ts +9 -8
  207. package/dist/models/xai-provider.d.ts.map +1 -1
  208. package/dist/models/xai-provider.js +0 -2
  209. package/dist/prompts/manager.d.ts +1 -1
  210. package/dist/prompts/manager.d.ts.map +1 -1
  211. package/dist/prompts/manager.js +1 -1
  212. package/dist/prompts.d.ts +8 -4
  213. package/dist/prompts.d.ts.map +1 -1
  214. package/dist/prompts.js +155 -177
  215. package/dist/repl/project-status.d.ts +19 -0
  216. package/dist/repl/project-status.d.ts.map +1 -0
  217. package/dist/repl/project-status.js +78 -0
  218. package/dist/repl-new.d.ts +15 -6
  219. package/dist/repl-new.d.ts.map +1 -1
  220. package/dist/repl-new.js +266 -83
  221. package/dist/{messages.d.ts → sessions/manager.d.ts} +13 -4
  222. package/dist/sessions/manager.d.ts.map +1 -0
  223. package/dist/{messages.js → sessions/manager.js} +126 -16
  224. package/dist/skills.d.ts +16 -0
  225. package/dist/skills.d.ts.map +1 -0
  226. package/dist/skills.js +233 -0
  227. package/dist/terminal/control.d.ts +56 -0
  228. package/dist/terminal/control.d.ts.map +1 -0
  229. package/dist/terminal/control.js +111 -0
  230. package/dist/terminal/default-theme.d.ts +1 -1
  231. package/dist/terminal/default-theme.d.ts.map +1 -1
  232. package/dist/terminal/default-theme.js +24 -28
  233. package/dist/terminal/formatting.d.ts +23 -26
  234. package/dist/terminal/formatting.d.ts.map +1 -1
  235. package/dist/terminal/formatting.js +35 -53
  236. package/dist/terminal/highlight/index.d.ts.map +1 -1
  237. package/dist/terminal/highlight/index.js +3 -6
  238. package/dist/terminal/highlight/theme.d.ts.map +1 -1
  239. package/dist/terminal/highlight/theme.js +2 -6
  240. package/dist/terminal/index.d.ts +2 -101
  241. package/dist/terminal/index.d.ts.map +1 -1
  242. package/dist/terminal/index.js +2 -464
  243. package/dist/terminal/keys.d.ts +211 -0
  244. package/dist/terminal/keys.d.ts.map +1 -0
  245. package/dist/terminal/keys.js +546 -0
  246. package/dist/terminal/segmenter.d.ts +6 -0
  247. package/dist/terminal/segmenter.d.ts.map +1 -0
  248. package/dist/terminal/segmenter.js +11 -0
  249. package/dist/terminal/select-prompt.d.ts.map +1 -1
  250. package/dist/terminal/select-prompt.js +9 -21
  251. package/dist/terminal/string-width.d.ts.map +1 -1
  252. package/dist/terminal/string-width.js +40 -21
  253. package/dist/terminal/strip-ansi.d.ts.map +1 -1
  254. package/dist/terminal/strip-ansi.js +9 -15
  255. package/dist/terminal/table/cell.d.ts +114 -0
  256. package/dist/terminal/table/cell.d.ts.map +1 -0
  257. package/dist/terminal/table/cell.js +407 -0
  258. package/dist/terminal/table/debug.d.ts +15 -0
  259. package/dist/terminal/table/debug.d.ts.map +1 -0
  260. package/dist/terminal/table/debug.js +32 -0
  261. package/dist/terminal/table/index.d.ts +3 -0
  262. package/dist/terminal/table/index.d.ts.map +1 -0
  263. package/dist/terminal/table/index.js +2 -0
  264. package/dist/terminal/table/layout-manager.d.ts +27 -0
  265. package/dist/terminal/table/layout-manager.d.ts.map +1 -0
  266. package/dist/terminal/table/layout-manager.js +257 -0
  267. package/dist/terminal/table/table.d.ts +9 -0
  268. package/dist/terminal/table/table.d.ts.map +1 -0
  269. package/dist/terminal/table/table.js +97 -0
  270. package/dist/terminal/table/utils.d.ts +63 -0
  271. package/dist/terminal/table/utils.d.ts.map +1 -0
  272. package/dist/terminal/table/utils.js +326 -0
  273. package/dist/tokens/tracker.d.ts.map +1 -1
  274. package/dist/tokens/tracker.js +58 -16
  275. package/dist/tools/bash.d.ts +11 -11
  276. package/dist/tools/bash.d.ts.map +1 -1
  277. package/dist/tools/bash.js +189 -81
  278. package/dist/tools/directory-tree.d.ts +9 -13
  279. package/dist/tools/directory-tree.d.ts.map +1 -1
  280. package/dist/tools/directory-tree.js +90 -60
  281. package/dist/tools/dynamic-tool-loader.d.ts +22 -8
  282. package/dist/tools/dynamic-tool-loader.d.ts.map +1 -1
  283. package/dist/tools/dynamic-tool-loader.js +41 -46
  284. package/dist/tools/edit-file.d.ts +6 -16
  285. package/dist/tools/edit-file.d.ts.map +1 -1
  286. package/dist/tools/edit-file.js +22 -66
  287. package/dist/tools/glob.d.ts +15 -16
  288. package/dist/tools/glob.d.ts.map +1 -1
  289. package/dist/tools/glob.js +78 -109
  290. package/dist/tools/grep.d.ts +19 -22
  291. package/dist/tools/grep.d.ts.map +1 -1
  292. package/dist/tools/grep.js +61 -93
  293. package/dist/tools/index.d.ts +202 -167
  294. package/dist/tools/index.d.ts.map +1 -1
  295. package/dist/tools/index.js +17 -273
  296. package/dist/tools/ls.d.ts +26 -0
  297. package/dist/tools/ls.d.ts.map +1 -0
  298. package/dist/tools/ls.js +80 -0
  299. package/dist/tools/read-file.d.ts +15 -15
  300. package/dist/tools/read-file.d.ts.map +1 -1
  301. package/dist/tools/read-file.js +52 -76
  302. package/dist/tools/save-file.d.ts +8 -8
  303. package/dist/tools/save-file.d.ts.map +1 -1
  304. package/dist/tools/save-file.js +42 -53
  305. package/dist/tools/think.d.ts +4 -4
  306. package/dist/tools/think.d.ts.map +1 -1
  307. package/dist/tools/think.js +9 -32
  308. package/dist/tools/types.d.ts +5 -21
  309. package/dist/tools/types.d.ts.map +1 -1
  310. package/dist/tools/types.js +0 -9
  311. package/dist/tui/autocomplete/attachment-provider.d.ts +18 -0
  312. package/dist/tui/autocomplete/attachment-provider.d.ts.map +1 -0
  313. package/dist/tui/autocomplete/attachment-provider.js +159 -0
  314. package/dist/tui/autocomplete/base-provider.d.ts +17 -0
  315. package/dist/tui/autocomplete/base-provider.d.ts.map +1 -0
  316. package/dist/tui/autocomplete/base-provider.js +1 -0
  317. package/dist/tui/autocomplete/combined-provider.d.ts +20 -0
  318. package/dist/tui/autocomplete/combined-provider.d.ts.map +1 -0
  319. package/dist/tui/autocomplete/combined-provider.js +61 -0
  320. package/dist/tui/autocomplete/command-provider.d.ts +20 -0
  321. package/dist/tui/autocomplete/command-provider.d.ts.map +1 -0
  322. package/dist/tui/autocomplete/command-provider.js +90 -0
  323. package/dist/tui/autocomplete/file-search-provider.d.ts +16 -0
  324. package/dist/tui/autocomplete/file-search-provider.d.ts.map +1 -0
  325. package/dist/tui/autocomplete/file-search-provider.js +123 -0
  326. package/dist/tui/autocomplete/path-provider.d.ts +21 -0
  327. package/dist/tui/autocomplete/path-provider.d.ts.map +1 -0
  328. package/dist/tui/autocomplete/path-provider.js +164 -0
  329. package/dist/tui/autocomplete/utils.d.ts +16 -0
  330. package/dist/tui/autocomplete/utils.d.ts.map +1 -0
  331. package/dist/tui/autocomplete/utils.js +137 -0
  332. package/dist/tui/autocomplete.d.ts +12 -43
  333. package/dist/tui/autocomplete.d.ts.map +1 -1
  334. package/dist/tui/autocomplete.js +20 -465
  335. package/dist/tui/components/assistant-message.js +1 -1
  336. package/dist/tui/components/box.d.ts +20 -0
  337. package/dist/tui/components/box.d.ts.map +1 -0
  338. package/dist/tui/components/box.js +87 -0
  339. package/dist/tui/components/editor.d.ts +61 -7
  340. package/dist/tui/components/editor.d.ts.map +1 -1
  341. package/dist/tui/components/editor.js +630 -127
  342. package/dist/tui/components/footer.d.ts +19 -18
  343. package/dist/tui/components/footer.d.ts.map +1 -1
  344. package/dist/tui/components/footer.js +90 -185
  345. package/dist/tui/components/header.d.ts +21 -0
  346. package/dist/tui/components/header.d.ts.map +1 -0
  347. package/dist/tui/components/header.js +63 -0
  348. package/dist/tui/components/input.d.ts.map +1 -1
  349. package/dist/tui/components/input.js +8 -7
  350. package/dist/tui/components/loader.d.ts +6 -1
  351. package/dist/tui/components/loader.d.ts.map +1 -1
  352. package/dist/tui/components/loader.js +8 -3
  353. package/dist/tui/components/markdown.d.ts +31 -27
  354. package/dist/tui/components/markdown.d.ts.map +1 -1
  355. package/dist/tui/components/markdown.js +131 -67
  356. package/dist/tui/components/modal.d.ts +0 -11
  357. package/dist/tui/components/modal.d.ts.map +1 -1
  358. package/dist/tui/components/modal.js +9 -37
  359. package/dist/tui/components/notification.d.ts +28 -0
  360. package/dist/tui/components/notification.d.ts.map +1 -0
  361. package/dist/tui/components/notification.js +63 -0
  362. package/dist/tui/components/progress-bar.d.ts +19 -0
  363. package/dist/tui/components/progress-bar.d.ts.map +1 -0
  364. package/dist/tui/components/progress-bar.js +66 -0
  365. package/dist/tui/components/select-list.d.ts +12 -1
  366. package/dist/tui/components/select-list.d.ts.map +1 -1
  367. package/dist/tui/components/select-list.js +73 -32
  368. package/dist/tui/components/spacer.d.ts +1 -1
  369. package/dist/tui/components/spacer.d.ts.map +1 -1
  370. package/dist/tui/components/spacer.js +2 -2
  371. package/dist/tui/components/table.d.ts +27 -0
  372. package/dist/tui/components/table.d.ts.map +1 -0
  373. package/dist/tui/components/table.js +125 -0
  374. package/dist/tui/components/thinking-block.d.ts.map +1 -1
  375. package/dist/tui/components/thinking-block.js +4 -1
  376. package/dist/tui/components/tool-execution.d.ts +7 -6
  377. package/dist/tui/components/tool-execution.d.ts.map +1 -1
  378. package/dist/tui/components/tool-execution.js +81 -85
  379. package/dist/tui/components/user-message.d.ts.map +1 -1
  380. package/dist/tui/components/user-message.js +6 -4
  381. package/dist/tui/components/welcome.d.ts +8 -1
  382. package/dist/tui/components/welcome.d.ts.map +1 -1
  383. package/dist/tui/components/welcome.js +45 -6
  384. package/dist/tui/index.d.ts +12 -6
  385. package/dist/tui/index.d.ts.map +1 -1
  386. package/dist/tui/index.js +7 -3
  387. package/dist/tui/terminal.d.ts +4 -3
  388. package/dist/tui/terminal.d.ts.map +1 -1
  389. package/dist/tui/terminal.js +43 -49
  390. package/dist/tui/tui.d.ts +3 -0
  391. package/dist/tui/tui.d.ts.map +1 -1
  392. package/dist/tui/tui.js +58 -43
  393. package/dist/tui/utils.d.ts +5 -0
  394. package/dist/tui/utils.d.ts.map +1 -1
  395. package/dist/tui/utils.js +80 -1
  396. package/dist/{tools/bash-utils.d.ts → utils/bash.d.ts} +3 -3
  397. package/dist/utils/bash.d.ts.map +1 -0
  398. package/dist/{tools/bash-utils.js → utils/bash.js} +22 -11
  399. package/dist/utils/{filesystem.d.ts → filesystem/operations.d.ts} +1 -1
  400. package/dist/utils/filesystem/operations.d.ts.map +1 -0
  401. package/dist/{tools/filesystem-utils.d.ts → utils/filesystem/security.d.ts} +3 -2
  402. package/dist/utils/filesystem/security.d.ts.map +1 -0
  403. package/dist/{tools/filesystem-utils.js → utils/filesystem/security.js} +62 -4
  404. package/dist/utils/funcs.d.ts +6 -0
  405. package/dist/utils/funcs.d.ts.map +1 -0
  406. package/dist/utils/funcs.js +6 -0
  407. package/dist/{tools/git-utils.d.ts → utils/git.d.ts} +1 -1
  408. package/dist/utils/git.d.ts.map +1 -0
  409. package/dist/{tools/git-utils.js → utils/git.js} +0 -6
  410. package/dist/utils/glob.js +1 -1
  411. package/dist/utils/yaml.d.ts +11 -0
  412. package/dist/utils/yaml.d.ts.map +1 -0
  413. package/dist/utils/yaml.js +207 -0
  414. package/dist/utils/{zod-utils.d.ts → zod.d.ts} +2 -1
  415. package/dist/utils/zod.d.ts.map +1 -0
  416. package/dist/utils/zod.js +24 -0
  417. package/package.json +31 -29
  418. package/dist/agent/manual-loop.d.ts +0 -41
  419. package/dist/agent/manual-loop.d.ts.map +0 -1
  420. package/dist/agent/manual-loop.js +0 -278
  421. package/dist/api/exa/index.d.ts +0 -177
  422. package/dist/api/exa/index.d.ts.map +0 -1
  423. package/dist/api/exa/index.js +0 -439
  424. package/dist/commands/add-directory-command.d.ts +0 -3
  425. package/dist/commands/add-directory-command.d.ts.map +0 -1
  426. package/dist/commands/add-directory-command.js +0 -85
  427. package/dist/commands/application-log-command.d.ts +0 -3
  428. package/dist/commands/application-log-command.d.ts.map +0 -1
  429. package/dist/commands/application-log-command.js +0 -79
  430. package/dist/commands/clear-command.d.ts +0 -3
  431. package/dist/commands/clear-command.d.ts.map +0 -1
  432. package/dist/commands/compact-command.d.ts +0 -3
  433. package/dist/commands/compact-command.d.ts.map +0 -1
  434. package/dist/commands/compact-command.js +0 -64
  435. package/dist/commands/context-command.d.ts +0 -3
  436. package/dist/commands/context-command.d.ts.map +0 -1
  437. package/dist/commands/context-command.js +0 -183
  438. package/dist/commands/copy-command.d.ts +0 -3
  439. package/dist/commands/copy-command.d.ts.map +0 -1
  440. package/dist/commands/copy-command.js +0 -80
  441. package/dist/commands/edit-command.d.ts +0 -3
  442. package/dist/commands/edit-command.d.ts.map +0 -1
  443. package/dist/commands/edit-command.js +0 -88
  444. package/dist/commands/edit-prompt-command.d.ts +0 -3
  445. package/dist/commands/edit-prompt-command.d.ts.map +0 -1
  446. package/dist/commands/edit-prompt-command.js +0 -61
  447. package/dist/commands/exit-command.d.ts +0 -13
  448. package/dist/commands/exit-command.d.ts.map +0 -1
  449. package/dist/commands/exit-command.js +0 -46
  450. package/dist/commands/files-command.d.ts +0 -3
  451. package/dist/commands/files-command.d.ts.map +0 -1
  452. package/dist/commands/files-command.js +0 -121
  453. package/dist/commands/generate-rules-command.d.ts +0 -3
  454. package/dist/commands/generate-rules-command.d.ts.map +0 -1
  455. package/dist/commands/handoff-command.d.ts +0 -3
  456. package/dist/commands/handoff-command.d.ts.map +0 -1
  457. package/dist/commands/handoff-command.js +0 -202
  458. package/dist/commands/health-command.d.ts +0 -4
  459. package/dist/commands/health-command.d.ts.map +0 -1
  460. package/dist/commands/health-command.js +0 -213
  461. package/dist/commands/help-command.d.ts +0 -3
  462. package/dist/commands/help-command.d.ts.map +0 -1
  463. package/dist/commands/history-command.d.ts +0 -3
  464. package/dist/commands/history-command.d.ts.map +0 -1
  465. package/dist/commands/init-command.d.ts +0 -3
  466. package/dist/commands/init-command.d.ts.map +0 -1
  467. package/dist/commands/last-log-command.d.ts +0 -3
  468. package/dist/commands/last-log-command.d.ts.map +0 -1
  469. package/dist/commands/last-log-command.js +0 -98
  470. package/dist/commands/list-directories-command.d.ts +0 -3
  471. package/dist/commands/list-directories-command.d.ts.map +0 -1
  472. package/dist/commands/list-tools-command.d.ts +0 -3
  473. package/dist/commands/list-tools-command.d.ts.map +0 -1
  474. package/dist/commands/list-tools-command.js +0 -124
  475. package/dist/commands/model-command.d.ts +0 -25
  476. package/dist/commands/model-command.d.ts.map +0 -1
  477. package/dist/commands/model-command.js +0 -340
  478. package/dist/commands/paste-command.d.ts +0 -3
  479. package/dist/commands/paste-command.d.ts.map +0 -1
  480. package/dist/commands/paste-command.js +0 -277
  481. package/dist/commands/pickup-command.d.ts +0 -3
  482. package/dist/commands/pickup-command.d.ts.map +0 -1
  483. package/dist/commands/pickup-command.js +0 -161
  484. package/dist/commands/prompt-command.d.ts +0 -3
  485. package/dist/commands/prompt-command.d.ts.map +0 -1
  486. package/dist/commands/prompt-command.js +0 -280
  487. package/dist/commands/remove-directory-command.d.ts +0 -3
  488. package/dist/commands/remove-directory-command.d.ts.map +0 -1
  489. package/dist/commands/reset-command.d.ts +0 -3
  490. package/dist/commands/reset-command.d.ts.map +0 -1
  491. package/dist/commands/rules-command.d.ts +0 -3
  492. package/dist/commands/rules-command.d.ts.map +0 -1
  493. package/dist/commands/rules-command.js +0 -135
  494. package/dist/commands/save-command.d.ts +0 -3
  495. package/dist/commands/save-command.d.ts.map +0 -1
  496. package/dist/commands/shell-command.d.ts +0 -3
  497. package/dist/commands/shell-command.d.ts.map +0 -1
  498. package/dist/commands/usage-command.d.ts +0 -3
  499. package/dist/commands/usage-command.d.ts.map +0 -1
  500. package/dist/commands/usage-command.js +0 -42
  501. package/dist/messages.d.ts.map +0 -1
  502. package/dist/repl/display-tool-messages.d.ts +0 -4
  503. package/dist/repl/display-tool-messages.d.ts.map +0 -1
  504. package/dist/repl/display-tool-messages.js +0 -58
  505. package/dist/repl/display-tool-use.d.ts +0 -14
  506. package/dist/repl/display-tool-use.d.ts.map +0 -1
  507. package/dist/repl/display-tool-use.js +0 -63
  508. package/dist/repl/get-prompt-header.d.ts +0 -8
  509. package/dist/repl/get-prompt-header.d.ts.map +0 -1
  510. package/dist/repl/get-prompt-header.js +0 -9
  511. package/dist/repl/project-status-line.d.ts +0 -2
  512. package/dist/repl/project-status-line.d.ts.map +0 -1
  513. package/dist/repl/project-status-line.js +0 -31
  514. package/dist/repl/prompt.d.ts +0 -21
  515. package/dist/repl/prompt.d.ts.map +0 -1
  516. package/dist/repl/prompt.js +0 -244
  517. package/dist/repl/tool-call-repair.d.ts +0 -4
  518. package/dist/repl/tool-call-repair.d.ts.map +0 -1
  519. package/dist/repl/tool-call-repair.js +0 -54
  520. package/dist/repl.d.ts +0 -29
  521. package/dist/repl.d.ts.map +0 -1
  522. package/dist/repl.js +0 -218
  523. package/dist/terminal/checkbox-prompt.d.ts +0 -36
  524. package/dist/terminal/checkbox-prompt.d.ts.map +0 -1
  525. package/dist/terminal/checkbox-prompt.js +0 -368
  526. package/dist/terminal/editor-prompt.d.ts +0 -10
  527. package/dist/terminal/editor-prompt.d.ts.map +0 -1
  528. package/dist/terminal/editor-prompt.js +0 -61
  529. package/dist/terminal/errors.d.ts +0 -19
  530. package/dist/terminal/errors.d.ts.map +0 -1
  531. package/dist/terminal/errors.js +0 -37
  532. package/dist/terminal/input-prompt.d.ts +0 -17
  533. package/dist/terminal/input-prompt.d.ts.map +0 -1
  534. package/dist/terminal/input-prompt.js +0 -181
  535. package/dist/terminal/markdown.d.ts +0 -2
  536. package/dist/terminal/markdown.d.ts.map +0 -1
  537. package/dist/terminal/markdown.js +0 -118
  538. package/dist/terminal/search-prompt.d.ts +0 -20
  539. package/dist/terminal/search-prompt.d.ts.map +0 -1
  540. package/dist/terminal/search-prompt.js +0 -280
  541. package/dist/terminal/types.d.ts +0 -35
  542. package/dist/terminal/types.d.ts.map +0 -1
  543. package/dist/tokens/threshold.d.ts +0 -35
  544. package/dist/tokens/threshold.d.ts.map +0 -1
  545. package/dist/tokens/threshold.js +0 -85
  546. package/dist/tools/advanced-edit-file.d.ts +0 -69
  547. package/dist/tools/advanced-edit-file.d.ts.map +0 -1
  548. package/dist/tools/advanced-edit-file.js +0 -281
  549. package/dist/tools/agent.d.ts +0 -29
  550. package/dist/tools/agent.d.ts.map +0 -1
  551. package/dist/tools/agent.js +0 -103
  552. package/dist/tools/bash-utils.d.ts.map +0 -1
  553. package/dist/tools/code-interpreter.d.ts +0 -25
  554. package/dist/tools/code-interpreter.d.ts.map +0 -1
  555. package/dist/tools/code-interpreter.js +0 -167
  556. package/dist/tools/delete-file.d.ts +0 -24
  557. package/dist/tools/delete-file.d.ts.map +0 -1
  558. package/dist/tools/delete-file.js +0 -70
  559. package/dist/tools/dynamic-tool-parser.d.ts +0 -21
  560. package/dist/tools/dynamic-tool-parser.d.ts.map +0 -1
  561. package/dist/tools/dynamic-tool-parser.js +0 -22
  562. package/dist/tools/filesystem-utils.d.ts.map +0 -1
  563. package/dist/tools/git-utils.d.ts.map +0 -1
  564. package/dist/tools/llm-edit-fixer.d.ts +0 -25
  565. package/dist/tools/llm-edit-fixer.d.ts.map +0 -1
  566. package/dist/tools/llm-edit-fixer.js +0 -150
  567. package/dist/tools/move-file.d.ts +0 -26
  568. package/dist/tools/move-file.d.ts.map +0 -1
  569. package/dist/tools/move-file.js +0 -58
  570. package/dist/tools/read-multiple-files.d.ts +0 -26
  571. package/dist/tools/read-multiple-files.d.ts.map +0 -1
  572. package/dist/tools/read-multiple-files.js +0 -139
  573. package/dist/tools/web-fetch.d.ts +0 -56
  574. package/dist/tools/web-fetch.d.ts.map +0 -1
  575. package/dist/tools/web-fetch.js +0 -247
  576. package/dist/tools/web-search.d.ts +0 -23
  577. package/dist/tools/web-search.d.ts.map +0 -1
  578. package/dist/tools/web-search.js +0 -133
  579. package/dist/tui/components/prompt-status.d.ts +0 -16
  580. package/dist/tui/components/prompt-status.d.ts.map +0 -1
  581. package/dist/tui/components/prompt-status.js +0 -21
  582. package/dist/utils/filesystem.d.ts.map +0 -1
  583. package/dist/utils/zod-utils.d.ts.map +0 -1
  584. package/dist/utils/zod-utils.js +0 -7
  585. /package/dist/{terminal → commands/add-directory}/types.js +0 -0
  586. /package/dist/utils/{filesystem.js → filesystem/operations.js} +0 -0
@@ -0,0 +1,90 @@
1
+ export class CommandProvider {
2
+ commands;
3
+ constructor(commands = []) {
4
+ this.commands = commands;
5
+ }
6
+ async getSuggestions(lines, cursorLine, cursorCol) {
7
+ const currentLine = lines[cursorLine] || "";
8
+ const textBeforeCursor = currentLine.slice(0, cursorCol);
9
+ // Check for slash commands
10
+ if (textBeforeCursor.startsWith("/")) {
11
+ const spaceIndex = textBeforeCursor.indexOf(" ");
12
+ if (spaceIndex === -1) {
13
+ // No space yet - complete command names
14
+ const prefix = textBeforeCursor.slice(1); // Remove the "/"
15
+ const filtered = this.commands
16
+ .filter((cmd) => {
17
+ const name = "name" in cmd ? cmd.name : cmd.value; // Check if SlashCommand or AutocompleteItem
18
+ return name?.toLowerCase().startsWith(prefix.toLowerCase());
19
+ })
20
+ .map((cmd) => ({
21
+ value: "name" in cmd ? cmd.name : cmd.value,
22
+ label: "name" in cmd ? cmd.name : cmd.label,
23
+ ...(cmd.description && { description: cmd.description }),
24
+ }));
25
+ if (filtered.length === 0)
26
+ return null;
27
+ return {
28
+ items: filtered,
29
+ prefix: prefix, // Return the actual prefix used for filtering (without "/")
30
+ };
31
+ }
32
+ // Space found - complete command arguments
33
+ const commandName = textBeforeCursor.slice(1, spaceIndex); // Command without "/"
34
+ const argumentText = textBeforeCursor.slice(spaceIndex + 1); // Text after space
35
+ const command = this.commands.find((cmd) => {
36
+ const name = "name" in cmd ? cmd.name : cmd.value;
37
+ return name === commandName;
38
+ });
39
+ if (!command ||
40
+ !("getArgumentCompletions" in command) ||
41
+ !command.getArgumentCompletions) {
42
+ return null; // No argument completion for this command
43
+ }
44
+ const argumentSuggestions = command.getArgumentCompletions?.(argumentText);
45
+ if (!argumentSuggestions || argumentSuggestions.length === 0) {
46
+ return null;
47
+ }
48
+ return {
49
+ items: argumentSuggestions,
50
+ prefix: argumentText,
51
+ };
52
+ }
53
+ return null;
54
+ }
55
+ applyCompletion(lines, cursorLine, cursorCol, item, prefix) {
56
+ const currentLine = lines[cursorLine] || "";
57
+ const textBeforeCursor = currentLine.slice(0, cursorCol);
58
+ // Check if we're completing a slash command (prefix doesn't start with "/" but we're in slash command context)
59
+ if (textBeforeCursor.startsWith("/") && !textBeforeCursor.includes(" ")) {
60
+ // This is a command name completion
61
+ const beforePrefix = currentLine.slice(0, cursorCol - prefix.length);
62
+ const afterCursor = currentLine.slice(cursorCol);
63
+ const newLine = `${beforePrefix}${item.value} ${afterCursor}`;
64
+ const newLines = [...lines];
65
+ newLines[cursorLine] = newLine;
66
+ return {
67
+ lines: newLines,
68
+ cursorLine,
69
+ cursorCol: beforePrefix.length + item.value.length + 1, // +1 for space
70
+ };
71
+ }
72
+ // Check if we're in a slash command context (beforePrefix contains "/command ")
73
+ if (textBeforeCursor.includes("/") && textBeforeCursor.includes(" ")) {
74
+ // This is likely a command argument completion
75
+ const beforePrefix = currentLine.slice(0, cursorCol - prefix.length);
76
+ const afterCursor = currentLine.slice(cursorCol);
77
+ const newLine = beforePrefix + item.value + afterCursor;
78
+ const newLines = [...lines];
79
+ newLines[cursorLine] = newLine;
80
+ return {
81
+ lines: newLines,
82
+ cursorLine,
83
+ cursorCol: beforePrefix.length + item.value.length,
84
+ };
85
+ }
86
+ // If we get here, this provider shouldn't handle the completion
87
+ // Return unchanged to let other providers handle it
88
+ return { lines, cursorLine, cursorCol };
89
+ }
90
+ }
@@ -0,0 +1,16 @@
1
+ import type { AutocompleteItem, AutocompleteProvider } from "./base-provider.ts";
2
+ export declare class FileSearchProvider implements AutocompleteProvider {
3
+ private maxResults;
4
+ private maxDepth;
5
+ getSuggestions(lines: string[], cursorLine: number, cursorCol: number): Promise<{
6
+ items: AutocompleteItem[];
7
+ prefix: string;
8
+ } | null>;
9
+ applyCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
10
+ lines: string[];
11
+ cursorLine: number;
12
+ cursorCol: number;
13
+ };
14
+ private searchFiles;
15
+ }
16
+ //# sourceMappingURL=file-search-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-search-provider.d.ts","sourceRoot":"","sources":["../../../source/tui/autocomplete/file-search-provider.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AA+B5B,qBAAa,kBAAmB,YAAW,oBAAoB;IAC7D,OAAO,CAAC,UAAU,CAAM;IACxB,OAAO,CAAC,QAAQ,CAAK;IAEf,cAAc,CAClB,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAuBhE,eAAe,CACb,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,MAAM,GACb;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;YAqB/C,WAAW;CA+D1B"}
@@ -0,0 +1,123 @@
1
+ import { readFile } from "node:fs/promises";
2
+ import { join, normalize, relative, resolve } from "node:path";
3
+ import { fdir } from "fdir";
4
+ import ignore from "../../utils/ignore.js";
5
+ const defaultIgnoredPatterns = [
6
+ "**/node_modules",
7
+ "**/dist",
8
+ "**/.git",
9
+ "**/coverage",
10
+ "**/flow-typed",
11
+ "**/.DS_Store",
12
+ "**/*.log",
13
+ "**/*.lock",
14
+ ];
15
+ async function loadGitignorePatterns(cwd) {
16
+ const gitignorePath = join(cwd, ".gitignore");
17
+ try {
18
+ const content = await readFile(gitignorePath, "utf8");
19
+ const patterns = [];
20
+ for (const line of content.split(/\r?\n/)) {
21
+ const trimmed = line.trim();
22
+ if (!trimmed || trimmed.startsWith("#")) {
23
+ continue;
24
+ }
25
+ patterns.push(trimmed);
26
+ }
27
+ return patterns;
28
+ }
29
+ catch {
30
+ return [];
31
+ }
32
+ }
33
+ export class FileSearchProvider {
34
+ maxResults = 20;
35
+ maxDepth = 3;
36
+ async getSuggestions(lines, cursorLine, cursorCol) {
37
+ const currentLine = lines[cursorLine] || "";
38
+ const textBeforeCursor = currentLine.slice(0, cursorCol);
39
+ const pathMatch = textBeforeCursor.match(/#([^\s]*)$/);
40
+ if (!pathMatch) {
41
+ return null;
42
+ }
43
+ const prefix = pathMatch[0];
44
+ const searchTerm = pathMatch[1];
45
+ const suggestions = await this.searchFiles(searchTerm);
46
+ if (suggestions.length === 0) {
47
+ return null;
48
+ }
49
+ return {
50
+ items: suggestions,
51
+ prefix,
52
+ };
53
+ }
54
+ applyCompletion(lines, cursorLine, cursorCol, item, prefix) {
55
+ // Only handle completions that start with #
56
+ if (!prefix.startsWith("#")) {
57
+ return { lines, cursorLine, cursorCol };
58
+ }
59
+ const currentLine = lines[cursorLine] || "";
60
+ const beforePrefix = currentLine.slice(0, cursorCol - prefix.length);
61
+ const afterCursor = currentLine.slice(cursorCol);
62
+ const newLine = `${beforePrefix}${item.value} ${afterCursor}`;
63
+ const newLines = [...lines];
64
+ newLines[cursorLine] = newLine;
65
+ return {
66
+ lines: newLines,
67
+ cursorLine,
68
+ cursorCol: beforePrefix.length + item.value.length + 1,
69
+ };
70
+ }
71
+ async searchFiles(searchTerm) {
72
+ const results = [];
73
+ const cwd = process.cwd();
74
+ // Build ignore instance with .gitignore patterns + defaults
75
+ const ig = ignore().add(defaultIgnoredPatterns);
76
+ const gitignorePatterns = await loadGitignorePatterns(cwd);
77
+ if (gitignorePatterns.length > 0) {
78
+ ig.add(gitignorePatterns);
79
+ }
80
+ try {
81
+ const crawler = new fdir()
82
+ .withBasePath()
83
+ .withMaxDepth(this.maxDepth)
84
+ .exclude((dirName, dirPath) => {
85
+ const fullPath = dirPath ? `${dirPath}/${dirName}` : dirName;
86
+ const absolutePath = resolve(cwd, fullPath);
87
+ const relativePath = normalize(relative(cwd, absolutePath));
88
+ return ig.ignores(relativePath);
89
+ });
90
+ const files = await crawler.crawl(cwd).withPromise();
91
+ const lowerSearchTerm = searchTerm.toLowerCase();
92
+ const matches = files.filter((file) => file.toLowerCase().includes(lowerSearchTerm));
93
+ for (const match of matches) {
94
+ const absolutePath = resolve(cwd, match);
95
+ const relativePath = normalize(relative(cwd, absolutePath));
96
+ if (ig.ignores(relativePath)) {
97
+ continue;
98
+ }
99
+ const isDirectory = match.endsWith("/");
100
+ const pathWithoutTrailingSlash = isDirectory
101
+ ? match.slice(0, -1)
102
+ : match;
103
+ const label = pathWithoutTrailingSlash.split("/").pop() || pathWithoutTrailingSlash;
104
+ const parentPath = pathWithoutTrailingSlash
105
+ .split("/")
106
+ .slice(0, -1)
107
+ .join("/");
108
+ results.push({
109
+ value: isDirectory ? `${match} ` : match,
110
+ label,
111
+ description: parentPath || ".",
112
+ });
113
+ if (results.length >= this.maxResults) {
114
+ break;
115
+ }
116
+ }
117
+ }
118
+ catch {
119
+ // Directory doesn't exist or not accessible
120
+ }
121
+ return results;
122
+ }
123
+ }
@@ -0,0 +1,21 @@
1
+ import type { AutocompleteItem, AutocompleteProvider } from "./base-provider.ts";
2
+ export declare class PathProvider implements AutocompleteProvider {
3
+ protected allowedDirs: string[];
4
+ constructor(allowedDirs?: string[]);
5
+ getSuggestions(lines: string[], cursorLine: number, cursorCol: number): Promise<{
6
+ items: AutocompleteItem[];
7
+ prefix: string;
8
+ } | null>;
9
+ applyCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
10
+ lines: string[];
11
+ cursorLine: number;
12
+ cursorCol: number;
13
+ };
14
+ getForceFileSuggestions(lines: string[], cursorLine: number, cursorCol: number): Promise<{
15
+ items: AutocompleteItem[];
16
+ prefix: string;
17
+ } | null>;
18
+ shouldTriggerFileCompletion(lines: string[], cursorLine: number, cursorCol: number): boolean;
19
+ protected getFileSuggestions(prefix: string): Promise<AutocompleteItem[]>;
20
+ }
21
+ //# sourceMappingURL=path-provider.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"path-provider.d.ts","sourceRoot":"","sources":["../../../source/tui/autocomplete/path-provider.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,gBAAgB,EAChB,oBAAoB,EACrB,MAAM,oBAAoB,CAAC;AAQ5B,qBAAa,YAAa,YAAW,oBAAoB;IACvD,SAAS,CAAC,WAAW,EAAE,MAAM,EAAE,CAAC;gBAEpB,WAAW,GAAE,MAAM,EAAoB;IAI7C,cAAc,CAClB,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAoBhE,eAAe,CACb,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,MAAM,GACb;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IAkBvD,uBAAuB,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAoBhE,2BAA2B,CACzB,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO;cAaM,kBAAkB,CAChC,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,gBAAgB,EAAE,CAAC;CAgH/B"}
@@ -0,0 +1,164 @@
1
+ import { basename, dirname, isAbsolute, join } from "node:path";
2
+ import { extractPathPrefix, getDirectoryEntries, isPathWithinAllowedDirs, } from "./utils.js";
3
+ export class PathProvider {
4
+ allowedDirs;
5
+ constructor(allowedDirs = [process.cwd()]) {
6
+ this.allowedDirs = allowedDirs;
7
+ }
8
+ async getSuggestions(lines, cursorLine, cursorCol) {
9
+ const currentLine = lines[cursorLine] || "";
10
+ const textBeforeCursor = currentLine.slice(0, cursorCol);
11
+ // Check for file paths - triggered by Tab or if we detect a path pattern
12
+ const pathMatch = extractPathPrefix(textBeforeCursor, false);
13
+ if (pathMatch !== null) {
14
+ const suggestions = await this.getFileSuggestions(pathMatch);
15
+ if (suggestions.length === 0)
16
+ return null;
17
+ return {
18
+ items: suggestions,
19
+ prefix: pathMatch,
20
+ };
21
+ }
22
+ return null;
23
+ }
24
+ applyCompletion(lines, cursorLine, cursorCol, item, prefix) {
25
+ const currentLine = lines[cursorLine] || "";
26
+ const beforePrefix = currentLine.slice(0, cursorCol - prefix.length);
27
+ const afterCursor = currentLine.slice(cursorCol);
28
+ // For file paths, complete the path
29
+ const newLine = beforePrefix + item.value + afterCursor;
30
+ const newLines = [...lines];
31
+ newLines[cursorLine] = newLine;
32
+ return {
33
+ lines: newLines,
34
+ cursorLine,
35
+ cursorCol: beforePrefix.length + item.value.length,
36
+ };
37
+ }
38
+ // Force file completion (called on Tab key) - always returns suggestions
39
+ async getForceFileSuggestions(lines, cursorLine, cursorCol) {
40
+ const currentLine = lines[cursorLine] || "";
41
+ const textBeforeCursor = currentLine.slice(0, cursorCol);
42
+ // Force extract path prefix - this will always return something
43
+ const pathMatch = extractPathPrefix(textBeforeCursor, true);
44
+ if (pathMatch !== null) {
45
+ const suggestions = await this.getFileSuggestions(pathMatch);
46
+ if (suggestions.length === 0)
47
+ return null;
48
+ return {
49
+ items: suggestions,
50
+ prefix: pathMatch,
51
+ };
52
+ }
53
+ return null;
54
+ }
55
+ // Check if we should trigger file completion (called on Tab key)
56
+ shouldTriggerFileCompletion(lines, cursorLine, cursorCol) {
57
+ const currentLine = lines[cursorLine] || "";
58
+ const textBeforeCursor = currentLine.slice(0, cursorCol);
59
+ // Don't trigger if we're in a slash command
60
+ if (textBeforeCursor.startsWith("/") && !textBeforeCursor.includes(" ")) {
61
+ return false;
62
+ }
63
+ return true;
64
+ }
65
+ // Get file/directory suggestions for a given path prefix
66
+ async getFileSuggestions(prefix) {
67
+ try {
68
+ let searchDirs;
69
+ let searchPrefix;
70
+ if (prefix === "" || prefix === "./" || prefix === "../") {
71
+ searchDirs = this.allowedDirs;
72
+ searchPrefix = "";
73
+ }
74
+ else if (isAbsolute(prefix)) {
75
+ // Handle absolute paths
76
+ const isWithinAllowed = await isPathWithinAllowedDirs(prefix, this.allowedDirs);
77
+ if (!isWithinAllowed) {
78
+ return [];
79
+ }
80
+ if (prefix.endsWith("/")) {
81
+ searchDirs = [prefix];
82
+ searchPrefix = "";
83
+ }
84
+ else {
85
+ searchDirs = [dirname(prefix)];
86
+ searchPrefix = basename(prefix);
87
+ }
88
+ }
89
+ else if (prefix.endsWith("/")) {
90
+ // If prefix ends with /, show contents of that directory
91
+ // Try to find which allowed directory this path belongs to
92
+ const allowedDirs = [];
93
+ for (const allowedDir of this.allowedDirs) {
94
+ const resolvedPath = join(allowedDir, prefix);
95
+ const isWithinAllowed = await isPathWithinAllowedDirs(resolvedPath, this.allowedDirs);
96
+ if (isWithinAllowed) {
97
+ allowedDirs.push(resolvedPath);
98
+ }
99
+ }
100
+ if (allowedDirs.length === 0) {
101
+ return [];
102
+ }
103
+ searchDirs = allowedDirs;
104
+ searchPrefix = "";
105
+ }
106
+ else {
107
+ // Split into directory and file prefix
108
+ const dir = dirname(prefix);
109
+ const file = basename(prefix);
110
+ const allowedDirs = [];
111
+ for (const allowedDir of this.allowedDirs) {
112
+ const resolvedPath = join(allowedDir, dir);
113
+ const isWithinAllowed = await isPathWithinAllowedDirs(resolvedPath, this.allowedDirs);
114
+ if (isWithinAllowed) {
115
+ allowedDirs.push(resolvedPath);
116
+ }
117
+ }
118
+ if (allowedDirs.length === 0) {
119
+ return [];
120
+ }
121
+ searchDirs = allowedDirs;
122
+ searchPrefix = file;
123
+ }
124
+ const entries = await getDirectoryEntries(searchDirs);
125
+ const suggestions = [];
126
+ // Filter entries by prefix first (fast string operation)
127
+ const matchingEntries = entries.filter((entry) => entry.name.toLowerCase().startsWith(searchPrefix.toLowerCase()));
128
+ // Batch check allowed paths (reduces repeated realpath calls)
129
+ const validEntries = [];
130
+ for (const entry of matchingEntries) {
131
+ const fullPath = join(entry.parentPath, entry.name);
132
+ if (await isPathWithinAllowedDirs(fullPath, this.allowedDirs)) {
133
+ validEntries.push({ entry, fullPath });
134
+ }
135
+ }
136
+ for (const { entry, fullPath } of validEntries) {
137
+ // Use Dirent.isDirectory() - no extra stat() call needed
138
+ const isDirectory = entry.isDirectory();
139
+ suggestions.push({
140
+ value: isDirectory ? `${fullPath}/` : fullPath,
141
+ label: entry.name,
142
+ description: isDirectory
143
+ ? `directory ${entry.parentPath}`
144
+ : `file ${entry.parentPath}`,
145
+ });
146
+ }
147
+ // Sort directories first, then alphabetically
148
+ suggestions.sort((a, b) => {
149
+ const aIsDir = a.description === "directory";
150
+ const bIsDir = b.description === "directory";
151
+ if (aIsDir && !bIsDir)
152
+ return -1;
153
+ if (!aIsDir && bIsDir)
154
+ return 1;
155
+ return a.label.localeCompare(b.label);
156
+ });
157
+ return suggestions;
158
+ }
159
+ catch (_e) {
160
+ // Directory doesn't exist or not accessible
161
+ return [];
162
+ }
163
+ }
164
+ }
@@ -0,0 +1,16 @@
1
+ import type { Dirent } from "node:fs";
2
+ export declare class DirectoryCache {
3
+ private cache;
4
+ private ttl;
5
+ get(dir: string): Promise<Dirent[] | null>;
6
+ set(dir: string, entries: Dirent[]): void;
7
+ clear(): void;
8
+ }
9
+ export declare const directoryCache: DirectoryCache;
10
+ export interface DirentWithPath extends Dirent {
11
+ parentPath: string;
12
+ }
13
+ export declare function getDirectoryEntries(dirs: string[]): Promise<DirentWithPath[]>;
14
+ export declare function isPathWithinAllowedDirs(requestedPath: string, allowedDirs: string[]): Promise<boolean>;
15
+ export declare function extractPathPrefix(text: string, forceExtract?: boolean): string | null;
16
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../source/tui/autocomplete/utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAKtC,qBAAa,cAAc;IACzB,OAAO,CAAC,KAAK,CAA+D;IAC5E,OAAO,CAAC,GAAG,CAAQ;IAEb,GAAG,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC;IAQhD,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI;IAIzC,KAAK,IAAI,IAAI;CAGd;AAED,eAAO,MAAM,cAAc,gBAAuB,CAAC;AAGnD,MAAM,WAAW,cAAe,SAAQ,MAAM;IAC5C,UAAU,EAAE,MAAM,CAAC;CACpB;AAGD,wBAAsB,mBAAmB,CACvC,IAAI,EAAE,MAAM,EAAE,GACb,OAAO,CAAC,cAAc,EAAE,CAAC,CA4B3B;AA8BD,wBAAsB,uBAAuB,CAC3C,aAAa,EAAE,MAAM,EACrB,WAAW,EAAE,MAAM,EAAE,GACpB,OAAO,CAAC,OAAO,CAAC,CAWlB;AAED,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,MAAM,EACZ,YAAY,UAAQ,GACnB,MAAM,GAAG,IAAI,CAgEf"}
@@ -0,0 +1,137 @@
1
+ import { readdir, realpath } from "node:fs/promises";
2
+ import { isAbsolute, relative, resolve } from "node:path";
3
+ // Cache for directory listings to improve performance
4
+ export class DirectoryCache {
5
+ cache = new Map();
6
+ ttl = 3000; // 3 seconds
7
+ async get(dir) {
8
+ const cached = this.cache.get(dir);
9
+ if (cached && Date.now() - cached.timestamp < this.ttl) {
10
+ return cached.entries;
11
+ }
12
+ return null;
13
+ }
14
+ set(dir, entries) {
15
+ this.cache.set(dir, { entries, timestamp: Date.now() });
16
+ }
17
+ clear() {
18
+ this.cache.clear();
19
+ }
20
+ }
21
+ export const directoryCache = new DirectoryCache();
22
+ // Helper function to get directory entries with caching and timeout
23
+ export async function getDirectoryEntries(dirs) {
24
+ const results = [];
25
+ for (const dir of dirs) {
26
+ const cached = await directoryCache.get(dir);
27
+ if (cached) {
28
+ for (const entry of cached) {
29
+ results.push(Object.assign(entry, { parentPath: dir }));
30
+ }
31
+ continue;
32
+ }
33
+ try {
34
+ // Add timeout to prevent hanging on slow file systems
35
+ const entries = await Promise.race([
36
+ readdir(dir, { withFileTypes: true }),
37
+ new Promise((_, reject) => setTimeout(() => reject(new Error("Directory read timeout")), 2000)),
38
+ ]);
39
+ directoryCache.set(dir, entries);
40
+ for (const entry of entries) {
41
+ results.push(Object.assign(entry, { parentPath: dir }));
42
+ }
43
+ }
44
+ catch (_e) {
45
+ // ignore
46
+ }
47
+ }
48
+ return results;
49
+ }
50
+ // Cache for resolved allowed directories to avoid repeated realpath calls
51
+ const resolvedAllowedDirsCache = new Map();
52
+ async function getResolvedPath(path) {
53
+ const cached = resolvedAllowedDirsCache.get(path);
54
+ if (cached !== undefined) {
55
+ return cached;
56
+ }
57
+ const absPath = resolve(path);
58
+ let resolved = absPath;
59
+ try {
60
+ resolved = await realpath(absPath);
61
+ }
62
+ catch {
63
+ // If path doesn't exist, use the resolved absolute path
64
+ }
65
+ // Cache with a size limit
66
+ if (resolvedAllowedDirsCache.size > 500) {
67
+ const firstKey = resolvedAllowedDirsCache.keys().next().value;
68
+ if (firstKey !== undefined) {
69
+ resolvedAllowedDirsCache.delete(firstKey);
70
+ }
71
+ }
72
+ resolvedAllowedDirsCache.set(path, resolved);
73
+ return resolved;
74
+ }
75
+ export async function isPathWithinAllowedDirs(requestedPath, allowedDirs) {
76
+ const target = await getResolvedPath(requestedPath);
77
+ for (const allowedDir of allowedDirs) {
78
+ const absAllowed = await getResolvedPath(allowedDir);
79
+ const rel = relative(absAllowed, target);
80
+ if (rel === "" || (!rel.startsWith("..") && !isAbsolute(rel))) {
81
+ return true;
82
+ }
83
+ }
84
+ return false;
85
+ }
86
+ export function extractPathPrefix(text, forceExtract = false) {
87
+ // Match paths - more conservative approach to avoid matching already completed paths
88
+ // This regex captures:
89
+ // - Paths starting from beginning of line or after space
90
+ // - Optional ./ or ../ or ~/ prefix
91
+ // - The path itself (must contain at least one / or start with ./ or ../ or ~/)
92
+ const matches = text.match(/(?:^|\s)((?:\/{1,2}|\.{1,2}\/|~\/)?(?:[^\s]*\/)*[^\s/]*)$/);
93
+ if (!matches) {
94
+ // If forced extraction and no matches, return empty string to trigger from current dir
95
+ return forceExtract ? "" : null;
96
+ }
97
+ const pathPrefix = matches[1] || "";
98
+ // For forced extraction (Tab key), always return something
99
+ if (forceExtract) {
100
+ // If we're not in a clear path context and we're at the end of a word,
101
+ // return empty string to complete from current directory
102
+ if (!pathPrefix.includes("/") &&
103
+ !pathPrefix.endsWith("/") &&
104
+ !pathPrefix.startsWith(".") &&
105
+ !pathPrefix.startsWith("~/")) {
106
+ // Only return empty string if we're at the beginning or after space
107
+ // This prevents completing "source" as empty string
108
+ if (text === "" || text.endsWith(" ")) {
109
+ return "";
110
+ }
111
+ }
112
+ return pathPrefix;
113
+ }
114
+ // For natural triggers, be more conservative:
115
+ // Only trigger if we have a clear path indicator
116
+ const hasPathIndicator = pathPrefix.includes("/") ||
117
+ pathPrefix.endsWith("/") ||
118
+ pathPrefix.startsWith(".") ||
119
+ pathPrefix.startsWith("~/");
120
+ if (!hasPathIndicator) {
121
+ return null;
122
+ }
123
+ // Additional check: don't trigger if the path looks like it's already completed
124
+ // (i.e., doesn't end with a partial filename)
125
+ // Only apply this check for paths that don't have clear path indicators
126
+ // and look like single directory names (no path separators)
127
+ if (!pathPrefix.includes("/") &&
128
+ !pathPrefix.includes(".") &&
129
+ !pathPrefix.startsWith("./") &&
130
+ !pathPrefix.startsWith("../") &&
131
+ !pathPrefix.startsWith("~/") &&
132
+ pathPrefix.length > 3) {
133
+ // This might be a completed directory name, not a partial path
134
+ return null;
135
+ }
136
+ return pathPrefix;
137
+ }
@@ -1,44 +1,13 @@
1
- export interface AutocompleteItem {
2
- value: string;
3
- label: string;
4
- description?: string;
5
- }
6
- export interface SlashCommand {
7
- name: string;
8
- description?: string;
9
- getArgumentCompletions?(argumentPrefix: string): AutocompleteItem[] | null;
10
- }
11
- export interface AutocompleteProvider {
12
- getSuggestions(lines: string[], cursorLine: number, cursorCol: number): Promise<{
13
- items: AutocompleteItem[];
14
- prefix: string;
15
- } | null>;
16
- applyCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
17
- lines: string[];
18
- cursorLine: number;
19
- cursorCol: number;
20
- };
21
- }
22
- export declare class CombinedAutocompleteProvider implements AutocompleteProvider {
23
- private commands;
24
- private allowedDirs;
25
- constructor(commands?: (SlashCommand | AutocompleteItem)[], allowedDirs?: string[]);
26
- getSuggestions(lines: string[], cursorLine: number, cursorCol: number): Promise<{
27
- items: AutocompleteItem[];
28
- prefix: string;
29
- } | null>;
30
- applyCompletion(lines: string[], cursorLine: number, cursorCol: number, item: AutocompleteItem, prefix: string): {
31
- lines: string[];
32
- cursorLine: number;
33
- cursorCol: number;
34
- };
35
- private extractPathPrefix;
36
- private isPathWithinAllowedDirs;
37
- private getFileSuggestions;
38
- getForceFileSuggestions(lines: string[], cursorLine: number, cursorCol: number): Promise<{
39
- items: AutocompleteItem[];
40
- prefix: string;
41
- } | null>;
42
- shouldTriggerFileCompletion(lines: string[], cursorLine: number, cursorCol: number): boolean;
43
- }
1
+ import type { AutocompleteItem } from "./autocomplete/base-provider.ts";
2
+ import { CombinedProvider } from "./autocomplete/combined-provider.ts";
3
+ import { type SlashCommand } from "./autocomplete/command-provider.ts";
4
+ export { AttachmentProvider } from "./autocomplete/attachment-provider.ts";
5
+ export type { AutocompleteItem, AutocompleteProvider, } from "./autocomplete/base-provider.ts";
6
+ export { CombinedProvider } from "./autocomplete/combined-provider.ts";
7
+ export type { SlashCommand } from "./autocomplete/command-provider.ts";
8
+ export { CommandProvider } from "./autocomplete/command-provider.ts";
9
+ export { FileSearchProvider } from "./autocomplete/file-search-provider.ts";
10
+ export { PathProvider } from "./autocomplete/path-provider.ts";
11
+ export { DirectoryCache, directoryCache, extractPathPrefix, getDirectoryEntries, isPathWithinAllowedDirs, } from "./autocomplete/utils.ts";
12
+ export declare function createDefaultProvider<T extends SlashCommand | AutocompleteItem>(commands?: T[], allowedDirs?: string[]): CombinedProvider;
44
13
  //# sourceMappingURL=autocomplete.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../source/tui/autocomplete.ts"],"names":[],"mappings":"AAyHA,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,CAAC,EAAE,MAAM,CAAC;IAGrB,sBAAsB,CAAC,CAAC,cAAc,EAAE,MAAM,GAAG,gBAAgB,EAAE,GAAG,IAAI,CAAC;CAC5E;AAED,MAAM,WAAW,oBAAoB;IAGnC,cAAc,CACZ,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QACT,KAAK,EAAE,gBAAgB,EAAE,CAAC;QAC1B,MAAM,EAAE,MAAM,CAAC;KAChB,GAAG,IAAI,CAAC,CAAC;IAIV,eAAe,CACb,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,MAAM,GACb;QACD,KAAK,EAAE,MAAM,EAAE,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC;CACH;AAGD,qBAAa,4BAA6B,YAAW,oBAAoB;IACvE,OAAO,CAAC,QAAQ,CAAsC;IACtD,OAAO,CAAC,WAAW,CAAW;gBAG5B,QAAQ,GAAE,CAAC,YAAY,GAAG,gBAAgB,CAAC,EAAO,EAClD,WAAW,GAAE,MAAM,EAAoB;IAMnC,cAAc,CAClB,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAyEhE,eAAe,CACb,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,MAAM,GACb;QAAE,KAAK,EAAE,MAAM,EAAE,CAAC;QAAC,UAAU,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,MAAM,CAAA;KAAE;IA6D7D,OAAO,CAAC,iBAAiB;YA8EX,uBAAuB;YAyBvB,kBAAkB;IAgJ1B,uBAAuB,CAC3B,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO,CAAC;QAAE,KAAK,EAAE,gBAAgB,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;IAyBhE,2BAA2B,CACzB,KAAK,EAAE,MAAM,EAAE,EACf,UAAU,EAAE,MAAM,EAClB,SAAS,EAAE,MAAM,GAChB,OAAO;CAWX"}
1
+ {"version":3,"file":"autocomplete.d.ts","sourceRoot":"","sources":["../../source/tui/autocomplete.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AACxE,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAEL,KAAK,YAAY,EAClB,MAAM,oCAAoC,CAAC;AAI5C,OAAO,EAAE,kBAAkB,EAAE,MAAM,uCAAuC,CAAC;AAC3E,YAAY,EACV,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC;AACvE,YAAY,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,eAAe,EAAE,MAAM,oCAAoC,CAAC;AACrE,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EACL,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,GACxB,MAAM,yBAAyB,CAAC;AAGjC,wBAAgB,qBAAqB,CACnC,CAAC,SAAS,YAAY,GAAG,gBAAgB,EACzC,QAAQ,GAAE,CAAC,EAAO,EAAE,WAAW,GAAE,MAAM,EAAoB,oBAO5D"}