local-cli-agent 5.0.4

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 (776) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +306 -0
  3. package/dist/agents/base/base-agent.d.ts +38 -0
  4. package/dist/agents/base/base-agent.d.ts.map +1 -0
  5. package/dist/agents/base/base-agent.js +69 -0
  6. package/dist/agents/base/base-agent.js.map +1 -0
  7. package/dist/agents/browser/browser-profile-manager.d.ts +16 -0
  8. package/dist/agents/browser/browser-profile-manager.d.ts.map +1 -0
  9. package/dist/agents/browser/browser-profile-manager.js +149 -0
  10. package/dist/agents/browser/browser-profile-manager.js.map +1 -0
  11. package/dist/agents/browser/browser-sub-agent.d.ts +22 -0
  12. package/dist/agents/browser/browser-sub-agent.d.ts.map +1 -0
  13. package/dist/agents/browser/browser-sub-agent.js +162 -0
  14. package/dist/agents/browser/browser-sub-agent.js.map +1 -0
  15. package/dist/agents/browser/confluence-agent.d.ts +3 -0
  16. package/dist/agents/browser/confluence-agent.d.ts.map +1 -0
  17. package/dist/agents/browser/confluence-agent.js +35 -0
  18. package/dist/agents/browser/confluence-agent.js.map +1 -0
  19. package/dist/agents/browser/index.d.ts +4 -0
  20. package/dist/agents/browser/index.d.ts.map +1 -0
  21. package/dist/agents/browser/index.js +4 -0
  22. package/dist/agents/browser/index.js.map +1 -0
  23. package/dist/agents/browser/jira-agent.d.ts +3 -0
  24. package/dist/agents/browser/jira-agent.d.ts.map +1 -0
  25. package/dist/agents/browser/jira-agent.js +35 -0
  26. package/dist/agents/browser/jira-agent.js.map +1 -0
  27. package/dist/agents/browser/prompts.d.ts +4 -0
  28. package/dist/agents/browser/prompts.d.ts.map +1 -0
  29. package/dist/agents/browser/prompts.js +241 -0
  30. package/dist/agents/browser/prompts.js.map +1 -0
  31. package/dist/agents/browser/search-agent.d.ts +3 -0
  32. package/dist/agents/browser/search-agent.d.ts.map +1 -0
  33. package/dist/agents/browser/search-agent.js +31 -0
  34. package/dist/agents/browser/search-agent.js.map +1 -0
  35. package/dist/agents/common/complete-tool.d.ts +3 -0
  36. package/dist/agents/common/complete-tool.d.ts.map +1 -0
  37. package/dist/agents/common/complete-tool.js +18 -0
  38. package/dist/agents/common/complete-tool.js.map +1 -0
  39. package/dist/agents/common/index.d.ts +3 -0
  40. package/dist/agents/common/index.d.ts.map +1 -0
  41. package/dist/agents/common/index.js +3 -0
  42. package/dist/agents/common/index.js.map +1 -0
  43. package/dist/agents/common/sub-agent.d.ts +40 -0
  44. package/dist/agents/common/sub-agent.d.ts.map +1 -0
  45. package/dist/agents/common/sub-agent.js +313 -0
  46. package/dist/agents/common/sub-agent.js.map +1 -0
  47. package/dist/agents/index.d.ts +5 -0
  48. package/dist/agents/index.d.ts.map +1 -0
  49. package/dist/agents/index.js +5 -0
  50. package/dist/agents/index.js.map +1 -0
  51. package/dist/agents/office/complete-tool.d.ts +3 -0
  52. package/dist/agents/office/complete-tool.d.ts.map +1 -0
  53. package/dist/agents/office/complete-tool.js +18 -0
  54. package/dist/agents/office/complete-tool.js.map +1 -0
  55. package/dist/agents/office/excel-agent.d.ts +3 -0
  56. package/dist/agents/office/excel-agent.d.ts.map +1 -0
  57. package/dist/agents/office/excel-agent.js +31 -0
  58. package/dist/agents/office/excel-agent.js.map +1 -0
  59. package/dist/agents/office/excel-create-agent.d.ts +3 -0
  60. package/dist/agents/office/excel-create-agent.d.ts.map +1 -0
  61. package/dist/agents/office/excel-create-agent.js +58 -0
  62. package/dist/agents/office/excel-create-agent.js.map +1 -0
  63. package/dist/agents/office/excel-create-prompts.d.ts +4 -0
  64. package/dist/agents/office/excel-create-prompts.d.ts.map +1 -0
  65. package/dist/agents/office/excel-create-prompts.js +217 -0
  66. package/dist/agents/office/excel-create-prompts.js.map +1 -0
  67. package/dist/agents/office/index.d.ts +10 -0
  68. package/dist/agents/office/index.d.ts.map +1 -0
  69. package/dist/agents/office/index.js +10 -0
  70. package/dist/agents/office/index.js.map +1 -0
  71. package/dist/agents/office/office-sub-agent.d.ts +21 -0
  72. package/dist/agents/office/office-sub-agent.d.ts.map +1 -0
  73. package/dist/agents/office/office-sub-agent.js +127 -0
  74. package/dist/agents/office/office-sub-agent.js.map +1 -0
  75. package/dist/agents/office/powerpoint-agent.d.ts +3 -0
  76. package/dist/agents/office/powerpoint-agent.d.ts.map +1 -0
  77. package/dist/agents/office/powerpoint-agent.js +37 -0
  78. package/dist/agents/office/powerpoint-agent.js.map +1 -0
  79. package/dist/agents/office/powerpoint-create-agent.d.ts +3 -0
  80. package/dist/agents/office/powerpoint-create-agent.d.ts.map +1 -0
  81. package/dist/agents/office/powerpoint-create-agent.js +1124 -0
  82. package/dist/agents/office/powerpoint-create-agent.js.map +1 -0
  83. package/dist/agents/office/powerpoint-create-prompts.d.ts +116 -0
  84. package/dist/agents/office/powerpoint-create-prompts.d.ts.map +1 -0
  85. package/dist/agents/office/powerpoint-create-prompts.js +1354 -0
  86. package/dist/agents/office/powerpoint-create-prompts.js.map +1 -0
  87. package/dist/agents/office/prompts.d.ts +11 -0
  88. package/dist/agents/office/prompts.d.ts.map +1 -0
  89. package/dist/agents/office/prompts.js +852 -0
  90. package/dist/agents/office/prompts.js.map +1 -0
  91. package/dist/agents/office/word-agent.d.ts +3 -0
  92. package/dist/agents/office/word-agent.d.ts.map +1 -0
  93. package/dist/agents/office/word-agent.js +31 -0
  94. package/dist/agents/office/word-agent.js.map +1 -0
  95. package/dist/agents/office/word-create-agent.d.ts +3 -0
  96. package/dist/agents/office/word-create-agent.d.ts.map +1 -0
  97. package/dist/agents/office/word-create-agent.js +36 -0
  98. package/dist/agents/office/word-create-agent.js.map +1 -0
  99. package/dist/agents/office/word-create-prompts.d.ts +4 -0
  100. package/dist/agents/office/word-create-prompts.d.ts.map +1 -0
  101. package/dist/agents/office/word-create-prompts.js +288 -0
  102. package/dist/agents/office/word-create-prompts.js.map +1 -0
  103. package/dist/agents/planner/index.d.ts +14 -0
  104. package/dist/agents/planner/index.d.ts.map +1 -0
  105. package/dist/agents/planner/index.js +334 -0
  106. package/dist/agents/planner/index.js.map +1 -0
  107. package/dist/cli.d.ts +3 -0
  108. package/dist/cli.d.ts.map +1 -0
  109. package/dist/cli.js +166 -0
  110. package/dist/cli.js.map +1 -0
  111. package/dist/commands/chat-command.d.ts +2 -0
  112. package/dist/commands/chat-command.d.ts.map +1 -0
  113. package/dist/commands/chat-command.js +90 -0
  114. package/dist/commands/chat-command.js.map +1 -0
  115. package/dist/commands/electron-client.d.ts +17 -0
  116. package/dist/commands/electron-client.d.ts.map +1 -0
  117. package/dist/commands/electron-client.js +180 -0
  118. package/dist/commands/electron-client.js.map +1 -0
  119. package/dist/commands/jarvis-command.d.ts +2 -0
  120. package/dist/commands/jarvis-command.d.ts.map +1 -0
  121. package/dist/commands/jarvis-command.js +66 -0
  122. package/dist/commands/jarvis-command.js.map +1 -0
  123. package/dist/constants.d.ts +11 -0
  124. package/dist/constants.d.ts.map +1 -0
  125. package/dist/constants.js +13 -0
  126. package/dist/constants.js.map +1 -0
  127. package/dist/core/compact/compact-manager.d.ts +22 -0
  128. package/dist/core/compact/compact-manager.d.ts.map +1 -0
  129. package/dist/core/compact/compact-manager.js +77 -0
  130. package/dist/core/compact/compact-manager.js.map +1 -0
  131. package/dist/core/compact/compact-prompts.d.ts +11 -0
  132. package/dist/core/compact/compact-prompts.d.ts.map +1 -0
  133. package/dist/core/compact/compact-prompts.js +90 -0
  134. package/dist/core/compact/compact-prompts.js.map +1 -0
  135. package/dist/core/compact/context-tracker.d.ts +28 -0
  136. package/dist/core/compact/context-tracker.d.ts.map +1 -0
  137. package/dist/core/compact/context-tracker.js +71 -0
  138. package/dist/core/compact/context-tracker.js.map +1 -0
  139. package/dist/core/compact/index.d.ts +4 -0
  140. package/dist/core/compact/index.d.ts.map +1 -0
  141. package/dist/core/compact/index.js +4 -0
  142. package/dist/core/compact/index.js.map +1 -0
  143. package/dist/core/config/config-manager.d.ts +43 -0
  144. package/dist/core/config/config-manager.d.ts.map +1 -0
  145. package/dist/core/config/config-manager.js +254 -0
  146. package/dist/core/config/config-manager.js.map +1 -0
  147. package/dist/core/config/index.d.ts +2 -0
  148. package/dist/core/config/index.d.ts.map +1 -0
  149. package/dist/core/config/index.js +2 -0
  150. package/dist/core/config/index.js.map +1 -0
  151. package/dist/core/docs-manager.d.ts +46 -0
  152. package/dist/core/docs-manager.d.ts.map +1 -0
  153. package/dist/core/docs-manager.js +475 -0
  154. package/dist/core/docs-manager.js.map +1 -0
  155. package/dist/core/git-auto-updater.d.ts +58 -0
  156. package/dist/core/git-auto-updater.d.ts.map +1 -0
  157. package/dist/core/git-auto-updater.js +374 -0
  158. package/dist/core/git-auto-updater.js.map +1 -0
  159. package/dist/core/llm/index.d.ts +2 -0
  160. package/dist/core/llm/index.d.ts.map +1 -0
  161. package/dist/core/llm/index.js +2 -0
  162. package/dist/core/llm/index.js.map +1 -0
  163. package/dist/core/llm/llm-client.d.ts +110 -0
  164. package/dist/core/llm/llm-client.d.ts.map +1 -0
  165. package/dist/core/llm/llm-client.js +1272 -0
  166. package/dist/core/llm/llm-client.js.map +1 -0
  167. package/dist/core/session/index.d.ts +2 -0
  168. package/dist/core/session/index.d.ts.map +1 -0
  169. package/dist/core/session/index.js +2 -0
  170. package/dist/core/session/index.js.map +1 -0
  171. package/dist/core/session/session-manager.d.ts +73 -0
  172. package/dist/core/session/session-manager.d.ts.map +1 -0
  173. package/dist/core/session/session-manager.js +260 -0
  174. package/dist/core/session/session-manager.js.map +1 -0
  175. package/dist/core/slash-command-handler.d.ts +31 -0
  176. package/dist/core/slash-command-handler.d.ts.map +1 -0
  177. package/dist/core/slash-command-handler.js +304 -0
  178. package/dist/core/slash-command-handler.js.map +1 -0
  179. package/dist/core/telemetry/error-reporter.d.ts +2 -0
  180. package/dist/core/telemetry/error-reporter.d.ts.map +1 -0
  181. package/dist/core/telemetry/error-reporter.js +3 -0
  182. package/dist/core/telemetry/error-reporter.js.map +1 -0
  183. package/dist/core/usage-tracker.d.ts +70 -0
  184. package/dist/core/usage-tracker.d.ts.map +1 -0
  185. package/dist/core/usage-tracker.js +251 -0
  186. package/dist/core/usage-tracker.js.map +1 -0
  187. package/dist/errors/base.d.ts +22 -0
  188. package/dist/errors/base.d.ts.map +1 -0
  189. package/dist/errors/base.js +43 -0
  190. package/dist/errors/base.js.map +1 -0
  191. package/dist/errors/file.d.ts +31 -0
  192. package/dist/errors/file.d.ts.map +1 -0
  193. package/dist/errors/file.js +110 -0
  194. package/dist/errors/file.js.map +1 -0
  195. package/dist/errors/index.d.ts +10 -0
  196. package/dist/errors/index.d.ts.map +1 -0
  197. package/dist/errors/index.js +41 -0
  198. package/dist/errors/index.js.map +1 -0
  199. package/dist/errors/llm.d.ts +30 -0
  200. package/dist/errors/llm.d.ts.map +1 -0
  201. package/dist/errors/llm.js +97 -0
  202. package/dist/errors/llm.js.map +1 -0
  203. package/dist/errors/network.d.ts +19 -0
  204. package/dist/errors/network.d.ts.map +1 -0
  205. package/dist/errors/network.js +82 -0
  206. package/dist/errors/network.js.map +1 -0
  207. package/dist/errors/validation.d.ts +19 -0
  208. package/dist/errors/validation.d.ts.map +1 -0
  209. package/dist/errors/validation.js +62 -0
  210. package/dist/errors/validation.js.map +1 -0
  211. package/dist/eval/eval-runner.d.ts +24 -0
  212. package/dist/eval/eval-runner.d.ts.map +1 -0
  213. package/dist/eval/eval-runner.js +291 -0
  214. package/dist/eval/eval-runner.js.map +1 -0
  215. package/dist/eval/index.d.ts +3 -0
  216. package/dist/eval/index.d.ts.map +1 -0
  217. package/dist/eval/index.js +3 -0
  218. package/dist/eval/index.js.map +1 -0
  219. package/dist/eval/types.d.ts +77 -0
  220. package/dist/eval/types.d.ts.map +1 -0
  221. package/dist/eval/types.js +2 -0
  222. package/dist/eval/types.js.map +1 -0
  223. package/dist/index.d.ts +4 -0
  224. package/dist/index.d.ts.map +1 -0
  225. package/dist/index.js +6 -0
  226. package/dist/index.js.map +1 -0
  227. package/dist/orchestration/index.d.ts +4 -0
  228. package/dist/orchestration/index.d.ts.map +1 -0
  229. package/dist/orchestration/index.js +3 -0
  230. package/dist/orchestration/index.js.map +1 -0
  231. package/dist/orchestration/plan-executor.d.ts +27 -0
  232. package/dist/orchestration/plan-executor.d.ts.map +1 -0
  233. package/dist/orchestration/plan-executor.js +536 -0
  234. package/dist/orchestration/plan-executor.js.map +1 -0
  235. package/dist/orchestration/types.d.ts +69 -0
  236. package/dist/orchestration/types.d.ts.map +1 -0
  237. package/dist/orchestration/types.js +2 -0
  238. package/dist/orchestration/types.js.map +1 -0
  239. package/dist/orchestration/utils.d.ts +14 -0
  240. package/dist/orchestration/utils.d.ts.map +1 -0
  241. package/dist/orchestration/utils.js +105 -0
  242. package/dist/orchestration/utils.js.map +1 -0
  243. package/dist/pipe/index.d.ts +2 -0
  244. package/dist/pipe/index.d.ts.map +1 -0
  245. package/dist/pipe/index.js +2 -0
  246. package/dist/pipe/index.js.map +1 -0
  247. package/dist/pipe/pipe-runner.d.ts +15 -0
  248. package/dist/pipe/pipe-runner.d.ts.map +1 -0
  249. package/dist/pipe/pipe-runner.js +207 -0
  250. package/dist/pipe/pipe-runner.js.map +1 -0
  251. package/dist/prompts/agents/planning.d.ts +4 -0
  252. package/dist/prompts/agents/planning.d.ts.map +1 -0
  253. package/dist/prompts/agents/planning.js +318 -0
  254. package/dist/prompts/agents/planning.js.map +1 -0
  255. package/dist/prompts/index.d.ts +8 -0
  256. package/dist/prompts/index.d.ts.map +1 -0
  257. package/dist/prompts/index.js +8 -0
  258. package/dist/prompts/index.js.map +1 -0
  259. package/dist/prompts/shared/codebase-rules.d.ts +4 -0
  260. package/dist/prompts/shared/codebase-rules.d.ts.map +1 -0
  261. package/dist/prompts/shared/codebase-rules.js +16 -0
  262. package/dist/prompts/shared/codebase-rules.js.map +1 -0
  263. package/dist/prompts/shared/git-rules.d.ts +2 -0
  264. package/dist/prompts/shared/git-rules.d.ts.map +1 -0
  265. package/dist/prompts/shared/git-rules.js +87 -0
  266. package/dist/prompts/shared/git-rules.js.map +1 -0
  267. package/dist/prompts/shared/language-rules.d.ts +4 -0
  268. package/dist/prompts/shared/language-rules.d.ts.map +1 -0
  269. package/dist/prompts/shared/language-rules.js +22 -0
  270. package/dist/prompts/shared/language-rules.js.map +1 -0
  271. package/dist/prompts/shared/tool-usage.d.ts +14 -0
  272. package/dist/prompts/shared/tool-usage.d.ts.map +1 -0
  273. package/dist/prompts/shared/tool-usage.js +92 -0
  274. package/dist/prompts/shared/tool-usage.js.map +1 -0
  275. package/dist/prompts/system/compact.d.ts +3 -0
  276. package/dist/prompts/system/compact.d.ts.map +1 -0
  277. package/dist/prompts/system/compact.js +73 -0
  278. package/dist/prompts/system/compact.js.map +1 -0
  279. package/dist/prompts/system/plan-execute.d.ts +6 -0
  280. package/dist/prompts/system/plan-execute.d.ts.map +1 -0
  281. package/dist/prompts/system/plan-execute.js +178 -0
  282. package/dist/prompts/system/plan-execute.js.map +1 -0
  283. package/dist/tools/browser/browser-client.d.ts +108 -0
  284. package/dist/tools/browser/browser-client.d.ts.map +1 -0
  285. package/dist/tools/browser/browser-client.js +965 -0
  286. package/dist/tools/browser/browser-client.js.map +1 -0
  287. package/dist/tools/browser/browser-tools.d.ts +18 -0
  288. package/dist/tools/browser/browser-tools.d.ts.map +1 -0
  289. package/dist/tools/browser/browser-tools.js +983 -0
  290. package/dist/tools/browser/browser-tools.js.map +1 -0
  291. package/dist/tools/browser/index.d.ts +7 -0
  292. package/dist/tools/browser/index.d.ts.map +1 -0
  293. package/dist/tools/browser/index.js +17 -0
  294. package/dist/tools/browser/index.js.map +1 -0
  295. package/dist/tools/index.d.ts +4 -0
  296. package/dist/tools/index.d.ts.map +1 -0
  297. package/dist/tools/index.js +4 -0
  298. package/dist/tools/index.js.map +1 -0
  299. package/dist/tools/llm/index.d.ts +2 -0
  300. package/dist/tools/llm/index.d.ts.map +1 -0
  301. package/dist/tools/llm/index.js +2 -0
  302. package/dist/tools/llm/index.js.map +1 -0
  303. package/dist/tools/llm/simple/ask-user-tool.d.ts +5 -0
  304. package/dist/tools/llm/simple/ask-user-tool.d.ts.map +1 -0
  305. package/dist/tools/llm/simple/ask-user-tool.js +7 -0
  306. package/dist/tools/llm/simple/ask-user-tool.js.map +1 -0
  307. package/dist/tools/llm/simple/background-bash-tool.d.ts +30 -0
  308. package/dist/tools/llm/simple/background-bash-tool.d.ts.map +1 -0
  309. package/dist/tools/llm/simple/background-bash-tool.js +320 -0
  310. package/dist/tools/llm/simple/background-bash-tool.js.map +1 -0
  311. package/dist/tools/llm/simple/background-powershell-tool.d.ts +30 -0
  312. package/dist/tools/llm/simple/background-powershell-tool.d.ts.map +1 -0
  313. package/dist/tools/llm/simple/background-powershell-tool.js +302 -0
  314. package/dist/tools/llm/simple/background-powershell-tool.js.map +1 -0
  315. package/dist/tools/llm/simple/bash-tool.d.ts +4 -0
  316. package/dist/tools/llm/simple/bash-tool.d.ts.map +1 -0
  317. package/dist/tools/llm/simple/bash-tool.js +167 -0
  318. package/dist/tools/llm/simple/bash-tool.js.map +1 -0
  319. package/dist/tools/llm/simple/file-tools.d.ts +13 -0
  320. package/dist/tools/llm/simple/file-tools.d.ts.map +1 -0
  321. package/dist/tools/llm/simple/file-tools.js +814 -0
  322. package/dist/tools/llm/simple/file-tools.js.map +1 -0
  323. package/dist/tools/llm/simple/final-response-tool.d.ts +12 -0
  324. package/dist/tools/llm/simple/final-response-tool.d.ts.map +1 -0
  325. package/dist/tools/llm/simple/final-response-tool.js +107 -0
  326. package/dist/tools/llm/simple/final-response-tool.js.map +1 -0
  327. package/dist/tools/llm/simple/index.d.ts +11 -0
  328. package/dist/tools/llm/simple/index.d.ts.map +1 -0
  329. package/dist/tools/llm/simple/index.js +20 -0
  330. package/dist/tools/llm/simple/index.js.map +1 -0
  331. package/dist/tools/llm/simple/planning-tools.d.ts +5 -0
  332. package/dist/tools/llm/simple/planning-tools.d.ts.map +1 -0
  333. package/dist/tools/llm/simple/planning-tools.js +121 -0
  334. package/dist/tools/llm/simple/planning-tools.js.map +1 -0
  335. package/dist/tools/llm/simple/powershell-tool.d.ts +4 -0
  336. package/dist/tools/llm/simple/powershell-tool.d.ts.map +1 -0
  337. package/dist/tools/llm/simple/powershell-tool.js +163 -0
  338. package/dist/tools/llm/simple/powershell-tool.js.map +1 -0
  339. package/dist/tools/llm/simple/read-image-tool.d.ts +8 -0
  340. package/dist/tools/llm/simple/read-image-tool.d.ts.map +1 -0
  341. package/dist/tools/llm/simple/read-image-tool.js +170 -0
  342. package/dist/tools/llm/simple/read-image-tool.js.map +1 -0
  343. package/dist/tools/llm/simple/simple-tool-executor.d.ts +40 -0
  344. package/dist/tools/llm/simple/simple-tool-executor.d.ts.map +1 -0
  345. package/dist/tools/llm/simple/simple-tool-executor.js +159 -0
  346. package/dist/tools/llm/simple/simple-tool-executor.js.map +1 -0
  347. package/dist/tools/llm/simple/todo-tools.d.ts +15 -0
  348. package/dist/tools/llm/simple/todo-tools.d.ts.map +1 -0
  349. package/dist/tools/llm/simple/todo-tools.js +145 -0
  350. package/dist/tools/llm/simple/todo-tools.js.map +1 -0
  351. package/dist/tools/llm/simple/user-interaction-tools.d.ts +22 -0
  352. package/dist/tools/llm/simple/user-interaction-tools.d.ts.map +1 -0
  353. package/dist/tools/llm/simple/user-interaction-tools.js +168 -0
  354. package/dist/tools/llm/simple/user-interaction-tools.js.map +1 -0
  355. package/dist/tools/office/common/constants.d.ts +192 -0
  356. package/dist/tools/office/common/constants.d.ts.map +1 -0
  357. package/dist/tools/office/common/constants.js +165 -0
  358. package/dist/tools/office/common/constants.js.map +1 -0
  359. package/dist/tools/office/common/index.d.ts +4 -0
  360. package/dist/tools/office/common/index.d.ts.map +1 -0
  361. package/dist/tools/office/common/index.js +3 -0
  362. package/dist/tools/office/common/index.js.map +1 -0
  363. package/dist/tools/office/common/types.d.ts +82 -0
  364. package/dist/tools/office/common/types.d.ts.map +1 -0
  365. package/dist/tools/office/common/types.js +2 -0
  366. package/dist/tools/office/common/types.js.map +1 -0
  367. package/dist/tools/office/common/utils.d.ts +16 -0
  368. package/dist/tools/office/common/utils.d.ts.map +1 -0
  369. package/dist/tools/office/common/utils.js +60 -0
  370. package/dist/tools/office/common/utils.js.map +1 -0
  371. package/dist/tools/office/excel-client.d.ts +219 -0
  372. package/dist/tools/office/excel-client.d.ts.map +1 -0
  373. package/dist/tools/office/excel-client.js +2346 -0
  374. package/dist/tools/office/excel-client.js.map +1 -0
  375. package/dist/tools/office/excel-tools/cells.d.ts +10 -0
  376. package/dist/tools/office/excel-tools/cells.d.ts.map +1 -0
  377. package/dist/tools/office/excel-tools/cells.js +283 -0
  378. package/dist/tools/office/excel-tools/cells.js.map +1 -0
  379. package/dist/tools/office/excel-tools/charts.d.ts +6 -0
  380. package/dist/tools/office/excel-tools/charts.d.ts.map +1 -0
  381. package/dist/tools/office/excel-tools/charts.js +124 -0
  382. package/dist/tools/office/excel-tools/charts.js.map +1 -0
  383. package/dist/tools/office/excel-tools/comments.d.ts +6 -0
  384. package/dist/tools/office/excel-tools/comments.d.ts.map +1 -0
  385. package/dist/tools/office/excel-tools/comments.js +114 -0
  386. package/dist/tools/office/excel-tools/comments.js.map +1 -0
  387. package/dist/tools/office/excel-tools/data-ops.d.ts +10 -0
  388. package/dist/tools/office/excel-tools/data-ops.d.ts.map +1 -0
  389. package/dist/tools/office/excel-tools/data-ops.js +266 -0
  390. package/dist/tools/office/excel-tools/data-ops.js.map +1 -0
  391. package/dist/tools/office/excel-tools/export.d.ts +5 -0
  392. package/dist/tools/office/excel-tools/export.d.ts.map +1 -0
  393. package/dist/tools/office/excel-tools/export.js +75 -0
  394. package/dist/tools/office/excel-tools/export.js.map +1 -0
  395. package/dist/tools/office/excel-tools/formatting.d.ts +10 -0
  396. package/dist/tools/office/excel-tools/formatting.d.ts.map +1 -0
  397. package/dist/tools/office/excel-tools/formatting.js +276 -0
  398. package/dist/tools/office/excel-tools/formatting.js.map +1 -0
  399. package/dist/tools/office/excel-tools/index.d.ts +18 -0
  400. package/dist/tools/office/excel-tools/index.d.ts.map +1 -0
  401. package/dist/tools/office/excel-tools/index.js +54 -0
  402. package/dist/tools/office/excel-tools/index.js.map +1 -0
  403. package/dist/tools/office/excel-tools/launch.d.ts +10 -0
  404. package/dist/tools/office/excel-tools/launch.d.ts.map +1 -0
  405. package/dist/tools/office/excel-tools/launch.js +250 -0
  406. package/dist/tools/office/excel-tools/launch.js.map +1 -0
  407. package/dist/tools/office/excel-tools/media.d.ts +5 -0
  408. package/dist/tools/office/excel-tools/media.d.ts.map +1 -0
  409. package/dist/tools/office/excel-tools/media.js +84 -0
  410. package/dist/tools/office/excel-tools/media.js.map +1 -0
  411. package/dist/tools/office/excel-tools/named-ranges.d.ts +6 -0
  412. package/dist/tools/office/excel-tools/named-ranges.d.ts.map +1 -0
  413. package/dist/tools/office/excel-tools/named-ranges.js +113 -0
  414. package/dist/tools/office/excel-tools/named-ranges.js.map +1 -0
  415. package/dist/tools/office/excel-tools/protection.d.ts +5 -0
  416. package/dist/tools/office/excel-tools/protection.d.ts.map +1 -0
  417. package/dist/tools/office/excel-tools/protection.js +75 -0
  418. package/dist/tools/office/excel-tools/protection.js.map +1 -0
  419. package/dist/tools/office/excel-tools/rows-columns.d.ts +11 -0
  420. package/dist/tools/office/excel-tools/rows-columns.d.ts.map +1 -0
  421. package/dist/tools/office/excel-tools/rows-columns.js +293 -0
  422. package/dist/tools/office/excel-tools/rows-columns.js.map +1 -0
  423. package/dist/tools/office/excel-tools/sheet-builders.d.ts +9 -0
  424. package/dist/tools/office/excel-tools/sheet-builders.d.ts.map +1 -0
  425. package/dist/tools/office/excel-tools/sheet-builders.js +483 -0
  426. package/dist/tools/office/excel-tools/sheet-builders.js.map +1 -0
  427. package/dist/tools/office/excel-tools/sheets.d.ts +8 -0
  428. package/dist/tools/office/excel-tools/sheets.d.ts.map +1 -0
  429. package/dist/tools/office/excel-tools/sheets.js +182 -0
  430. package/dist/tools/office/excel-tools/sheets.js.map +1 -0
  431. package/dist/tools/office/excel-tools/validation.d.ts +7 -0
  432. package/dist/tools/office/excel-tools/validation.d.ts.map +1 -0
  433. package/dist/tools/office/excel-tools/validation.js +175 -0
  434. package/dist/tools/office/excel-tools/validation.js.map +1 -0
  435. package/dist/tools/office/excel-tools.d.ts +3 -0
  436. package/dist/tools/office/excel-tools.d.ts.map +1 -0
  437. package/dist/tools/office/excel-tools.js +3 -0
  438. package/dist/tools/office/excel-tools.js.map +1 -0
  439. package/dist/tools/office/index.d.ts +6 -0
  440. package/dist/tools/office/index.d.ts.map +1 -0
  441. package/dist/tools/office/index.js +9 -0
  442. package/dist/tools/office/index.js.map +1 -0
  443. package/dist/tools/office/office-client-base.d.ts +33 -0
  444. package/dist/tools/office/office-client-base.d.ts.map +1 -0
  445. package/dist/tools/office/office-client-base.js +166 -0
  446. package/dist/tools/office/office-client-base.js.map +1 -0
  447. package/dist/tools/office/office-client.d.ts +196 -0
  448. package/dist/tools/office/office-client.d.ts.map +1 -0
  449. package/dist/tools/office/office-client.js +200 -0
  450. package/dist/tools/office/office-client.js.map +1 -0
  451. package/dist/tools/office/powerpoint-client.d.ts +148 -0
  452. package/dist/tools/office/powerpoint-client.d.ts.map +1 -0
  453. package/dist/tools/office/powerpoint-client.js +1310 -0
  454. package/dist/tools/office/powerpoint-client.js.map +1 -0
  455. package/dist/tools/office/powerpoint-tools/effects.d.ts +9 -0
  456. package/dist/tools/office/powerpoint-tools/effects.d.ts.map +1 -0
  457. package/dist/tools/office/powerpoint-tools/effects.js +246 -0
  458. package/dist/tools/office/powerpoint-tools/effects.js.map +1 -0
  459. package/dist/tools/office/powerpoint-tools/export.d.ts +6 -0
  460. package/dist/tools/office/powerpoint-tools/export.d.ts.map +1 -0
  461. package/dist/tools/office/powerpoint-tools/export.js +123 -0
  462. package/dist/tools/office/powerpoint-tools/export.js.map +1 -0
  463. package/dist/tools/office/powerpoint-tools/index.d.ts +15 -0
  464. package/dist/tools/office/powerpoint-tools/index.d.ts.map +1 -0
  465. package/dist/tools/office/powerpoint-tools/index.js +40 -0
  466. package/dist/tools/office/powerpoint-tools/index.js.map +1 -0
  467. package/dist/tools/office/powerpoint-tools/launch.d.ts +9 -0
  468. package/dist/tools/office/powerpoint-tools/launch.d.ts.map +1 -0
  469. package/dist/tools/office/powerpoint-tools/launch.js +218 -0
  470. package/dist/tools/office/powerpoint-tools/launch.js.map +1 -0
  471. package/dist/tools/office/powerpoint-tools/layout-builders.d.ts +12 -0
  472. package/dist/tools/office/powerpoint-tools/layout-builders.d.ts.map +1 -0
  473. package/dist/tools/office/powerpoint-tools/layout-builders.js +785 -0
  474. package/dist/tools/office/powerpoint-tools/layout-builders.js.map +1 -0
  475. package/dist/tools/office/powerpoint-tools/media.d.ts +8 -0
  476. package/dist/tools/office/powerpoint-tools/media.d.ts.map +1 -0
  477. package/dist/tools/office/powerpoint-tools/media.js +211 -0
  478. package/dist/tools/office/powerpoint-tools/media.js.map +1 -0
  479. package/dist/tools/office/powerpoint-tools/notes.d.ts +8 -0
  480. package/dist/tools/office/powerpoint-tools/notes.d.ts.map +1 -0
  481. package/dist/tools/office/powerpoint-tools/notes.js +171 -0
  482. package/dist/tools/office/powerpoint-tools/notes.js.map +1 -0
  483. package/dist/tools/office/powerpoint-tools/sections.d.ts +6 -0
  484. package/dist/tools/office/powerpoint-tools/sections.d.ts.map +1 -0
  485. package/dist/tools/office/powerpoint-tools/sections.js +104 -0
  486. package/dist/tools/office/powerpoint-tools/sections.js.map +1 -0
  487. package/dist/tools/office/powerpoint-tools/shapes.d.ts +22 -0
  488. package/dist/tools/office/powerpoint-tools/shapes.d.ts.map +1 -0
  489. package/dist/tools/office/powerpoint-tools/shapes.js +681 -0
  490. package/dist/tools/office/powerpoint-tools/shapes.js.map +1 -0
  491. package/dist/tools/office/powerpoint-tools/slides.d.ts +11 -0
  492. package/dist/tools/office/powerpoint-tools/slides.d.ts.map +1 -0
  493. package/dist/tools/office/powerpoint-tools/slides.js +283 -0
  494. package/dist/tools/office/powerpoint-tools/slides.js.map +1 -0
  495. package/dist/tools/office/powerpoint-tools/tables.d.ts +6 -0
  496. package/dist/tools/office/powerpoint-tools/tables.d.ts.map +1 -0
  497. package/dist/tools/office/powerpoint-tools/tables.js +132 -0
  498. package/dist/tools/office/powerpoint-tools/tables.js.map +1 -0
  499. package/dist/tools/office/powerpoint-tools/text.d.ts +12 -0
  500. package/dist/tools/office/powerpoint-tools/text.d.ts.map +1 -0
  501. package/dist/tools/office/powerpoint-tools/text.js +379 -0
  502. package/dist/tools/office/powerpoint-tools/text.js.map +1 -0
  503. package/dist/tools/office/powerpoint-tools.d.ts +3 -0
  504. package/dist/tools/office/powerpoint-tools.d.ts.map +1 -0
  505. package/dist/tools/office/powerpoint-tools.js +3 -0
  506. package/dist/tools/office/powerpoint-tools.js.map +1 -0
  507. package/dist/tools/office/word-client.d.ts +169 -0
  508. package/dist/tools/office/word-client.d.ts.map +1 -0
  509. package/dist/tools/office/word-client.js +1636 -0
  510. package/dist/tools/office/word-client.js.map +1 -0
  511. package/dist/tools/office/word-tools/bookmarks.d.ts +7 -0
  512. package/dist/tools/office/word-tools/bookmarks.d.ts.map +1 -0
  513. package/dist/tools/office/word-tools/bookmarks.js +146 -0
  514. package/dist/tools/office/word-tools/bookmarks.js.map +1 -0
  515. package/dist/tools/office/word-tools/comments.d.ts +7 -0
  516. package/dist/tools/office/word-tools/comments.d.ts.map +1 -0
  517. package/dist/tools/office/word-tools/comments.js +146 -0
  518. package/dist/tools/office/word-tools/comments.js.map +1 -0
  519. package/dist/tools/office/word-tools/content.d.ts +7 -0
  520. package/dist/tools/office/word-tools/content.d.ts.map +1 -0
  521. package/dist/tools/office/word-tools/content.js +168 -0
  522. package/dist/tools/office/word-tools/content.js.map +1 -0
  523. package/dist/tools/office/word-tools/export.d.ts +5 -0
  524. package/dist/tools/office/word-tools/export.d.ts.map +1 -0
  525. package/dist/tools/office/word-tools/export.js +73 -0
  526. package/dist/tools/office/word-tools/export.js.map +1 -0
  527. package/dist/tools/office/word-tools/formatting.d.ts +6 -0
  528. package/dist/tools/office/word-tools/formatting.d.ts.map +1 -0
  529. package/dist/tools/office/word-tools/formatting.js +129 -0
  530. package/dist/tools/office/word-tools/formatting.js.map +1 -0
  531. package/dist/tools/office/word-tools/headers-footers.d.ts +6 -0
  532. package/dist/tools/office/word-tools/headers-footers.d.ts.map +1 -0
  533. package/dist/tools/office/word-tools/headers-footers.js +117 -0
  534. package/dist/tools/office/word-tools/headers-footers.js.map +1 -0
  535. package/dist/tools/office/word-tools/index.d.ts +19 -0
  536. package/dist/tools/office/word-tools/index.d.ts.map +1 -0
  537. package/dist/tools/office/word-tools/index.js +60 -0
  538. package/dist/tools/office/word-tools/index.js.map +1 -0
  539. package/dist/tools/office/word-tools/launch.d.ts +10 -0
  540. package/dist/tools/office/word-tools/launch.d.ts.map +1 -0
  541. package/dist/tools/office/word-tools/launch.js +257 -0
  542. package/dist/tools/office/word-tools/launch.js.map +1 -0
  543. package/dist/tools/office/word-tools/lists.d.ts +5 -0
  544. package/dist/tools/office/word-tools/lists.d.ts.map +1 -0
  545. package/dist/tools/office/word-tools/lists.js +73 -0
  546. package/dist/tools/office/word-tools/lists.js.map +1 -0
  547. package/dist/tools/office/word-tools/navigation.d.ts +5 -0
  548. package/dist/tools/office/word-tools/navigation.d.ts.map +1 -0
  549. package/dist/tools/office/word-tools/navigation.js +85 -0
  550. package/dist/tools/office/word-tools/navigation.js.map +1 -0
  551. package/dist/tools/office/word-tools/page-setup.d.ts +7 -0
  552. package/dist/tools/office/word-tools/page-setup.d.ts.map +1 -0
  553. package/dist/tools/office/word-tools/page-setup.js +152 -0
  554. package/dist/tools/office/word-tools/page-setup.js.map +1 -0
  555. package/dist/tools/office/word-tools/section-builders.d.ts +12 -0
  556. package/dist/tools/office/word-tools/section-builders.d.ts.map +1 -0
  557. package/dist/tools/office/word-tools/section-builders.js +601 -0
  558. package/dist/tools/office/word-tools/section-builders.js.map +1 -0
  559. package/dist/tools/office/word-tools/tables.d.ts +8 -0
  560. package/dist/tools/office/word-tools/tables.d.ts.map +1 -0
  561. package/dist/tools/office/word-tools/tables.js +197 -0
  562. package/dist/tools/office/word-tools/tables.js.map +1 -0
  563. package/dist/tools/office/word-tools/text.d.ts +9 -0
  564. package/dist/tools/office/word-tools/text.d.ts.map +1 -0
  565. package/dist/tools/office/word-tools/text.js +245 -0
  566. package/dist/tools/office/word-tools/text.js.map +1 -0
  567. package/dist/tools/office/word-tools/undo-redo.d.ts +5 -0
  568. package/dist/tools/office/word-tools/undo-redo.d.ts.map +1 -0
  569. package/dist/tools/office/word-tools/undo-redo.js +73 -0
  570. package/dist/tools/office/word-tools/undo-redo.js.map +1 -0
  571. package/dist/tools/office/word-tools/watermarks.d.ts +5 -0
  572. package/dist/tools/office/word-tools/watermarks.d.ts.map +1 -0
  573. package/dist/tools/office/word-tools/watermarks.js +81 -0
  574. package/dist/tools/office/word-tools/watermarks.js.map +1 -0
  575. package/dist/tools/office/word-tools.d.ts +3 -0
  576. package/dist/tools/office/word-tools.d.ts.map +1 -0
  577. package/dist/tools/office/word-tools.js +3 -0
  578. package/dist/tools/office/word-tools.js.map +1 -0
  579. package/dist/tools/registry.d.ts +55 -0
  580. package/dist/tools/registry.d.ts.map +1 -0
  581. package/dist/tools/registry.js +296 -0
  582. package/dist/tools/registry.js.map +1 -0
  583. package/dist/tools/types.d.ts +88 -0
  584. package/dist/tools/types.d.ts.map +1 -0
  585. package/dist/tools/types.js +19 -0
  586. package/dist/tools/types.js.map +1 -0
  587. package/dist/types/index.d.ts +132 -0
  588. package/dist/types/index.d.ts.map +1 -0
  589. package/dist/types/index.js +2 -0
  590. package/dist/types/index.js.map +1 -0
  591. package/dist/ui/PlanExecuteView.d.ts +11 -0
  592. package/dist/ui/PlanExecuteView.d.ts.map +1 -0
  593. package/dist/ui/PlanExecuteView.js +27 -0
  594. package/dist/ui/PlanExecuteView.js.map +1 -0
  595. package/dist/ui/TodoPanel.d.ts +13 -0
  596. package/dist/ui/TodoPanel.d.ts.map +1 -0
  597. package/dist/ui/TodoPanel.js +138 -0
  598. package/dist/ui/TodoPanel.js.map +1 -0
  599. package/dist/ui/UpdateNotification.d.ts +13 -0
  600. package/dist/ui/UpdateNotification.d.ts.map +1 -0
  601. package/dist/ui/UpdateNotification.js +42 -0
  602. package/dist/ui/UpdateNotification.js.map +1 -0
  603. package/dist/ui/components/ActivityIndicator.d.ts +25 -0
  604. package/dist/ui/components/ActivityIndicator.d.ts.map +1 -0
  605. package/dist/ui/components/ActivityIndicator.js +116 -0
  606. package/dist/ui/components/ActivityIndicator.js.map +1 -0
  607. package/dist/ui/components/CommandBrowser.d.ts +10 -0
  608. package/dist/ui/components/CommandBrowser.d.ts.map +1 -0
  609. package/dist/ui/components/CommandBrowser.js +57 -0
  610. package/dist/ui/components/CommandBrowser.js.map +1 -0
  611. package/dist/ui/components/CustomTextInput.d.ts +13 -0
  612. package/dist/ui/components/CustomTextInput.d.ts.map +1 -0
  613. package/dist/ui/components/CustomTextInput.js +246 -0
  614. package/dist/ui/components/CustomTextInput.js.map +1 -0
  615. package/dist/ui/components/FileBrowser.d.ts +11 -0
  616. package/dist/ui/components/FileBrowser.d.ts.map +1 -0
  617. package/dist/ui/components/FileBrowser.js +45 -0
  618. package/dist/ui/components/FileBrowser.js.map +1 -0
  619. package/dist/ui/components/LLMSetupWizard.d.ts +8 -0
  620. package/dist/ui/components/LLMSetupWizard.d.ts.map +1 -0
  621. package/dist/ui/components/LLMSetupWizard.js +197 -0
  622. package/dist/ui/components/LLMSetupWizard.js.map +1 -0
  623. package/dist/ui/components/Logo.d.ts +20 -0
  624. package/dist/ui/components/Logo.d.ts.map +1 -0
  625. package/dist/ui/components/Logo.js +100 -0
  626. package/dist/ui/components/Logo.js.map +1 -0
  627. package/dist/ui/components/MarkdownRenderer.d.ts +9 -0
  628. package/dist/ui/components/MarkdownRenderer.d.ts.map +1 -0
  629. package/dist/ui/components/MarkdownRenderer.js +198 -0
  630. package/dist/ui/components/MarkdownRenderer.js.map +1 -0
  631. package/dist/ui/components/ModelSelector.d.ts +8 -0
  632. package/dist/ui/components/ModelSelector.d.ts.map +1 -0
  633. package/dist/ui/components/ModelSelector.js +111 -0
  634. package/dist/ui/components/ModelSelector.js.map +1 -0
  635. package/dist/ui/components/PlanExecuteApp.d.ts +23 -0
  636. package/dist/ui/components/PlanExecuteApp.d.ts.map +1 -0
  637. package/dist/ui/components/PlanExecuteApp.js +1377 -0
  638. package/dist/ui/components/PlanExecuteApp.js.map +1 -0
  639. package/dist/ui/components/ProgressBar.d.ts +10 -0
  640. package/dist/ui/components/ProgressBar.d.ts.map +1 -0
  641. package/dist/ui/components/ProgressBar.js +26 -0
  642. package/dist/ui/components/ProgressBar.js.map +1 -0
  643. package/dist/ui/components/StatusBar.d.ts +23 -0
  644. package/dist/ui/components/StatusBar.d.ts.map +1 -0
  645. package/dist/ui/components/StatusBar.js +162 -0
  646. package/dist/ui/components/StatusBar.js.map +1 -0
  647. package/dist/ui/components/ThinkingIndicator.d.ts +14 -0
  648. package/dist/ui/components/ThinkingIndicator.d.ts.map +1 -0
  649. package/dist/ui/components/ThinkingIndicator.js +63 -0
  650. package/dist/ui/components/ThinkingIndicator.js.map +1 -0
  651. package/dist/ui/components/TodoListView.d.ts +11 -0
  652. package/dist/ui/components/TodoListView.d.ts.map +1 -0
  653. package/dist/ui/components/TodoListView.js +69 -0
  654. package/dist/ui/components/TodoListView.js.map +1 -0
  655. package/dist/ui/components/ToolSelector.d.ts +7 -0
  656. package/dist/ui/components/ToolSelector.d.ts.map +1 -0
  657. package/dist/ui/components/ToolSelector.js +112 -0
  658. package/dist/ui/components/ToolSelector.js.map +1 -0
  659. package/dist/ui/components/dialogs/ApprovalDialog.d.ts +13 -0
  660. package/dist/ui/components/dialogs/ApprovalDialog.d.ts.map +1 -0
  661. package/dist/ui/components/dialogs/ApprovalDialog.js +175 -0
  662. package/dist/ui/components/dialogs/ApprovalDialog.js.map +1 -0
  663. package/dist/ui/components/dialogs/AskUserDialog.d.ts +9 -0
  664. package/dist/ui/components/dialogs/AskUserDialog.d.ts.map +1 -0
  665. package/dist/ui/components/dialogs/AskUserDialog.js +111 -0
  666. package/dist/ui/components/dialogs/AskUserDialog.js.map +1 -0
  667. package/dist/ui/components/dialogs/DocsBrowser.d.ts +8 -0
  668. package/dist/ui/components/dialogs/DocsBrowser.d.ts.map +1 -0
  669. package/dist/ui/components/dialogs/DocsBrowser.js +127 -0
  670. package/dist/ui/components/dialogs/DocsBrowser.js.map +1 -0
  671. package/dist/ui/components/dialogs/SettingsDialog.d.ts +10 -0
  672. package/dist/ui/components/dialogs/SettingsDialog.d.ts.map +1 -0
  673. package/dist/ui/components/dialogs/SettingsDialog.js +586 -0
  674. package/dist/ui/components/dialogs/SettingsDialog.js.map +1 -0
  675. package/dist/ui/components/dialogs/index.d.ts +3 -0
  676. package/dist/ui/components/dialogs/index.d.ts.map +1 -0
  677. package/dist/ui/components/dialogs/index.js +3 -0
  678. package/dist/ui/components/dialogs/index.js.map +1 -0
  679. package/dist/ui/components/index.d.ts +12 -0
  680. package/dist/ui/components/index.d.ts.map +1 -0
  681. package/dist/ui/components/index.js +9 -0
  682. package/dist/ui/components/index.js.map +1 -0
  683. package/dist/ui/components/panels/LogPanel.d.ts +7 -0
  684. package/dist/ui/components/panels/LogPanel.d.ts.map +1 -0
  685. package/dist/ui/components/panels/LogPanel.js +280 -0
  686. package/dist/ui/components/panels/LogPanel.js.map +1 -0
  687. package/dist/ui/components/panels/SessionPanel.d.ts +8 -0
  688. package/dist/ui/components/panels/SessionPanel.d.ts.map +1 -0
  689. package/dist/ui/components/panels/SessionPanel.js +81 -0
  690. package/dist/ui/components/panels/SessionPanel.js.map +1 -0
  691. package/dist/ui/components/panels/index.d.ts +4 -0
  692. package/dist/ui/components/panels/index.d.ts.map +1 -0
  693. package/dist/ui/components/panels/index.js +4 -0
  694. package/dist/ui/components/panels/index.js.map +1 -0
  695. package/dist/ui/components/views/ChatView.d.ts +12 -0
  696. package/dist/ui/components/views/ChatView.d.ts.map +1 -0
  697. package/dist/ui/components/views/ChatView.js +289 -0
  698. package/dist/ui/components/views/ChatView.js.map +1 -0
  699. package/dist/ui/components/views/index.d.ts +2 -0
  700. package/dist/ui/components/views/index.d.ts.map +1 -0
  701. package/dist/ui/components/views/index.js +2 -0
  702. package/dist/ui/components/views/index.js.map +1 -0
  703. package/dist/ui/contexts/TokenContext.d.ts +29 -0
  704. package/dist/ui/contexts/TokenContext.d.ts.map +1 -0
  705. package/dist/ui/contexts/TokenContext.js +79 -0
  706. package/dist/ui/contexts/TokenContext.js.map +1 -0
  707. package/dist/ui/hooks/atFileProcessor.d.ts +15 -0
  708. package/dist/ui/hooks/atFileProcessor.d.ts.map +1 -0
  709. package/dist/ui/hooks/atFileProcessor.js +88 -0
  710. package/dist/ui/hooks/atFileProcessor.js.map +1 -0
  711. package/dist/ui/hooks/index.d.ts +9 -0
  712. package/dist/ui/hooks/index.d.ts.map +1 -0
  713. package/dist/ui/hooks/index.js +9 -0
  714. package/dist/ui/hooks/index.js.map +1 -0
  715. package/dist/ui/hooks/slashCommandProcessor.d.ts +21 -0
  716. package/dist/ui/hooks/slashCommandProcessor.d.ts.map +1 -0
  717. package/dist/ui/hooks/slashCommandProcessor.js +96 -0
  718. package/dist/ui/hooks/slashCommandProcessor.js.map +1 -0
  719. package/dist/ui/hooks/useCommandBrowserState.d.ts +12 -0
  720. package/dist/ui/hooks/useCommandBrowserState.d.ts.map +1 -0
  721. package/dist/ui/hooks/useCommandBrowserState.js +66 -0
  722. package/dist/ui/hooks/useCommandBrowserState.js.map +1 -0
  723. package/dist/ui/hooks/useFileBrowserState.d.ts +15 -0
  724. package/dist/ui/hooks/useFileBrowserState.d.ts.map +1 -0
  725. package/dist/ui/hooks/useFileBrowserState.js +80 -0
  726. package/dist/ui/hooks/useFileBrowserState.js.map +1 -0
  727. package/dist/ui/hooks/useFileList.d.ts +20 -0
  728. package/dist/ui/hooks/useFileList.d.ts.map +1 -0
  729. package/dist/ui/hooks/useFileList.js +57 -0
  730. package/dist/ui/hooks/useFileList.js.map +1 -0
  731. package/dist/ui/hooks/useInputHistory.d.ts +9 -0
  732. package/dist/ui/hooks/useInputHistory.d.ts.map +1 -0
  733. package/dist/ui/hooks/useInputHistory.js +68 -0
  734. package/dist/ui/hooks/useInputHistory.js.map +1 -0
  735. package/dist/ui/hooks/usePlanExecution.d.ts +8 -0
  736. package/dist/ui/hooks/usePlanExecution.d.ts.map +1 -0
  737. package/dist/ui/hooks/usePlanExecution.js +218 -0
  738. package/dist/ui/hooks/usePlanExecution.js.map +1 -0
  739. package/dist/ui/hooks/useTerminalWidth.d.ts +4 -0
  740. package/dist/ui/hooks/useTerminalWidth.d.ts.map +1 -0
  741. package/dist/ui/hooks/useTerminalWidth.js +26 -0
  742. package/dist/ui/hooks/useTerminalWidth.js.map +1 -0
  743. package/dist/ui/index.d.ts +7 -0
  744. package/dist/ui/index.d.ts.map +1 -0
  745. package/dist/ui/index.js +7 -0
  746. package/dist/ui/index.js.map +1 -0
  747. package/dist/ui/ink-entry.d.ts +3 -0
  748. package/dist/ui/ink-entry.d.ts.map +1 -0
  749. package/dist/ui/ink-entry.js +22 -0
  750. package/dist/ui/ink-entry.js.map +1 -0
  751. package/dist/utils/file-system.d.ts +9 -0
  752. package/dist/utils/file-system.d.ts.map +1 -0
  753. package/dist/utils/file-system.js +99 -0
  754. package/dist/utils/file-system.js.map +1 -0
  755. package/dist/utils/git-utils.d.ts +2 -0
  756. package/dist/utils/git-utils.d.ts.map +1 -0
  757. package/dist/utils/git-utils.js +16 -0
  758. package/dist/utils/git-utils.js.map +1 -0
  759. package/dist/utils/json-stream-logger.d.ts +74 -0
  760. package/dist/utils/json-stream-logger.d.ts.map +1 -0
  761. package/dist/utils/json-stream-logger.js +808 -0
  762. package/dist/utils/json-stream-logger.js.map +1 -0
  763. package/dist/utils/logger.d.ts +152 -0
  764. package/dist/utils/logger.d.ts.map +1 -0
  765. package/dist/utils/logger.js +1672 -0
  766. package/dist/utils/logger.js.map +1 -0
  767. package/dist/utils/platform-utils.d.ts +19 -0
  768. package/dist/utils/platform-utils.d.ts.map +1 -0
  769. package/dist/utils/platform-utils.js +134 -0
  770. package/dist/utils/platform-utils.js.map +1 -0
  771. package/dist/utils/wsl-utils.d.ts +4 -0
  772. package/dist/utils/wsl-utils.d.ts.map +1 -0
  773. package/dist/utils/wsl-utils.js +72 -0
  774. package/dist/utils/wsl-utils.js.map +1 -0
  775. package/package.json +132 -0
  776. package/scripts/patch-yoga.js +48 -0
@@ -0,0 +1,57 @@
1
+ import React from 'react';
2
+ import { Box, Text, useInput } from 'ink';
3
+ import SelectInput from 'ink-select-input';
4
+ import { filterCommands, } from '../hooks/slashCommandProcessor.js';
5
+ import { useTerminalWidth, clampText } from '../hooks/useTerminalWidth.js';
6
+ const MAX_VISIBLE_COMMANDS = 10;
7
+ export const CommandBrowser = ({ partialCommand, args: _args, onSelect, onCancel, }) => {
8
+ const termWidth = useTerminalWidth();
9
+ const commands = filterCommands(partialCommand, MAX_VISIBLE_COMMANDS);
10
+ const commandColWidth = Math.max(15, Math.min(25, Math.floor(termWidth * 0.3)));
11
+ const descMaxWidth = Math.max(10, termWidth - commandColWidth - 8);
12
+ const items = commands.map((cmd) => {
13
+ const aliasText = cmd.aliases && cmd.aliases.length > 0
14
+ ? ` (${cmd.aliases.join(', ')})`
15
+ : '';
16
+ const commandPart = `${cmd.name}${aliasText}`;
17
+ const paddedCommand = commandPart.padEnd(commandColWidth);
18
+ const desc = clampText(cmd.description, descMaxWidth);
19
+ return {
20
+ label: `${paddedCommand} ${desc}`,
21
+ value: cmd.name,
22
+ };
23
+ });
24
+ useInput((_inputChar, key) => {
25
+ if (key.escape) {
26
+ onCancel();
27
+ return;
28
+ }
29
+ if (key.tab && items.length > 0) {
30
+ const firstCommand = items[0];
31
+ if (firstCommand) {
32
+ onSelect(firstCommand.value, false);
33
+ }
34
+ return;
35
+ }
36
+ });
37
+ const handleSelect = (item) => {
38
+ onSelect(item.value, true);
39
+ };
40
+ const currentCommand = commands.find((cmd) => cmd.name === `/${partialCommand}`);
41
+ const argsHint = currentCommand?.argsHint;
42
+ if (items.length === 0) {
43
+ return (React.createElement(Box, { borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column" },
44
+ React.createElement(Text, { color: "yellow" },
45
+ "No commands found matching: /",
46
+ partialCommand),
47
+ React.createElement(Text, { dimColor: true }, "Press ESC to cancel")));
48
+ }
49
+ return (React.createElement(Box, { flexDirection: "column" },
50
+ React.createElement(Box, { borderStyle: "single", borderColor: "cyan", paddingX: 1, flexDirection: "column" },
51
+ React.createElement(Box, null,
52
+ React.createElement(SelectInput, { items: items, onSelect: handleSelect, limit: MAX_VISIBLE_COMMANDS }))),
53
+ argsHint && (React.createElement(Box, { borderStyle: "single", borderColor: "yellow", paddingX: 1, marginTop: 1, flexDirection: "column" },
54
+ React.createElement(Text, { color: "yellow", bold: true }, "Expected Arguments:"),
55
+ React.createElement(Text, { color: "white" }, argsHint)))));
56
+ };
57
+ //# sourceMappingURL=CommandBrowser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CommandBrowser.js","sourceRoot":"","sources":["../../../src/ui/components/CommandBrowser.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,WAAW,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EACL,cAAc,GACf,MAAM,mCAAmC,CAAC;AAC3C,OAAO,EAAE,gBAAgB,EAAE,SAAS,EAAE,MAAM,8BAA8B,CAAC;AAc3E,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,MAAM,CAAC,MAAM,cAAc,GAAkC,CAAC,EAC5D,cAAc,EACd,IAAI,EAAE,KAAK,EACX,QAAQ,EACR,QAAQ,GACT,EAAE,EAAE;IACH,MAAM,SAAS,GAAG,gBAAgB,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,cAAc,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oBAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,gCAElB;YACP,oBAAC,IAAI,IAAC,KAAK,EAAC,OAAO,IAAE,QAAQ,CAAQ,CACjC,CACP,CACG,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,13 @@
1
+ import React from 'react';
2
+ interface CustomTextInputProps {
3
+ value: string;
4
+ onChange: (value: string) => void;
5
+ onSubmit?: (value: string) => void;
6
+ onHistoryPrev?: () => void;
7
+ onHistoryNext?: () => void;
8
+ placeholder?: string;
9
+ focus?: boolean;
10
+ }
11
+ export declare const CustomTextInput: React.FC<CustomTextInputProps>;
12
+ export default CustomTextInput;
13
+ //# sourceMappingURL=CustomTextInput.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomTextInput.d.ts","sourceRoot":"","sources":["../../../src/ui/components/CustomTextInput.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAsC,MAAM,OAAO,CAAC;AAM3D,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACnC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA4W1D,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,246 @@
1
+ import React, { useState, useEffect, useRef } from 'react';
2
+ import { Box, Text, useStdin } from 'ink';
3
+ const MULTILINE_COLLAPSE_THRESHOLD = 10;
4
+ export const CustomTextInput = ({ value, onChange, onSubmit, onHistoryPrev, onHistoryNext, placeholder = '', focus = true, }) => {
5
+ const { stdin, setRawMode } = useStdin();
6
+ const [cursorPosition, setCursorPosition] = useState(value.length);
7
+ const previousValueLength = useRef(value.length);
8
+ const [isCollapsedView, setIsCollapsedView] = useState(false);
9
+ const valueRef = useRef(value);
10
+ const cursorPositionRef = useRef(cursorPosition);
11
+ const onChangeRef = useRef(onChange);
12
+ const onSubmitRef = useRef(onSubmit);
13
+ const onHistoryPrevRef = useRef(onHistoryPrev);
14
+ const onHistoryNextRef = useRef(onHistoryNext);
15
+ const setIsCollapsedViewRef = useRef(setIsCollapsedView);
16
+ const isInternalChangeRef = useRef(false);
17
+ useEffect(() => {
18
+ valueRef.current = value;
19
+ cursorPositionRef.current = cursorPosition;
20
+ onChangeRef.current = onChange;
21
+ onSubmitRef.current = onSubmit;
22
+ onHistoryPrevRef.current = onHistoryPrev;
23
+ onHistoryNextRef.current = onHistoryNext;
24
+ setIsCollapsedViewRef.current = setIsCollapsedView;
25
+ });
26
+ useEffect(() => {
27
+ if (value.length === 0) {
28
+ setCursorPosition(0);
29
+ previousValueLength.current = 0;
30
+ setIsCollapsedView(false);
31
+ isInternalChangeRef.current = false;
32
+ return;
33
+ }
34
+ if (value.length > previousValueLength.current) {
35
+ if (!isInternalChangeRef.current) {
36
+ setCursorPosition(value.length);
37
+ }
38
+ isInternalChangeRef.current = false;
39
+ previousValueLength.current = value.length;
40
+ return;
41
+ }
42
+ if (value.length < cursorPosition) {
43
+ setCursorPosition(value.length);
44
+ }
45
+ isInternalChangeRef.current = false;
46
+ previousValueLength.current = value.length;
47
+ }, [value, cursorPosition]);
48
+ const handleDataRef = useRef((data) => {
49
+ const str = data.toString();
50
+ const currentValue = valueRef.current;
51
+ const currentCursor = cursorPositionRef.current;
52
+ const deleteWordBeforeCursor = (value, cursor) => {
53
+ if (cursor > 0) {
54
+ const beforeCursor = value.slice(0, cursor);
55
+ const afterCursor = value.slice(cursor);
56
+ let newPos = cursor - 1;
57
+ while (newPos > 0 && beforeCursor[newPos] === ' ') {
58
+ newPos--;
59
+ }
60
+ while (newPos > 0 && beforeCursor[newPos - 1] !== ' ') {
61
+ newPos--;
62
+ }
63
+ const newValue = beforeCursor.slice(0, newPos) + afterCursor;
64
+ isInternalChangeRef.current = true;
65
+ onChangeRef.current(newValue);
66
+ setCursorPosition(newPos);
67
+ }
68
+ };
69
+ if (str.startsWith('\x1b')) {
70
+ if (str === '\x1b\r' || str === '\x1b\n' || str === '\x1b[13;2u' || str === '\x1b[27;2;13~') {
71
+ const newValue = currentValue.slice(0, currentCursor) + '\n' + currentValue.slice(currentCursor);
72
+ isInternalChangeRef.current = true;
73
+ onChangeRef.current(newValue);
74
+ setCursorPosition(currentCursor + 1);
75
+ return;
76
+ }
77
+ if (str === '\x1b[H' || str === '\x1b[1~') {
78
+ setCursorPosition(0);
79
+ return;
80
+ }
81
+ if (str === '\x1b[F' || str === '\x1b[4~') {
82
+ setCursorPosition(currentValue.length);
83
+ return;
84
+ }
85
+ if (str === '\x1b[3~') {
86
+ if (currentCursor < currentValue.length) {
87
+ const newValue = currentValue.slice(0, currentCursor) + currentValue.slice(currentCursor + 1);
88
+ isInternalChangeRef.current = true;
89
+ onChangeRef.current(newValue);
90
+ }
91
+ return;
92
+ }
93
+ if (str === '\x1b[D') {
94
+ setCursorPosition(Math.max(0, currentCursor - 1));
95
+ return;
96
+ }
97
+ if (str === '\x1b[C') {
98
+ setCursorPosition(Math.min(currentValue.length, currentCursor + 1));
99
+ return;
100
+ }
101
+ if (str === '\x1b[A') {
102
+ if (onHistoryPrevRef.current) {
103
+ onHistoryPrevRef.current();
104
+ }
105
+ return;
106
+ }
107
+ if (str === '\x1b[B') {
108
+ if (onHistoryNextRef.current) {
109
+ onHistoryNextRef.current();
110
+ }
111
+ return;
112
+ }
113
+ if (str === '\x1b\x7f' || str === '\x1b\x08') {
114
+ deleteWordBeforeCursor(currentValue, currentCursor);
115
+ return;
116
+ }
117
+ return;
118
+ }
119
+ if (str === '\x01') {
120
+ setCursorPosition(0);
121
+ return;
122
+ }
123
+ if (str === '\x05') {
124
+ setCursorPosition(currentValue.length);
125
+ return;
126
+ }
127
+ if (str === '\x03') {
128
+ return;
129
+ }
130
+ if (str === '\x17') {
131
+ deleteWordBeforeCursor(currentValue, currentCursor);
132
+ return;
133
+ }
134
+ if (str === '\x7f' || str === '\x08') {
135
+ if (currentCursor > 0) {
136
+ const newValue = currentValue.slice(0, currentCursor - 1) + currentValue.slice(currentCursor);
137
+ isInternalChangeRef.current = true;
138
+ onChangeRef.current(newValue);
139
+ setCursorPosition(currentCursor - 1);
140
+ }
141
+ return;
142
+ }
143
+ if ((str === '\r' || str === '\n') && str.length === 1) {
144
+ if (onSubmitRef.current) {
145
+ onSubmitRef.current(currentValue);
146
+ }
147
+ return;
148
+ }
149
+ const isPaste = str.length > 1;
150
+ if (isPaste) {
151
+ const sanitized = str.replace(/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F]/g, '');
152
+ if (sanitized.length > 0) {
153
+ const newValue = currentValue.slice(0, currentCursor) + sanitized + currentValue.slice(currentCursor);
154
+ isInternalChangeRef.current = true;
155
+ onChangeRef.current(newValue);
156
+ setCursorPosition(currentCursor + sanitized.length);
157
+ const lineCount = sanitized.split('\n').length;
158
+ if (lineCount > MULTILINE_COLLAPSE_THRESHOLD) {
159
+ setIsCollapsedViewRef.current(true);
160
+ }
161
+ }
162
+ return;
163
+ }
164
+ setIsCollapsedViewRef.current(false);
165
+ const charCode = str.charCodeAt(0);
166
+ if (charCode >= 0x20 && charCode !== 0x7F) {
167
+ const newValue = currentValue.slice(0, currentCursor) + str + currentValue.slice(currentCursor);
168
+ isInternalChangeRef.current = true;
169
+ onChangeRef.current(newValue);
170
+ setCursorPosition(currentCursor + str.length);
171
+ }
172
+ });
173
+ useEffect(() => {
174
+ if (!focus || !stdin) {
175
+ return;
176
+ }
177
+ setRawMode?.(true);
178
+ const handler = handleDataRef.current;
179
+ stdin.on('data', handler);
180
+ return () => {
181
+ stdin.off('data', handler);
182
+ };
183
+ }, [focus, stdin, setRawMode]);
184
+ const renderValue = () => {
185
+ if (value.length === 0) {
186
+ return (React.createElement(Text, null,
187
+ focus && React.createElement(Text, { inverse: true }, " "),
188
+ React.createElement(Text, { dimColor: true }, placeholder)));
189
+ }
190
+ const beforeCursor = value.slice(0, cursorPosition);
191
+ const atCursor = value[cursorPosition] || ' ';
192
+ const afterCursor = value.slice(cursorPosition + 1);
193
+ const hasNewlines = value.includes('\n');
194
+ if (!hasNewlines) {
195
+ return (React.createElement(Text, null,
196
+ beforeCursor,
197
+ focus && React.createElement(Text, { inverse: true }, atCursor),
198
+ !focus && atCursor !== ' ' && React.createElement(Text, null, atCursor),
199
+ afterCursor));
200
+ }
201
+ const lines = value.split('\n');
202
+ const lineCount = lines.length;
203
+ if (lineCount > MULTILINE_COLLAPSE_THRESHOLD && isCollapsedView) {
204
+ const firstLine = lines[0] || '';
205
+ const previewMax = Math.min((process.stdout.columns || 80) - 20, 60);
206
+ const truncatedFirstLine = firstLine.length > previewMax ? firstLine.slice(0, previewMax) + '...' : firstLine;
207
+ return (React.createElement(Box, null,
208
+ React.createElement(Text, { color: "cyan" },
209
+ lineCount,
210
+ " lines pasted"),
211
+ React.createElement(Text, { color: "gray" }, " \u2502 "),
212
+ React.createElement(Text, { dimColor: true }, truncatedFirstLine),
213
+ focus && React.createElement(Text, { inverse: true }, " ")));
214
+ }
215
+ let charCount = 0;
216
+ let cursorLineIndex = 0;
217
+ let cursorPosInLine = 0;
218
+ for (let i = 0; i < lines.length; i++) {
219
+ const line = lines[i] ?? '';
220
+ const lineLength = line.length;
221
+ if (charCount + lineLength >= cursorPosition) {
222
+ cursorLineIndex = i;
223
+ cursorPosInLine = cursorPosition - charCount;
224
+ break;
225
+ }
226
+ charCount += lineLength + 1;
227
+ }
228
+ return (React.createElement(Box, { flexDirection: "column" }, lines.map((line, lineIndex) => {
229
+ const isCursorLine = lineIndex === cursorLineIndex;
230
+ if (!isCursorLine) {
231
+ return React.createElement(Text, { key: lineIndex }, line || ' ');
232
+ }
233
+ const beforeCursorInLine = line.slice(0, cursorPosInLine);
234
+ const atCursorChar = line[cursorPosInLine] || ' ';
235
+ const afterCursorInLine = line.slice(cursorPosInLine + 1);
236
+ return (React.createElement(Text, { key: lineIndex },
237
+ beforeCursorInLine,
238
+ focus && React.createElement(Text, { inverse: true }, atCursorChar),
239
+ !focus && atCursorChar !== ' ' && React.createElement(Text, null, atCursorChar),
240
+ afterCursorInLine));
241
+ })));
242
+ };
243
+ return renderValue();
244
+ };
245
+ export default CustomTextInput;
246
+ //# sourceMappingURL=CustomTextInput.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CustomTextInput.js","sourceRoot":"","sources":["../../../src/ui/components/CustomTextInput.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3D,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAG1C,MAAM,4BAA4B,GAAG,EAAE,CAAC;AAYxC,MAAM,CAAC,MAAM,eAAe,GAAmC,CAAC,EAC9D,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,aAAa,EACb,aAAa,EACb,WAAW,GAAG,EAAE,EAChB,KAAK,GAAG,IAAI,GACb,EAAE,EAAE;IACH,MAAM,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,QAAQ,EAAE,CAAC;IACzC,MAAM,CAAC,cAAc,EAAE,iBAAiB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IACnE,MAAM,mBAAmB,GAAG,MAAM,CAAS,KAAK,CAAC,MAAM,CAAC,CAAC;IAGzD,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAG9D,MAAM,QAAQ,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC/B,MAAM,iBAAiB,GAAG,MAAM,CAA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,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,eAAe,CAAC,CAAC;YAC1D,MAAM,YAAY,GAAG,IAAI,CAAC,eAAe,CAAC,IAAI,GAAG,CAAC;YAClD,MAAM,iBAAiB,GAAG,IAAI,CAAC,KAAK,CAAC,eAAe,GAAG,CAAC,CAAC,CAAC;YAE1D,OAAO,CACL,oBAAC,IAAI,IAAC,GAAG,EAAE,SAAS;gBACjB,kBAAkB;gBAClB,KAAK,IAAI,oBAAC,IAAI,IAAC,OAAO,UAAE,YAAY,CAAQ;gBAC5C,CAAC,KAAK,IAAI,YAAY,KAAK,GAAG,IAAI,oBAAC,IAAI,QAAE,YAAY,CAAQ;gBAC7D,iBAAiB,CACb,CACR,CAAC;QACJ,CAAC,CAAC,CACE,CACP,CAAC;IACJ,CAAC,CAAC;IAEF,OAAO,WAAW,EAAE,CAAC;AACvB,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { FileItem } from '../hooks/useFileList.js';
3
+ interface FileBrowserProps {
4
+ filter: string;
5
+ onSelect: (filePaths: string[]) => void;
6
+ onCancel: () => void;
7
+ cachedFiles?: FileItem[];
8
+ }
9
+ export declare const FileBrowser: React.FC<FileBrowserProps>;
10
+ export {};
11
+ //# sourceMappingURL=FileBrowser.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileBrowser.d.ts","sourceRoot":"","sources":["../../../src/ui/components/FileBrowser.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAe,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AAEhE,UAAU,gBAAgB;IACxB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,CAAC,SAAS,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACxC,QAAQ,EAAE,MAAM,IAAI,CAAC;IACrB,WAAW,CAAC,EAAE,QAAQ,EAAE,CAAC;CAC1B;AAOD,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CAqElD,CAAC"}
@@ -0,0 +1,45 @@
1
+ import React from 'react';
2
+ import { Box, Text, useInput } from 'ink';
3
+ import SelectInput from 'ink-select-input';
4
+ import { useFileList } from '../hooks/useFileList.js';
5
+ export const FileBrowser = ({ filter, onSelect, onCancel, cachedFiles = [], }) => {
6
+ const { files } = useFileList({
7
+ filter,
8
+ maxResults: 100,
9
+ cachedFiles,
10
+ });
11
+ const items = files.map((file) => {
12
+ const icon = '📄';
13
+ return {
14
+ label: `${icon} ${file.path}`,
15
+ value: file.path,
16
+ };
17
+ });
18
+ useInput((_inputChar, key) => {
19
+ if (key.escape) {
20
+ onCancel();
21
+ return;
22
+ }
23
+ if (key.tab && items.length > 0) {
24
+ const firstFile = items[0];
25
+ if (firstFile) {
26
+ onSelect([firstFile.value]);
27
+ }
28
+ return;
29
+ }
30
+ });
31
+ const handleSelect = (item) => {
32
+ onSelect([item.value]);
33
+ };
34
+ if (items.length === 0) {
35
+ return (React.createElement(Box, { borderStyle: "single", borderColor: "yellow", paddingX: 1, flexDirection: "column" },
36
+ React.createElement(Text, { color: "yellow" },
37
+ "No files found matching: ",
38
+ filter || '(all files)'),
39
+ React.createElement(Text, { dimColor: true }, "Press ESC to cancel")));
40
+ }
41
+ return (React.createElement(Box, { flexDirection: "column" },
42
+ React.createElement(Box, { borderStyle: "single", borderColor: "gray", paddingX: 1 },
43
+ React.createElement(SelectInput, { items: items, onSelect: handleSelect, limit: 10 }))));
44
+ };
45
+ //# sourceMappingURL=FileBrowser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FileBrowser.js","sourceRoot":"","sources":["../../../src/ui/components/FileBrowser.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,KAAK,CAAC;AAC1C,OAAO,WAAW,M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AW,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,EAAE,aAAa,EAAC,QAAQ;YAChF,oBAAC,IAAI,IAAC,KAAK,EAAC,QAAQ;;gBAA2B,MAAM,IAAI,aAAa,CAAQ;YAC9E,oBAAC,IAAI,IAAC,QAAQ,gCAA2B,CACrC,CACP,CAAC;IACJ,CAAC;IAED,OAAO,CACL,oBAAC,GAAG,IAAC,aAAa,EAAC,QAAQ;QAEzB,oBAAC,GAAG,IAAC,WAAW,EAAC,QAAQ,EAAC,WAAW,EAAC,MAAM,EAAC,QAAQ,EAAE,CAAC;YACtD,oBAAC,WAAW,IACV,KAAK,EAAE,KAAK,EACZ,QAAQ,EAAE,YAAY,EACtB,KAAK,EAAE,EAAE,GACT,CACE,CACF,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,8 @@
1
+ import React from 'react';
2
+ interface LLMSetupWizardProps {
3
+ onComplete: () => void;
4
+ onSkip: () => void;
5
+ }
6
+ export declare const LLMSetupWizard: React.FC<LLMSetupWizardProps>;
7
+ export {};
8
+ //# sourceMappingURL=LLMSetupWizard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"LLMSetupWizard.d.ts","sourceRoot":"","sources":["../../../src/ui/components/LLMSetupWizard.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAgC,MAAM,OAAO,CAAC;AAOrD,UAAU,mBAAmB;IAC3B,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAcD,eAAO,MAAM,cAAc,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CA6TxD,CAAC"}
@@ -0,0 +1,197 @@
1
+ import React, { useState, useCallback } from 'react';
2
+ import { Box, Text, useInput } from 'ink';
3
+ import TextInput from 'ink-text-input';
4
+ import { configManager } from '../../core/config/config-manager.js';
5
+ import { LLMClient } from '../../core/llm/llm-client.js';
6
+ export const LLMSetupWizard = ({ onComplete, onSkip }) => {
7
+ const [formData, setFormData] = useState({
8
+ name: '',
9
+ baseUrl: '',
10
+ apiKey: '',
11
+ modelId: '',
12
+ modelName: '',
13
+ maxContextLength: '128000',
14
+ supportsVision: false,
15
+ });
16
+ const [formField, setFormField] = useState('name');
17
+ const [formButtonIndex, setFormButtonIndex] = useState(0);
18
+ const [error, setError] = useState(null);
19
+ const [isTesting, setIsTesting] = useState(false);
20
+ const handleFormNavigation = useCallback((key) => {
21
+ const fields = ['name', 'baseUrl', 'apiKey', 'modelId', 'modelName', 'maxContextLength', 'supportsVision', 'buttons'];
22
+ const currentIndex = fields.indexOf(formField);
23
+ if (key.tab) {
24
+ if (key.shift) {
25
+ const prevIndex = currentIndex > 0 ? currentIndex - 1 : fields.length - 1;
26
+ setFormField(fields[prevIndex]);
27
+ }
28
+ else {
29
+ const nextIndex = currentIndex < fields.length - 1 ? currentIndex + 1 : 0;
30
+ setFormField(fields[nextIndex]);
31
+ }
32
+ }
33
+ if (key.upArrow) {
34
+ if (formField === 'buttons') {
35
+ setFormButtonIndex((prev) => (prev === 0 ? 1 : 0));
36
+ }
37
+ else {
38
+ const prevIndex = currentIndex > 0 ? currentIndex - 1 : fields.length - 1;
39
+ setFormField(fields[prevIndex]);
40
+ }
41
+ }
42
+ if (key.downArrow) {
43
+ if (formField === 'buttons') {
44
+ setFormButtonIndex((prev) => (prev === 0 ? 1 : 0));
45
+ }
46
+ else {
47
+ const nextIndex = currentIndex < fields.length - 1 ? currentIndex + 1 : 0;
48
+ setFormField(fields[nextIndex]);
49
+ }
50
+ }
51
+ }, [formField]);
52
+ const handleFormSubmit = useCallback(async () => {
53
+ if (formButtonIndex === 1) {
54
+ onSkip();
55
+ return;
56
+ }
57
+ if (!formData.name.trim()) {
58
+ setError('Name is required');
59
+ return;
60
+ }
61
+ if (!formData.baseUrl.trim()) {
62
+ setError('Base URL is required');
63
+ return;
64
+ }
65
+ if (!formData.modelId.trim()) {
66
+ setError('Model ID is required');
67
+ return;
68
+ }
69
+ setIsTesting(true);
70
+ setError(null);
71
+ try {
72
+ const result = await LLMClient.testConnection(formData.baseUrl, formData.apiKey, formData.modelId);
73
+ if (!result.success) {
74
+ setError(result.error || 'Connection failed');
75
+ setIsTesting(false);
76
+ return;
77
+ }
78
+ const maxTokens = parseInt(formData.maxContextLength, 10) || 128000;
79
+ const newEndpoint = {
80
+ id: `ep-${Date.now()}`,
81
+ name: formData.name,
82
+ baseUrl: formData.baseUrl,
83
+ apiKey: formData.apiKey || undefined,
84
+ models: [
85
+ {
86
+ id: formData.modelId,
87
+ name: formData.modelName || formData.modelId,
88
+ maxTokens: maxTokens,
89
+ enabled: true,
90
+ healthStatus: 'healthy',
91
+ lastHealthCheck: new Date(),
92
+ supportsVision: formData.supportsVision,
93
+ },
94
+ ],
95
+ createdAt: new Date(),
96
+ updatedAt: new Date(),
97
+ };
98
+ await configManager.createInitialEndpoint(newEndpoint);
99
+ const { syncVisionToolState } = await import('../../tools/registry.js');
100
+ await syncVisionToolState();
101
+ setIsTesting(false);
102
+ onComplete();
103
+ }
104
+ catch (err) {
105
+ setError(err instanceof Error ? err.message : 'Unknown error');
106
+ setIsTesting(false);
107
+ }
108
+ }, [formData, formButtonIndex, onComplete, onSkip]);
109
+ useInput((inputChar, key) => {
110
+ if (formField === 'supportsVision' && (inputChar === ' ' || key.return)) {
111
+ setFormData((prev) => ({ ...prev, supportsVision: !prev.supportsVision }));
112
+ return;
113
+ }
114
+ if (key.tab) {
115
+ handleFormNavigation({ tab: true, shift: key.shift });
116
+ }
117
+ else if (key.upArrow || key.downArrow) {
118
+ handleFormNavigation({ upArrow: key.upArrow, downArrow: key.downArrow });
119
+ }
120
+ else if (key.return && formField === 'buttons') {
121
+ handleFormSubmit();
122
+ }
123
+ });
124
+ return (React.createElement(Box, { flexDirection: "column" },
125
+ React.createElement(Text, null, ' '),
126
+ React.createElement(Text, null, ' '),
127
+ React.createElement(Box, { borderStyle: "double", borderColor: "cyan", paddingX: 2, marginBottom: 1 },
128
+ React.createElement(Text, { color: "cyan", bold: true }, "Welcome to LOCAL-CLI!")),
129
+ React.createElement(Box, { paddingX: 1, marginBottom: 1, flexDirection: "column" },
130
+ React.createElement(Text, { color: "yellow" }, "No LLM endpoint configured."),
131
+ React.createElement(Text, { color: "gray" }, "Let's set up your first LLM endpoint.")),
132
+ React.createElement(Box, { borderStyle: "single", borderColor: "gray", paddingX: 1, flexDirection: "column" },
133
+ React.createElement(Box, null,
134
+ React.createElement(Text, { color: formField === 'name' ? 'cyan' : 'yellow' },
135
+ formField === 'name' ? '> ' : ' ',
136
+ "Endpoint Name:"),
137
+ formField === 'name' ? (React.createElement(TextInput, { value: formData.name, onChange: (value) => setFormData({ ...formData, name: value }), placeholder: "My Local LLM" })) : (React.createElement(Text, null,
138
+ " ",
139
+ formData.name || '(empty)'))),
140
+ React.createElement(Box, null,
141
+ React.createElement(Text, { color: formField === 'baseUrl' ? 'cyan' : 'yellow' },
142
+ formField === 'baseUrl' ? '> ' : ' ',
143
+ "Base URL:"),
144
+ formField === 'baseUrl' ? (React.createElement(TextInput, { value: formData.baseUrl, onChange: (value) => setFormData({ ...formData, baseUrl: value }), placeholder: "http://localhost:11434/v1" })) : (React.createElement(Text, null,
145
+ " ",
146
+ formData.baseUrl || '(empty)'))),
147
+ React.createElement(Box, null,
148
+ React.createElement(Text, { color: formField === 'apiKey' ? 'cyan' : 'yellow' },
149
+ formField === 'apiKey' ? '> ' : ' ',
150
+ "API Key:"),
151
+ formField === 'apiKey' ? (React.createElement(TextInput, { value: formData.apiKey, onChange: (value) => setFormData({ ...formData, apiKey: value }), placeholder: "(optional)" })) : (React.createElement(Text, null,
152
+ " ",
153
+ formData.apiKey ? '••••••••' : '(optional)'))),
154
+ React.createElement(Box, null,
155
+ React.createElement(Text, { color: formField === 'modelId' ? 'cyan' : 'yellow' },
156
+ formField === 'modelId' ? '> ' : ' ',
157
+ "Model ID:"),
158
+ formField === 'modelId' ? (React.createElement(TextInput, { value: formData.modelId, onChange: (value) => setFormData({ ...formData, modelId: value }), placeholder: "qwen2.5-coder:32b" })) : (React.createElement(Text, null,
159
+ " ",
160
+ formData.modelId || '(empty)'))),
161
+ React.createElement(Box, null,
162
+ React.createElement(Text, { color: formField === 'modelName' ? 'cyan' : 'yellow' },
163
+ formField === 'modelName' ? '> ' : ' ',
164
+ "Model Name:"),
165
+ formField === 'modelName' ? (React.createElement(TextInput, { value: formData.modelName, onChange: (value) => setFormData({ ...formData, modelName: value }), placeholder: "Qwen 2.5 Coder 32B (optional)" })) : (React.createElement(Text, null,
166
+ " ",
167
+ formData.modelName || '(optional)'))),
168
+ React.createElement(Box, null,
169
+ React.createElement(Text, { color: formField === 'maxContextLength' ? 'cyan' : 'yellow' },
170
+ formField === 'maxContextLength' ? '> ' : ' ',
171
+ "Max Context:"),
172
+ formField === 'maxContextLength' ? (React.createElement(TextInput, { value: formData.maxContextLength, onChange: (value) => setFormData({ ...formData, maxContextLength: value.replace(/[^0-9]/g, '') }), placeholder: "128000" })) : (React.createElement(Text, null,
173
+ " ",
174
+ formData.maxContextLength || '128000'))),
175
+ React.createElement(Box, null,
176
+ React.createElement(Text, { color: formField === 'supportsVision' ? 'cyan' : 'yellow' },
177
+ formField === 'supportsVision' ? '> ' : ' ',
178
+ "Vision (VL):"),
179
+ React.createElement(Text, { color: formData.supportsVision ? 'green' : 'gray' }, formData.supportsVision ? ' [ON] ' : ' [OFF]'),
180
+ formField === 'supportsVision' && (React.createElement(Text, { color: "gray", dimColor: true }, " (Space/Enter to toggle)")))),
181
+ error && (React.createElement(Box, { marginTop: 1, paddingX: 1 },
182
+ React.createElement(Text, { color: "red" },
183
+ "Error: ",
184
+ error))),
185
+ React.createElement(Box, { marginTop: 1, flexDirection: "column", paddingX: 1 },
186
+ React.createElement(Box, null,
187
+ React.createElement(Text, { color: formField === 'buttons' && formButtonIndex === 0 ? 'cyan' : undefined, bold: formField === 'buttons' && formButtonIndex === 0 },
188
+ formField === 'buttons' && formButtonIndex === 0 ? '> ' : ' ',
189
+ isTesting ? 'Testing...' : 'Test & Save')),
190
+ React.createElement(Box, null,
191
+ React.createElement(Text, { color: formField === 'buttons' && formButtonIndex === 1 ? 'cyan' : undefined, bold: formField === 'buttons' && formButtonIndex === 1 },
192
+ formField === 'buttons' && formButtonIndex === 1 ? '> ' : ' ',
193
+ "Skip (configure later via /settings)"))),
194
+ React.createElement(Box, { marginTop: 1 },
195
+ React.createElement(Text, { dimColor: true }, "\u2191\u2193/Tab: navigate fields | Shift+Tab: prev | Enter: select button"))));
196
+ };
197
+ //# sourceMappingURL=LLMSetupWizard.js.map