genaicode 0.8.6 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (1003) hide show
  1. package/dist/ai-service/ai-studio.d.ts +2 -3
  2. package/dist/ai-service/ai-studio.js +55 -27
  3. package/dist/ai-service/ai-studio.js.map +1 -1
  4. package/dist/ai-service/anthropic.d.ts +2 -3
  5. package/dist/ai-service/anthropic.js +24 -8
  6. package/dist/ai-service/anthropic.js.map +1 -1
  7. package/dist/{src/ai-service/common.d.ts → ai-service/common-types.d.ts} +24 -26
  8. package/dist/ai-service/common-types.js +10 -0
  9. package/dist/ai-service/common-types.js.map +1 -0
  10. package/dist/ai-service/common.d.ts +3 -55
  11. package/dist/ai-service/common.js +16 -4
  12. package/dist/ai-service/common.js.map +1 -1
  13. package/dist/ai-service/dall-e.d.ts +2 -9
  14. package/dist/ai-service/dall-e.js +4 -11
  15. package/dist/ai-service/dall-e.js.map +1 -1
  16. package/dist/ai-service/openai.d.ts +15 -4
  17. package/dist/ai-service/openai.js +45 -20
  18. package/dist/ai-service/openai.js.map +1 -1
  19. package/dist/ai-service/service-configurations-types.d.ts +55 -0
  20. package/dist/ai-service/service-configurations-types.js +6 -0
  21. package/dist/ai-service/service-configurations-types.js.map +1 -0
  22. package/dist/ai-service/service-configurations.d.ts +3 -2
  23. package/dist/ai-service/service-configurations.js +5 -0
  24. package/dist/ai-service/service-configurations.js.map +1 -1
  25. package/dist/ai-service/unescape-function-call.d.ts +1 -1
  26. package/dist/ai-service/vertex-ai-claude.d.ts +2 -2
  27. package/dist/ai-service/vertex-ai-claude.js +22 -8
  28. package/dist/ai-service/vertex-ai-claude.js.map +1 -1
  29. package/dist/ai-service/vertex-ai-imagen.d.ts +2 -9
  30. package/dist/ai-service/vertex-ai-imagen.js +4 -11
  31. package/dist/ai-service/vertex-ai-imagen.js.map +1 -1
  32. package/dist/ai-service/vertex-ai.d.ts +2 -3
  33. package/dist/ai-service/vertex-ai.js +17 -12
  34. package/dist/ai-service/vertex-ai.js.map +1 -1
  35. package/dist/cli/cli-params.d.ts +1 -1
  36. package/dist/cli/cli-params.js +1 -1
  37. package/dist/cli/cli-params.js.map +1 -1
  38. package/dist/files/read-files.d.ts +1 -28
  39. package/dist/files/read-files.js +1 -1
  40. package/dist/files/read-files.js.map +1 -1
  41. package/dist/files/source-code-tree.d.ts +3 -1
  42. package/dist/files/source-code-tree.js.map +1 -1
  43. package/dist/files/source-code-types.d.ts +26 -0
  44. package/dist/files/source-code-types.js +2 -0
  45. package/dist/files/source-code-types.js.map +1 -0
  46. package/dist/files/summary-cache.d.ts +20 -0
  47. package/dist/files/summary-cache.js +15 -0
  48. package/dist/files/summary-cache.js.map +1 -0
  49. package/dist/files/update-files.d.ts +1 -1
  50. package/dist/help-docs/genaicode-help-document.d.ts +1 -0
  51. package/dist/help-docs/genaicode-help-document.js +286 -0
  52. package/dist/help-docs/genaicode-help-document.js.map +1 -0
  53. package/dist/index.d.ts +1 -3
  54. package/dist/index.js +1 -3
  55. package/dist/index.js.map +1 -1
  56. package/dist/main/codegen-types.d.ts +12 -10
  57. package/dist/main/codegen-utils.d.ts +1 -1
  58. package/dist/main/codegen.d.ts +4 -3
  59. package/dist/main/codegen.js.map +1 -1
  60. package/dist/main/codegen.test-utils.d.ts +1 -1
  61. package/dist/main/common/abort-controller.d.ts +2 -0
  62. package/dist/main/common/abort-controller.js +5 -0
  63. package/dist/main/common/abort-controller.js.map +1 -0
  64. package/dist/main/common/app-context-bus.d.ts +11 -0
  65. package/dist/main/common/app-context-bus.js +29 -0
  66. package/dist/main/common/app-context-bus.js.map +1 -0
  67. package/dist/main/common/content-bus-types.d.ts +1 -1
  68. package/dist/main/common/content-bus.d.ts +1 -1
  69. package/dist/main/common/cost-collector.d.ts +3 -2
  70. package/dist/main/common/cost-collector.js +3 -3
  71. package/dist/main/common/cost-collector.js.map +1 -1
  72. package/dist/main/common/user-actions.d.ts +3 -3
  73. package/dist/main/common/user-actions.js +17 -8
  74. package/dist/main/common/user-actions.js.map +1 -1
  75. package/dist/main/config-schema.js +10 -0
  76. package/dist/main/config-schema.js.map +1 -1
  77. package/dist/main/config-types.d.ts +22 -16
  78. package/dist/main/interactive/codegen-worker.d.ts +0 -1
  79. package/dist/main/interactive/codegen-worker.js +4 -3
  80. package/dist/main/interactive/codegen-worker.js.map +1 -1
  81. package/dist/main/interactive/select-ai-service.d.ts +1 -1
  82. package/dist/main/plugin-loader.d.ts +5 -3
  83. package/dist/main/plugin-loader.js.map +1 -1
  84. package/dist/main/ui/backend/endpoints/context-endpoint.js +67 -0
  85. package/dist/main/ui/backend/endpoints/context-endpoint.js.map +1 -0
  86. package/dist/main/ui/backend/endpoints/generate-content-endpoint.js +2 -1
  87. package/dist/main/ui/backend/endpoints/generate-content-endpoint.js.map +1 -1
  88. package/dist/main/ui/backend/endpoints/index.d.ts +1 -0
  89. package/dist/main/ui/backend/endpoints/index.js +1 -0
  90. package/dist/main/ui/backend/endpoints/index.js.map +1 -1
  91. package/dist/main/ui/backend/server.d.ts +2 -1
  92. package/dist/main/ui/backend/server.js +2 -1
  93. package/dist/main/ui/backend/server.js.map +1 -1
  94. package/dist/main/ui/backend/service.d.ts +29 -4
  95. package/dist/main/ui/backend/service.js +41 -3
  96. package/dist/main/ui/backend/service.js.map +1 -1
  97. package/dist/main/ui/codegen-ui.d.ts +5 -1
  98. package/dist/main/ui/codegen-ui.js +10 -1
  99. package/dist/main/ui/codegen-ui.js.map +1 -1
  100. package/dist/main/ui/common/api-types.d.ts +4 -51
  101. package/dist/main/ui/frontend/assets/favicon-DvroFOpS.png +0 -0
  102. package/dist/main/ui/frontend/assets/index-DfiFNFf2.js +1771 -0
  103. package/dist/main/ui/frontend/assets/wolf-bark-Bl17CX4O.mp3 +0 -0
  104. package/dist/main/ui/frontend/index.html +2 -2
  105. package/dist/operations/create-directory/create-directory-def.d.ts +1 -1
  106. package/dist/operations/create-file/create-file-def.d.ts +1 -1
  107. package/dist/operations/create-file/create-file-def.js +2 -1
  108. package/dist/operations/create-file/create-file-def.js.map +1 -1
  109. package/dist/operations/delete-file/delete-file-def.d.ts +1 -1
  110. package/dist/operations/download-file/download-file-def.d.ts +1 -1
  111. package/dist/operations/imgly-remove-background/imgly-remove-background-def.d.ts +1 -1
  112. package/dist/operations/move-file/move-file-def.d.ts +1 -1
  113. package/dist/operations/patch-file/patch-file-def.d.ts +1 -1
  114. package/dist/operations/patch-file/patch-file-def.js +2 -1
  115. package/dist/operations/patch-file/patch-file-def.js.map +1 -1
  116. package/dist/operations/resize-image/resize-image-def.d.ts +1 -1
  117. package/dist/operations/split-image/split-image-def.d.ts +1 -1
  118. package/dist/operations/update-file/update-file-def.d.ts +1 -1
  119. package/dist/operations/update-file/update-file-def.js +2 -1
  120. package/dist/operations/update-file/update-file-def.js.map +1 -1
  121. package/dist/prompt/ai-service-fallback.d.ts +4 -3
  122. package/dist/prompt/ai-service-fallback.js +10 -58
  123. package/dist/prompt/ai-service-fallback.js.map +1 -1
  124. package/dist/prompt/function-calling-validate.d.ts +2 -2
  125. package/dist/prompt/function-calling-validate.js +4 -5
  126. package/dist/prompt/function-calling-validate.js.map +1 -1
  127. package/dist/prompt/function-calling.d.ts +1 -1
  128. package/dist/prompt/function-calling.js +12 -2
  129. package/dist/prompt/function-calling.js.map +1 -1
  130. package/dist/prompt/function-defs/analysis-result.d.ts +7 -0
  131. package/dist/prompt/function-defs/analysis-result.js +24 -0
  132. package/dist/prompt/function-defs/analysis-result.js.map +1 -0
  133. package/dist/prompt/function-defs/ask-question.d.ts +3 -2
  134. package/dist/prompt/function-defs/ask-question.js +93 -81
  135. package/dist/prompt/function-defs/ask-question.js.map +1 -1
  136. package/dist/prompt/function-defs/codegen-planning.d.ts +1 -1
  137. package/dist/prompt/function-defs/codegen-planning.js +11 -1
  138. package/dist/prompt/function-defs/codegen-planning.js.map +1 -1
  139. package/dist/prompt/function-defs/codegen-summary.d.ts +1 -1
  140. package/dist/prompt/function-defs/codegen-summary.js +19 -10
  141. package/dist/prompt/function-defs/codegen-summary.js.map +1 -1
  142. package/dist/prompt/function-defs/explanation.d.ts +1 -1
  143. package/dist/prompt/function-defs/genaicode-help.d.ts +6 -0
  144. package/dist/prompt/function-defs/genaicode-help.js +23 -0
  145. package/dist/prompt/function-defs/genaicode-help.js.map +1 -0
  146. package/dist/prompt/function-defs/generate-image.d.ts +1 -1
  147. package/dist/prompt/function-defs/get-image-assets.d.ts +1 -1
  148. package/dist/prompt/function-defs/get-source-code.d.ts +1 -1
  149. package/dist/prompt/function-defs/optimize-context.d.ts +1 -1
  150. package/dist/prompt/function-defs/optimize-context.js +1 -1
  151. package/dist/prompt/function-defs/optimize-context.js.map +1 -1
  152. package/dist/prompt/function-defs/perform-analysis.d.ts +8 -0
  153. package/dist/prompt/function-defs/perform-analysis.js +28 -0
  154. package/dist/prompt/function-defs/perform-analysis.js.map +1 -0
  155. package/dist/prompt/function-defs/read-history.d.ts +1 -1
  156. package/dist/prompt/function-defs/reasoning-inference.d.ts +3 -0
  157. package/dist/prompt/function-defs/reasoning-inference.js +39 -0
  158. package/dist/prompt/function-defs/reasoning-inference.js.map +1 -0
  159. package/dist/prompt/function-defs/set-summaries.d.ts +1 -1
  160. package/dist/prompt/function-defs/update-history.d.ts +1 -1
  161. package/dist/prompt/limits.js +1 -1
  162. package/dist/prompt/prompt-service.d.ts +5 -2
  163. package/dist/prompt/prompt-service.js +1 -2
  164. package/dist/prompt/prompt-service.js.map +1 -1
  165. package/dist/prompt/prompt-service.test-utils.d.ts +2 -2
  166. package/dist/prompt/prompt-service.test-utils.js +2 -1
  167. package/dist/prompt/prompt-service.test-utils.js.map +1 -1
  168. package/dist/prompt/steps/step-ask-question/handlers/code-generation.d.ts +2 -0
  169. package/dist/prompt/steps/step-ask-question/handlers/code-generation.js +11 -9
  170. package/dist/prompt/steps/step-ask-question/handlers/code-generation.js.map +1 -1
  171. package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.js +1 -5
  172. package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.js.map +1 -1
  173. package/dist/prompt/steps/step-ask-question/handlers/context-optimization.js +1 -5
  174. package/dist/prompt/steps/step-ask-question/handlers/context-optimization.js.map +1 -1
  175. package/dist/prompt/steps/step-ask-question/handlers/genaicode-help-document.d.ts +1 -0
  176. package/dist/prompt/steps/step-ask-question/handlers/genaicode-help-document.js +251 -0
  177. package/dist/prompt/steps/step-ask-question/handlers/genaicode-help-document.js.map +1 -0
  178. package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.d.ts +2 -0
  179. package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js +157 -0
  180. package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js.map +1 -0
  181. package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.d.ts +2 -0
  182. package/dist/prompt/steps/step-ask-question/handlers/{cancel-code-generation.js → handle-end-conversation.js} +2 -2
  183. package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js.map +1 -0
  184. package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.d.ts +8 -0
  185. package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js +91 -0
  186. package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js.map +1 -0
  187. package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.d.ts +2 -0
  188. package/dist/prompt/steps/step-ask-question/handlers/{handle-send-message-with-image.js → handle-generate-image.js} +28 -29
  189. package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js.map +1 -0
  190. package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.d.ts +6 -0
  191. package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js +99 -0
  192. package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js.map +1 -0
  193. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.d.ts +9 -0
  194. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js +90 -0
  195. package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js.map +1 -0
  196. package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.d.ts +9 -0
  197. package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js +91 -0
  198. package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js.map +1 -0
  199. package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.d.ts +7 -0
  200. package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js +87 -0
  201. package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js.map +1 -0
  202. package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js +4 -4
  203. package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js.map +1 -1
  204. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js +1 -4
  205. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js.map +1 -1
  206. package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js +92 -61
  207. package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js.map +1 -1
  208. package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.js +2 -1
  209. package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.js.map +1 -1
  210. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.d.ts +7 -1
  211. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js +42 -42
  212. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js.map +1 -1
  213. package/dist/prompt/steps/step-ask-question/handlers/request-permissions.js +3 -2
  214. package/dist/prompt/steps/step-ask-question/handlers/request-permissions.js.map +1 -1
  215. package/dist/prompt/steps/step-ask-question/step-ask-question-types.d.ts +75 -6
  216. package/dist/prompt/steps/step-ask-question/step-ask-question.d.ts +5 -1
  217. package/dist/prompt/steps/step-ask-question/step-ask-question.js +30 -13
  218. package/dist/prompt/steps/step-ask-question/step-ask-question.js.map +1 -1
  219. package/dist/prompt/steps/step-codegen-planning.d.ts +2 -1
  220. package/dist/prompt/steps/step-codegen-planning.js +2 -1
  221. package/dist/prompt/steps/step-codegen-planning.js.map +1 -1
  222. package/dist/prompt/steps/step-context-optimization.d.ts +2 -1
  223. package/dist/prompt/steps/step-context-optimization.js +5 -7
  224. package/dist/prompt/steps/step-context-optimization.js.map +1 -1
  225. package/dist/prompt/steps/step-ensure-context.d.ts +1 -1
  226. package/dist/prompt/steps/step-ensure-context.js +3 -0
  227. package/dist/prompt/steps/step-ensure-context.js.map +1 -1
  228. package/dist/prompt/steps/step-generate-codegen-summary-prompt.d.ts +2 -0
  229. package/dist/prompt/steps/step-generate-codegen-summary-prompt.js +133 -0
  230. package/dist/prompt/steps/step-generate-codegen-summary-prompt.js.map +1 -0
  231. package/dist/prompt/steps/step-generate-codegen-summary.d.ts +6 -3
  232. package/dist/prompt/steps/step-generate-codegen-summary.js +14 -2
  233. package/dist/prompt/steps/step-generate-codegen-summary.js.map +1 -1
  234. package/dist/prompt/steps/step-generate-image.d.ts +2 -1
  235. package/dist/prompt/steps/step-generate-image.js +4 -2
  236. package/dist/prompt/steps/step-generate-image.js.map +1 -1
  237. package/dist/prompt/steps/step-generate-summary.d.ts +2 -1
  238. package/dist/prompt/steps/step-generate-summary.js +3 -2
  239. package/dist/prompt/steps/step-generate-summary.js.map +1 -1
  240. package/dist/prompt/steps/step-history-update.d.ts +2 -1
  241. package/dist/prompt/steps/step-history-update.js +9 -1
  242. package/dist/prompt/steps/step-history-update.js.map +1 -1
  243. package/dist/prompt/steps/step-process-file-updates.d.ts +7 -3
  244. package/dist/prompt/steps/step-process-file-updates.js +9 -7
  245. package/dist/prompt/steps/step-process-file-updates.js.map +1 -1
  246. package/dist/prompt/steps/step-summarization.d.ts +2 -6
  247. package/dist/prompt/steps/step-summarization.js +11 -15
  248. package/dist/prompt/steps/step-summarization.js.map +1 -1
  249. package/dist/prompt/steps/step-validate-recover.d.ts +4 -2
  250. package/dist/prompt/steps/step-validate-recover.js +8 -6
  251. package/dist/prompt/steps/step-validate-recover.js.map +1 -1
  252. package/dist/prompt/steps/step-verify-patch.d.ts +4 -1
  253. package/dist/prompt/steps/step-verify-patch.js +15 -2
  254. package/dist/prompt/steps/step-verify-patch.js.map +1 -1
  255. package/dist/prompt/steps/steps-types.d.ts +0 -14
  256. package/dist/prompt/steps/steps-types.js.map +1 -1
  257. package/dist/prompt/steps/steps-utils.d.ts +1 -1
  258. package/dist/prompt/systemprompt.d.ts +1 -1
  259. package/dist/prompt/systemprompt.js +40 -11
  260. package/dist/prompt/systemprompt.js.map +1 -1
  261. package/dist/{eval → prompt-debug}/current-prompt-plugin.d.ts +1 -1
  262. package/dist/{eval → prompt-debug}/current-prompt-plugin.js +1 -1
  263. package/dist/prompt-debug/current-prompt-plugin.js.map +1 -0
  264. package/dist/vite-genaicode/vite-genaicode-context.d.ts +31 -0
  265. package/dist/vite-genaicode/vite-genaicode-context.js +120 -0
  266. package/dist/vite-genaicode/vite-genaicode-context.js.map +1 -0
  267. package/dist/vite-genaicode/vite-genaicode-frontend.js +206 -30
  268. package/dist/vite-genaicode/vite-genaicode-frontend.js.map +1 -1
  269. package/dist/vite-genaicode/vite-genaicode-plugin.d.ts +1 -0
  270. package/dist/vite-genaicode/vite-genaicode-plugin.js +22 -9
  271. package/dist/vite-genaicode/vite-genaicode-plugin.js.map +1 -1
  272. package/dist/vite-genaicode/vite-genaicode-types.d.ts +26 -0
  273. package/dist/vite-genaicode/vite-genaicode-types.js +11 -0
  274. package/dist/vite-genaicode/vite-genaicode-types.js.map +1 -0
  275. package/package.json +10 -3
  276. package/dist/ai-service/ai-studio.d.ts.map +0 -1
  277. package/dist/ai-service/anthropic.d.ts.map +0 -1
  278. package/dist/ai-service/chat-gpt.d.ts +0 -7
  279. package/dist/ai-service/chat-gpt.d.ts.map +0 -1
  280. package/dist/ai-service/chat-gpt.js +0 -174
  281. package/dist/ai-service/chat-gpt.js.map +0 -1
  282. package/dist/ai-service/common.d.ts.map +0 -1
  283. package/dist/ai-service/common.test.js +0 -86
  284. package/dist/ai-service/common.test.js.map +0 -1
  285. package/dist/ai-service/dall-e.d.ts.map +0 -1
  286. package/dist/ai-service/unescape-function-call.d.ts.map +0 -1
  287. package/dist/ai-service/unescape-function-call.test.d.ts +0 -1
  288. package/dist/ai-service/unescape-function-call.test.js +0 -18
  289. package/dist/ai-service/unescape-function-call.test.js.map +0 -1
  290. package/dist/ai-service/vertex-ai-claude.d.ts.map +0 -1
  291. package/dist/ai-service/vertex-ai-imagen.d.ts.map +0 -1
  292. package/dist/ai-service/vertex-ai.d.ts.map +0 -1
  293. package/dist/cli/cli-options.d.ts.map +0 -1
  294. package/dist/cli/cli-options.test.d.ts +0 -1
  295. package/dist/cli/cli-options.test.js +0 -34
  296. package/dist/cli/cli-options.test.js.map +0 -1
  297. package/dist/cli/cli-params.d.ts.map +0 -1
  298. package/dist/cli/cli-params.test.d.ts +0 -1
  299. package/dist/cli/cli-params.test.js +0 -38
  300. package/dist/cli/cli-params.test.js.map +0 -1
  301. package/dist/cli/service-autodetect.d.ts.map +0 -1
  302. package/dist/cli/service-autodetect.test.d.ts +0 -1
  303. package/dist/cli/service-autodetect.test.js +0 -38
  304. package/dist/cli/service-autodetect.test.js.map +0 -1
  305. package/dist/cli/validate-cli-params.d.ts.map +0 -1
  306. package/dist/cli/validate-cli-params.test.d.ts +0 -1
  307. package/dist/cli/validate-cli-params.test.js +0 -106
  308. package/dist/cli/validate-cli-params.test.js.map +0 -1
  309. package/dist/eval/codegen-summary.test.d.ts +0 -1
  310. package/dist/eval/codegen-summary.test.js +0 -93
  311. package/dist/eval/codegen-summary.test.js.map +0 -1
  312. package/dist/eval/current-prompt-plugin.js.map +0 -1
  313. package/dist/eval/data/current-prompt.d.ts +0 -149
  314. package/dist/eval/data/current-prompt.js +0 -314
  315. package/dist/eval/data/current-prompt.js.map +0 -1
  316. package/dist/eval/data/prompt-assistant-image.d.ts +0 -49
  317. package/dist/eval/data/prompt-assistant-image.js +0 -67
  318. package/dist/eval/data/prompt-assistant-image.js.map +0 -1
  319. package/dist/eval/data/prompt3.d.ts +0 -34
  320. package/dist/eval/data/prompt3.js +0 -71
  321. package/dist/eval/data/prompt3.js.map +0 -1
  322. package/dist/eval/prompt-debug.test.d.ts +0 -1
  323. package/dist/eval/prompt-debug.test.js +0 -93
  324. package/dist/eval/prompt-debug.test.js.map +0 -1
  325. package/dist/eval/prompt2.d.ts +0 -34
  326. package/dist/eval/prompt2.js +0 -125
  327. package/dist/eval/prompt2.js.map +0 -1
  328. package/dist/examples/genaicode_plugins/fake_ai_service.d.ts +0 -3
  329. package/dist/examples/genaicode_plugins/fake_ai_service.js +0 -11
  330. package/dist/examples/genaicode_plugins/fake_ai_service.js.map +0 -1
  331. package/dist/examples/genaicode_plugins/grok_ai_service.d.ts +0 -3
  332. package/dist/examples/genaicode_plugins/grok_ai_service.js +0 -153
  333. package/dist/examples/genaicode_plugins/grok_ai_service.js.map +0 -1
  334. package/dist/examples/genaicode_plugins/nonsense_operation.d.ts +0 -3
  335. package/dist/examples/genaicode_plugins/nonsense_operation.js +0 -23
  336. package/dist/examples/genaicode_plugins/nonsense_operation.js.map +0 -1
  337. package/dist/files/cache-file.d.ts.map +0 -1
  338. package/dist/files/file-utils.d.ts.map +0 -1
  339. package/dist/files/file-utils.test.d.ts +0 -1
  340. package/dist/files/file-utils.test.js +0 -18
  341. package/dist/files/file-utils.test.js.map +0 -1
  342. package/dist/files/find-files.d.ts.map +0 -1
  343. package/dist/files/path-utils.d.ts.map +0 -1
  344. package/dist/files/read-files.d.ts.map +0 -1
  345. package/dist/files/read-files.test.d.ts +0 -1
  346. package/dist/files/read-files.test.js +0 -95
  347. package/dist/files/read-files.test.js.map +0 -1
  348. package/dist/files/search-files.d.ts.map +0 -1
  349. package/dist/files/source-code-tree.d.ts.map +0 -1
  350. package/dist/files/temp-buffer.d.ts.map +0 -1
  351. package/dist/files/update-files.d.ts.map +0 -1
  352. package/dist/images/ensure-alpha.d.ts.map +0 -1
  353. package/dist/images/imgly-remove-background.d.ts.map +0 -1
  354. package/dist/images/resize-image.d.ts.map +0 -1
  355. package/dist/images/split-image.d.ts.map +0 -1
  356. package/dist/index.d.ts.map +0 -1
  357. package/dist/main/codegen-non-interactive.d.ts.map +0 -1
  358. package/dist/main/codegen-types.d.ts.map +0 -1
  359. package/dist/main/codegen-utils.d.ts.map +0 -1
  360. package/dist/main/codegen.ai-services.test.d.ts +0 -3
  361. package/dist/main/codegen.ai-services.test.js +0 -198
  362. package/dist/main/codegen.ai-services.test.js.map +0 -1
  363. package/dist/main/codegen.cli-options.test.d.ts +0 -3
  364. package/dist/main/codegen.cli-options.test.js +0 -171
  365. package/dist/main/codegen.cli-options.test.js.map +0 -1
  366. package/dist/main/codegen.d.ts.map +0 -1
  367. package/dist/main/codegen.image-generation.test.d.ts +0 -3
  368. package/dist/main/codegen.image-generation.test.js +0 -187
  369. package/dist/main/codegen.image-generation.test.js.map +0 -1
  370. package/dist/main/codegen.test-utils.d.ts.map +0 -1
  371. package/dist/main/codegen.test.d.ts +0 -3
  372. package/dist/main/codegen.test.js +0 -307
  373. package/dist/main/codegen.test.js.map +0 -1
  374. package/dist/main/common/content-bus-types.d.ts.map +0 -1
  375. package/dist/main/common/content-bus.d.ts.map +0 -1
  376. package/dist/main/common/cost-collector.d.ts.map +0 -1
  377. package/dist/main/common/user-actions.d.ts.map +0 -1
  378. package/dist/main/config-lib.d.ts.map +0 -1
  379. package/dist/main/config-lib.test.d.ts +0 -1
  380. package/dist/main/config-lib.test.js +0 -64
  381. package/dist/main/config-lib.test.js.map +0 -1
  382. package/dist/main/config.d.ts.map +0 -1
  383. package/dist/main/interactive/codegen-interactive.d.ts.map +0 -1
  384. package/dist/main/interactive/codegen-interactive.test.d.ts +0 -5
  385. package/dist/main/interactive/codegen-interactive.test.js +0 -73
  386. package/dist/main/interactive/codegen-interactive.test.js.map +0 -1
  387. package/dist/main/interactive/codegen-worker.d.ts.map +0 -1
  388. package/dist/main/interactive/common.d.ts.map +0 -1
  389. package/dist/main/interactive/configure.d.ts.map +0 -1
  390. package/dist/main/interactive/error-handling.d.ts.map +0 -1
  391. package/dist/main/interactive/help.d.ts.map +0 -1
  392. package/dist/main/interactive/process-comments.d.ts +0 -2
  393. package/dist/main/interactive/process-comments.js +0 -39
  394. package/dist/main/interactive/process-comments.js.map +0 -1
  395. package/dist/main/interactive/select-ai-service.d.ts.map +0 -1
  396. package/dist/main/interactive/task-file.d.ts.map +0 -1
  397. package/dist/main/interactive/text-prompt.d.ts.map +0 -1
  398. package/dist/main/interactive/user-action-handlers.d.ts.map +0 -1
  399. package/dist/main/interactive/user-interrupt.d.ts.map +0 -1
  400. package/dist/main/plugin-loader.d.ts.map +0 -1
  401. package/dist/main/ui/backend/api-utils.d.ts.map +0 -1
  402. package/dist/main/ui/backend/api.d.ts.map +0 -1
  403. package/dist/main/ui/backend/server.d.ts.map +0 -1
  404. package/dist/main/ui/backend/service.d.ts.map +0 -1
  405. package/dist/main/ui/codegen-ui.d.ts.map +0 -1
  406. package/dist/main/ui/common/api-types.d.ts.map +0 -1
  407. package/dist/main/ui/frontend/assets/index-BAAQr5b1.js +0 -1747
  408. package/dist/main/ui/user-action-handlers.d.ts.map +0 -1
  409. package/dist/operations/create-directory/create-directory-def.d.ts.map +0 -1
  410. package/dist/operations/create-directory/create-directory-executor.d.ts.map +0 -1
  411. package/dist/operations/create-file/create-file-def.d.ts.map +0 -1
  412. package/dist/operations/create-file/create-file-executor.d.ts.map +0 -1
  413. package/dist/operations/delete-file/delete-file-def.d.ts.map +0 -1
  414. package/dist/operations/delete-file/delete-file-executor.d.ts.map +0 -1
  415. package/dist/operations/download-file/download-file-def.d.ts.map +0 -1
  416. package/dist/operations/download-file/download-file-executor.d.ts.map +0 -1
  417. package/dist/operations/imgly-remove-background/imgly-remove-background-def.d.ts.map +0 -1
  418. package/dist/operations/imgly-remove-background/imgly-remove-background-executor.d.ts.map +0 -1
  419. package/dist/operations/move-file/move-file-def.d.ts.map +0 -1
  420. package/dist/operations/move-file/move-file-executor.d.ts.map +0 -1
  421. package/dist/operations/operations-index.d.ts.map +0 -1
  422. package/dist/operations/patch-file/patch-file-def.d.ts.map +0 -1
  423. package/dist/operations/patch-file/patch-file-executor.d.ts.map +0 -1
  424. package/dist/operations/resize-image/resize-image-def.d.ts.map +0 -1
  425. package/dist/operations/resize-image/resize-image-executor.d.ts.map +0 -1
  426. package/dist/operations/split-image/split-image-def.d.ts.map +0 -1
  427. package/dist/operations/split-image/split-image-executor.d.ts.map +0 -1
  428. package/dist/operations/update-file/update-file-def.d.ts.map +0 -1
  429. package/dist/operations/update-file/update-file-executor.d.ts.map +0 -1
  430. package/dist/project-profiles/detection.d.ts.map +0 -1
  431. package/dist/project-profiles/index.d.ts.map +0 -1
  432. package/dist/project-profiles/profiles/golang.d.ts.map +0 -1
  433. package/dist/project-profiles/profiles/java-maven.d.ts.map +0 -1
  434. package/dist/project-profiles/profiles/javascript-npm.d.ts.map +0 -1
  435. package/dist/project-profiles/profiles/javascript-react.d.ts.map +0 -1
  436. package/dist/project-profiles/profiles/python-django.d.ts.map +0 -1
  437. package/dist/project-profiles/types.d.ts.map +0 -1
  438. package/dist/prompt/ai-service-fallback.d.ts.map +0 -1
  439. package/dist/prompt/function-calling-validate.d.ts.map +0 -1
  440. package/dist/prompt/function-calling.d.ts.map +0 -1
  441. package/dist/prompt/function-defs/ask-question-reflect.d.ts +0 -2
  442. package/dist/prompt/function-defs/ask-question-reflect.js +0 -21
  443. package/dist/prompt/function-defs/ask-question-reflect.js.map +0 -1
  444. package/dist/prompt/function-defs/ask-question.d.ts.map +0 -1
  445. package/dist/prompt/function-defs/codegen-planning.d.ts.map +0 -1
  446. package/dist/prompt/function-defs/codegen-summary.d.ts.map +0 -1
  447. package/dist/prompt/function-defs/create-directory.d.ts +0 -21
  448. package/dist/prompt/function-defs/create-directory.js +0 -22
  449. package/dist/prompt/function-defs/create-directory.js.map +0 -1
  450. package/dist/prompt/function-defs/create-file.d.ts +0 -25
  451. package/dist/prompt/function-defs/create-file.js +0 -26
  452. package/dist/prompt/function-defs/create-file.js.map +0 -1
  453. package/dist/prompt/function-defs/delete-file.d.ts +0 -21
  454. package/dist/prompt/function-defs/delete-file.js +0 -22
  455. package/dist/prompt/function-defs/delete-file.js.map +0 -1
  456. package/dist/prompt/function-defs/download-file.d.ts +0 -25
  457. package/dist/prompt/function-defs/download-file.js +0 -26
  458. package/dist/prompt/function-defs/download-file.js.map +0 -1
  459. package/dist/prompt/function-defs/explanation.d.ts.map +0 -1
  460. package/dist/prompt/function-defs/generate-image.d.ts.map +0 -1
  461. package/dist/prompt/function-defs/get-image-assets.d.ts.map +0 -1
  462. package/dist/prompt/function-defs/get-source-code.d.ts.map +0 -1
  463. package/dist/prompt/function-defs/imgly-remove-background.d.ts +0 -25
  464. package/dist/prompt/function-defs/imgly-remove-background.js +0 -26
  465. package/dist/prompt/function-defs/imgly-remove-background.js.map +0 -1
  466. package/dist/prompt/function-defs/move-file.d.ts +0 -25
  467. package/dist/prompt/function-defs/move-file.js +0 -26
  468. package/dist/prompt/function-defs/move-file.js.map +0 -1
  469. package/dist/prompt/function-defs/optimize-context.d.ts.map +0 -1
  470. package/dist/prompt/function-defs/patch-file.d.ts +0 -25
  471. package/dist/prompt/function-defs/patch-file.js +0 -39
  472. package/dist/prompt/function-defs/patch-file.js.map +0 -1
  473. package/dist/prompt/function-defs/read-history.d.ts.map +0 -1
  474. package/dist/prompt/function-defs/resize-image.d.ts +0 -36
  475. package/dist/prompt/function-defs/resize-image.js +0 -37
  476. package/dist/prompt/function-defs/resize-image.js.map +0 -1
  477. package/dist/prompt/function-defs/set-summaries.d.ts.map +0 -1
  478. package/dist/prompt/function-defs/split-image.d.ts +0 -57
  479. package/dist/prompt/function-defs/split-image.js +0 -46
  480. package/dist/prompt/function-defs/split-image.js.map +0 -1
  481. package/dist/prompt/function-defs/update-file.d.ts +0 -25
  482. package/dist/prompt/function-defs/update-file.js +0 -26
  483. package/dist/prompt/function-defs/update-file.js.map +0 -1
  484. package/dist/prompt/function-defs/update-history.d.ts.map +0 -1
  485. package/dist/prompt/limits.d.ts.map +0 -1
  486. package/dist/prompt/limits.test.d.ts +0 -1
  487. package/dist/prompt/limits.test.js +0 -35
  488. package/dist/prompt/limits.test.js.map +0 -1
  489. package/dist/prompt/prompt-codegen.d.ts.map +0 -1
  490. package/dist/prompt/prompt-codegen.test.d.ts +0 -1
  491. package/dist/prompt/prompt-codegen.test.js +0 -92
  492. package/dist/prompt/prompt-codegen.test.js.map +0 -1
  493. package/dist/prompt/prompt-consts.d.ts +0 -1
  494. package/dist/prompt/prompt-consts.js +0 -2
  495. package/dist/prompt/prompt-consts.js.map +0 -1
  496. package/dist/prompt/prompt-service-ask-question.test.d.ts +0 -4
  497. package/dist/prompt/prompt-service-ask-question.test.js +0 -162
  498. package/dist/prompt/prompt-service-ask-question.test.js.map +0 -1
  499. package/dist/prompt/prompt-service.ai-services.test.d.ts +0 -1
  500. package/dist/prompt/prompt-service.ai-services.test.js +0 -149
  501. package/dist/prompt/prompt-service.ai-services.test.js.map +0 -1
  502. package/dist/prompt/prompt-service.context-optimization.test.d.ts +0 -1
  503. package/dist/prompt/prompt-service.context-optimization.test.js +0 -212
  504. package/dist/prompt/prompt-service.context-optimization.test.js.map +0 -1
  505. package/dist/prompt/prompt-service.d.ts.map +0 -1
  506. package/dist/prompt/prompt-service.image-handling.test.d.ts +0 -1
  507. package/dist/prompt/prompt-service.image-handling.test.js +0 -212
  508. package/dist/prompt/prompt-service.image-handling.test.js.map +0 -1
  509. package/dist/prompt/prompt-service.test-utils.d.ts.map +0 -1
  510. package/dist/prompt/prompt-service.test.d.ts +0 -2
  511. package/dist/prompt/prompt-service.test.js +0 -629
  512. package/dist/prompt/prompt-service.test.js.map +0 -1
  513. package/dist/prompt/prompt-service.validation-recovery.test.d.ts +0 -1
  514. package/dist/prompt/prompt-service.validation-recovery.test.js +0 -263
  515. package/dist/prompt/prompt-service.validation-recovery.test.js.map +0 -1
  516. package/dist/prompt/static-prompts.d.ts.map +0 -1
  517. package/dist/prompt/steps/step-ask-question/handlers/cancel-code-generation.d.ts +0 -2
  518. package/dist/prompt/steps/step-ask-question/handlers/cancel-code-generation.d.ts.map +0 -1
  519. package/dist/prompt/steps/step-ask-question/handlers/cancel-code-generation.js.map +0 -1
  520. package/dist/prompt/steps/step-ask-question/handlers/code-generation.d.ts.map +0 -1
  521. package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.d.ts.map +0 -1
  522. package/dist/prompt/steps/step-ask-question/handlers/context-optimization.d.ts.map +0 -1
  523. package/dist/prompt/steps/step-ask-question/handlers/default-action.d.ts +0 -2
  524. package/dist/prompt/steps/step-ask-question/handlers/default-action.d.ts.map +0 -1
  525. package/dist/prompt/steps/step-ask-question/handlers/default-action.js +0 -15
  526. package/dist/prompt/steps/step-ask-question/handlers/default-action.js.map +0 -1
  527. package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer-with-image.d.ts +0 -2
  528. package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer-with-image.js +0 -86
  529. package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer-with-image.js.map +0 -1
  530. package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer.d.ts +0 -2
  531. package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer.js +0 -20
  532. package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer.js.map +0 -1
  533. package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.d.ts.map +0 -1
  534. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message-with-image.d.ts +0 -2
  535. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message-with-image.d.ts.map +0 -1
  536. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message-with-image.js.map +0 -1
  537. package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.d.ts.map +0 -1
  538. package/dist/prompt/steps/step-ask-question/handlers/handler-utils.d.ts +0 -0
  539. package/dist/prompt/steps/step-ask-question/handlers/handler-utils.js +0 -2
  540. package/dist/prompt/steps/step-ask-question/handlers/handler-utils.js.map +0 -1
  541. package/dist/prompt/steps/step-ask-question/handlers/lint.d.ts.map +0 -1
  542. package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.d.ts.map +0 -1
  543. package/dist/prompt/steps/step-ask-question/handlers/request-files-content.d.ts.map +0 -1
  544. package/dist/prompt/steps/step-ask-question/handlers/request-permissions.d.ts.map +0 -1
  545. package/dist/prompt/steps/step-ask-question/handlers/start-code-generation.d.ts +0 -2
  546. package/dist/prompt/steps/step-ask-question/handlers/start-code-generation.js +0 -16
  547. package/dist/prompt/steps/step-ask-question/handlers/start-code-generation.js.map +0 -1
  548. package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.d.ts +0 -0
  549. package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js +0 -2
  550. package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js.map +0 -1
  551. package/dist/prompt/steps/step-ask-question/step-ask-question-reflect.d.ts +0 -4
  552. package/dist/prompt/steps/step-ask-question/step-ask-question-reflect.js +0 -92
  553. package/dist/prompt/steps/step-ask-question/step-ask-question-reflect.js.map +0 -1
  554. package/dist/prompt/steps/step-ask-question/step-ask-question-types.d.ts.map +0 -1
  555. package/dist/prompt/steps/step-ask-question/step-ask-question.d.ts.map +0 -1
  556. package/dist/prompt/steps/step-ask-question-handlers.d.ts +0 -10
  557. package/dist/prompt/steps/step-ask-question-handlers.js +0 -257
  558. package/dist/prompt/steps/step-ask-question-handlers.js.map +0 -1
  559. package/dist/prompt/steps/step-ask-question-reflect.d.ts +0 -4
  560. package/dist/prompt/steps/step-ask-question-reflect.js +0 -48
  561. package/dist/prompt/steps/step-ask-question-reflect.js.map +0 -1
  562. package/dist/prompt/steps/step-ask-question-types.d.ts +0 -55
  563. package/dist/prompt/steps/step-ask-question-types.js +0 -2
  564. package/dist/prompt/steps/step-ask-question-types.js.map +0 -1
  565. package/dist/prompt/steps/step-ask-question.d.ts +0 -6
  566. package/dist/prompt/steps/step-ask-question.js +0 -80
  567. package/dist/prompt/steps/step-ask-question.js.map +0 -1
  568. package/dist/prompt/steps/step-codegen-planning.d.ts.map +0 -1
  569. package/dist/prompt/steps/step-codegen-summary.d.ts +0 -7
  570. package/dist/prompt/steps/step-codegen-summary.d.ts.map +0 -1
  571. package/dist/prompt/steps/step-codegen-summary.js +0 -106
  572. package/dist/prompt/steps/step-codegen-summary.js.map +0 -1
  573. package/dist/prompt/steps/step-codegen-summary.test.d.ts +0 -1
  574. package/dist/prompt/steps/step-codegen-summary.test.js +0 -136
  575. package/dist/prompt/steps/step-codegen-summary.test.js.map +0 -1
  576. package/dist/prompt/steps/step-context-optimization.d.ts.map +0 -1
  577. package/dist/prompt/steps/step-context-optimization.test.d.ts +0 -2
  578. package/dist/prompt/steps/step-context-optimization.test.js +0 -475
  579. package/dist/prompt/steps/step-context-optimization.test.js.map +0 -1
  580. package/dist/prompt/steps/step-ensure-context.d.ts.map +0 -1
  581. package/dist/prompt/steps/step-ensure-context.test.d.ts +0 -1
  582. package/dist/prompt/steps/step-ensure-context.test.js +0 -326
  583. package/dist/prompt/steps/step-ensure-context.test.js.map +0 -1
  584. package/dist/prompt/steps/step-generate-image.d.ts.map +0 -1
  585. package/dist/prompt/steps/step-generate-summary.d.ts.map +0 -1
  586. package/dist/prompt/steps/step-history-update.d.ts.map +0 -1
  587. package/dist/prompt/steps/step-summarization.d.ts.map +0 -1
  588. package/dist/prompt/steps/step-validate-recover.d.ts.map +0 -1
  589. package/dist/prompt/steps/step-verify-patch.d.ts.map +0 -1
  590. package/dist/prompt/steps/steps-types.d.ts.map +0 -1
  591. package/dist/prompt/steps/steps-utils.d.ts.map +0 -1
  592. package/dist/prompt/systemprompt.d.ts.map +0 -1
  593. package/dist/prompt/systemprompt.test.d.ts +0 -3
  594. package/dist/prompt/systemprompt.test.js +0 -42
  595. package/dist/prompt/systemprompt.test.js.map +0 -1
  596. package/dist/prompt/token-estimator.d.ts.map +0 -1
  597. package/dist/src/ai-service/ai-studio.d.ts +0 -6
  598. package/dist/src/ai-service/ai-studio.js +0 -190
  599. package/dist/src/ai-service/ai-studio.js.map +0 -1
  600. package/dist/src/ai-service/anthropic.d.ts +0 -6
  601. package/dist/src/ai-service/anthropic.js +0 -150
  602. package/dist/src/ai-service/anthropic.js.map +0 -1
  603. package/dist/src/ai-service/chat-gpt.d.ts +0 -5
  604. package/dist/src/ai-service/chat-gpt.js +0 -146
  605. package/dist/src/ai-service/chat-gpt.js.map +0 -1
  606. package/dist/src/ai-service/common.js +0 -38
  607. package/dist/src/ai-service/common.js.map +0 -1
  608. package/dist/src/ai-service/common.test.d.ts +0 -1
  609. package/dist/src/ai-service/common.test.js +0 -86
  610. package/dist/src/ai-service/common.test.js.map +0 -1
  611. package/dist/src/ai-service/dall-e.d.ts +0 -14
  612. package/dist/src/ai-service/dall-e.js +0 -50
  613. package/dist/src/ai-service/dall-e.js.map +0 -1
  614. package/dist/src/ai-service/unescape-function-call.d.ts +0 -7
  615. package/dist/src/ai-service/unescape-function-call.js +0 -59
  616. package/dist/src/ai-service/unescape-function-call.js.map +0 -1
  617. package/dist/src/ai-service/unescape-function-call.test.d.ts +0 -1
  618. package/dist/src/ai-service/unescape-function-call.test.js +0 -18
  619. package/dist/src/ai-service/unescape-function-call.test.js.map +0 -1
  620. package/dist/src/ai-service/vertex-ai-claude.d.ts +0 -5
  621. package/dist/src/ai-service/vertex-ai-claude.js +0 -104
  622. package/dist/src/ai-service/vertex-ai-claude.js.map +0 -1
  623. package/dist/src/ai-service/vertex-ai-imagen.d.ts +0 -14
  624. package/dist/src/ai-service/vertex-ai-imagen.js +0 -77
  625. package/dist/src/ai-service/vertex-ai-imagen.js.map +0 -1
  626. package/dist/src/ai-service/vertex-ai.d.ts +0 -6
  627. package/dist/src/ai-service/vertex-ai.js +0 -202
  628. package/dist/src/ai-service/vertex-ai.js.map +0 -1
  629. package/dist/src/cli/cli-options.d.ts +0 -10
  630. package/dist/src/cli/cli-options.js +0 -132
  631. package/dist/src/cli/cli-options.js.map +0 -1
  632. package/dist/src/cli/cli-options.test.d.ts +0 -1
  633. package/dist/src/cli/cli-options.test.js +0 -34
  634. package/dist/src/cli/cli-options.test.js.map +0 -1
  635. package/dist/src/cli/cli-params.d.ts +0 -32
  636. package/dist/src/cli/cli-params.js +0 -106
  637. package/dist/src/cli/cli-params.js.map +0 -1
  638. package/dist/src/cli/cli-params.test.d.ts +0 -1
  639. package/dist/src/cli/cli-params.test.js +0 -38
  640. package/dist/src/cli/cli-params.test.js.map +0 -1
  641. package/dist/src/cli/service-autodetect.d.ts +0 -2
  642. package/dist/src/cli/service-autodetect.js +0 -17
  643. package/dist/src/cli/service-autodetect.js.map +0 -1
  644. package/dist/src/cli/service-autodetect.test.d.ts +0 -1
  645. package/dist/src/cli/service-autodetect.test.js +0 -38
  646. package/dist/src/cli/service-autodetect.test.js.map +0 -1
  647. package/dist/src/cli/validate-cli-params.d.ts +0 -18
  648. package/dist/src/cli/validate-cli-params.js +0 -145
  649. package/dist/src/cli/validate-cli-params.js.map +0 -1
  650. package/dist/src/cli/validate-cli-params.test.d.ts +0 -1
  651. package/dist/src/cli/validate-cli-params.test.js +0 -106
  652. package/dist/src/cli/validate-cli-params.test.js.map +0 -1
  653. package/dist/src/files/cache-file.d.ts +0 -3
  654. package/dist/src/files/cache-file.js +0 -36
  655. package/dist/src/files/cache-file.js.map +0 -1
  656. package/dist/src/files/file-utils.d.ts +0 -2
  657. package/dist/src/files/file-utils.js +0 -7
  658. package/dist/src/files/file-utils.js.map +0 -1
  659. package/dist/src/files/file-utils.test.d.ts +0 -1
  660. package/dist/src/files/file-utils.test.js +0 -18
  661. package/dist/src/files/file-utils.test.js.map +0 -1
  662. package/dist/src/files/find-files.d.ts +0 -9
  663. package/dist/src/files/find-files.js +0 -81
  664. package/dist/src/files/find-files.js.map +0 -1
  665. package/dist/src/files/path-utils.d.ts +0 -1
  666. package/dist/src/files/path-utils.js +0 -12
  667. package/dist/src/files/path-utils.js.map +0 -1
  668. package/dist/src/files/read-files.d.ts +0 -21
  669. package/dist/src/files/read-files.js +0 -68
  670. package/dist/src/files/read-files.js.map +0 -1
  671. package/dist/src/files/read-files.test.d.ts +0 -1
  672. package/dist/src/files/read-files.test.js +0 -89
  673. package/dist/src/files/read-files.test.js.map +0 -1
  674. package/dist/src/files/temp-buffer.d.ts +0 -2
  675. package/dist/src/files/temp-buffer.js +0 -12
  676. package/dist/src/files/temp-buffer.js.map +0 -1
  677. package/dist/src/files/update-files.d.ts +0 -6
  678. package/dist/src/files/update-files.js +0 -19
  679. package/dist/src/files/update-files.js.map +0 -1
  680. package/dist/src/images/ensure-alpha.d.ts +0 -1
  681. package/dist/src/images/ensure-alpha.js +0 -5
  682. package/dist/src/images/ensure-alpha.js.map +0 -1
  683. package/dist/src/images/imgly-remove-background.d.ts +0 -2
  684. package/dist/src/images/imgly-remove-background.js +0 -21
  685. package/dist/src/images/imgly-remove-background.js.map +0 -1
  686. package/dist/src/images/resize-image.d.ts +0 -19
  687. package/dist/src/images/resize-image.js +0 -22
  688. package/dist/src/images/resize-image.js.map +0 -1
  689. package/dist/src/images/split-image.d.ts +0 -18
  690. package/dist/src/images/split-image.js +0 -25
  691. package/dist/src/images/split-image.js.map +0 -1
  692. package/dist/src/index.d.ts +0 -3
  693. package/dist/src/index.js +0 -3
  694. package/dist/src/index.js.map +0 -1
  695. package/dist/src/main/codegen-types.d.ts +0 -58
  696. package/dist/src/main/codegen-types.js +0 -2
  697. package/dist/src/main/codegen-types.js.map +0 -1
  698. package/dist/src/main/codegen-utils.d.ts +0 -3
  699. package/dist/src/main/codegen-utils.js +0 -18
  700. package/dist/src/main/codegen-utils.js.map +0 -1
  701. package/dist/src/main/codegen.d.ts +0 -4
  702. package/dist/src/main/codegen.js +0 -201
  703. package/dist/src/main/codegen.js.map +0 -1
  704. package/dist/src/main/codegen.test.d.ts +0 -3
  705. package/dist/src/main/codegen.test.js +0 -288
  706. package/dist/src/main/codegen.test.js.map +0 -1
  707. package/dist/src/main/common/content-bus-types.d.ts +0 -21
  708. package/dist/src/main/common/content-bus-types.js +0 -11
  709. package/dist/src/main/common/content-bus-types.js.map +0 -1
  710. package/dist/src/main/common/content-bus.d.ts +0 -10
  711. package/dist/src/main/common/content-bus.js +0 -39
  712. package/dist/src/main/common/content-bus.js.map +0 -1
  713. package/dist/src/main/common/cost-collector.d.ts +0 -11
  714. package/dist/src/main/common/cost-collector.js +0 -90
  715. package/dist/src/main/common/cost-collector.js.map +0 -1
  716. package/dist/src/main/common/user-actions.d.ts +0 -19
  717. package/dist/src/main/common/user-actions.js +0 -30
  718. package/dist/src/main/common/user-actions.js.map +0 -1
  719. package/dist/src/main/config-lib.d.ts +0 -36
  720. package/dist/src/main/config-lib.js +0 -51
  721. package/dist/src/main/config-lib.js.map +0 -1
  722. package/dist/src/main/config-lib.test.d.ts +0 -1
  723. package/dist/src/main/config-lib.test.js +0 -64
  724. package/dist/src/main/config-lib.test.js.map +0 -1
  725. package/dist/src/main/config.d.ts +0 -7
  726. package/dist/src/main/config.js +0 -51
  727. package/dist/src/main/config.js.map +0 -1
  728. package/dist/src/main/interactive/codegen-interactive.d.ts +0 -2
  729. package/dist/src/main/interactive/codegen-interactive.js +0 -61
  730. package/dist/src/main/interactive/codegen-interactive.js.map +0 -1
  731. package/dist/src/main/interactive/codegen-interactive.test.d.ts +0 -5
  732. package/dist/src/main/interactive/codegen-interactive.test.js +0 -79
  733. package/dist/src/main/interactive/codegen-interactive.test.js.map +0 -1
  734. package/dist/src/main/interactive/codegen-worker.d.ts +0 -3
  735. package/dist/src/main/interactive/codegen-worker.js +0 -54
  736. package/dist/src/main/interactive/codegen-worker.js.map +0 -1
  737. package/dist/src/main/interactive/common.d.ts +0 -5
  738. package/dist/src/main/interactive/common.js +0 -51
  739. package/dist/src/main/interactive/common.js.map +0 -1
  740. package/dist/src/main/interactive/configure.d.ts +0 -2
  741. package/dist/src/main/interactive/configure.js +0 -99
  742. package/dist/src/main/interactive/configure.js.map +0 -1
  743. package/dist/src/main/interactive/error-handling.d.ts +0 -1
  744. package/dist/src/main/interactive/error-handling.js +0 -43
  745. package/dist/src/main/interactive/error-handling.js.map +0 -1
  746. package/dist/src/main/interactive/help.d.ts +0 -1
  747. package/dist/src/main/interactive/help.js +0 -22
  748. package/dist/src/main/interactive/help.js.map +0 -1
  749. package/dist/src/main/interactive/process-comments.d.ts +0 -2
  750. package/dist/src/main/interactive/process-comments.js +0 -39
  751. package/dist/src/main/interactive/process-comments.js.map +0 -1
  752. package/dist/src/main/interactive/select-ai-service.d.ts +0 -2
  753. package/dist/src/main/interactive/select-ai-service.js +0 -27
  754. package/dist/src/main/interactive/select-ai-service.js.map +0 -1
  755. package/dist/src/main/interactive/task-file.d.ts +0 -2
  756. package/dist/src/main/interactive/task-file.js +0 -35
  757. package/dist/src/main/interactive/task-file.js.map +0 -1
  758. package/dist/src/main/interactive/text-prompt.d.ts +0 -2
  759. package/dist/src/main/interactive/text-prompt.js +0 -18
  760. package/dist/src/main/interactive/text-prompt.js.map +0 -1
  761. package/dist/src/main/interactive/user-action-handlers.d.ts +0 -1
  762. package/dist/src/main/interactive/user-action-handlers.js +0 -13
  763. package/dist/src/main/interactive/user-action-handlers.js.map +0 -1
  764. package/dist/src/main/interactive/user-interrupt.d.ts +0 -1
  765. package/dist/src/main/interactive/user-interrupt.js +0 -36
  766. package/dist/src/main/interactive/user-interrupt.js.map +0 -1
  767. package/dist/src/main/plugin-loader.d.ts +0 -6
  768. package/dist/src/main/plugin-loader.js +0 -40
  769. package/dist/src/main/plugin-loader.js.map +0 -1
  770. package/dist/src/main/ui/backend/api-utils.d.ts +0 -2
  771. package/dist/src/main/ui/backend/api-utils.js +0 -18
  772. package/dist/src/main/ui/backend/api-utils.js.map +0 -1
  773. package/dist/src/main/ui/backend/api.d.ts +0 -2
  774. package/dist/src/main/ui/backend/api.js +0 -210
  775. package/dist/src/main/ui/backend/api.js.map +0 -1
  776. package/dist/src/main/ui/backend/server.d.ts +0 -7
  777. package/dist/src/main/ui/backend/server.js +0 -83
  778. package/dist/src/main/ui/backend/server.js.map +0 -1
  779. package/dist/src/main/ui/backend/service.d.ts +0 -44
  780. package/dist/src/main/ui/backend/service.js +0 -171
  781. package/dist/src/main/ui/backend/service.js.map +0 -1
  782. package/dist/src/main/ui/codegen-ui.d.ts +0 -2
  783. package/dist/src/main/ui/codegen-ui.js +0 -13
  784. package/dist/src/main/ui/codegen-ui.js.map +0 -1
  785. package/dist/src/main/ui/common/api-types.d.ts +0 -20
  786. package/dist/src/main/ui/common/api-types.js +0 -2
  787. package/dist/src/main/ui/common/api-types.js.map +0 -1
  788. package/dist/src/main/ui/user-action-handlers.d.ts +0 -2
  789. package/dist/src/main/ui/user-action-handlers.js +0 -14
  790. package/dist/src/main/ui/user-action-handlers.js.map +0 -1
  791. package/dist/src/operations/create-directory/create-directory-def.d.ts +0 -9
  792. package/dist/src/operations/create-directory/create-directory-def.js +0 -22
  793. package/dist/src/operations/create-directory/create-directory-def.js.map +0 -1
  794. package/dist/src/operations/create-directory/create-directory-executor.d.ts +0 -6
  795. package/dist/src/operations/create-directory/create-directory-executor.js +0 -22
  796. package/dist/src/operations/create-directory/create-directory-executor.js.map +0 -1
  797. package/dist/src/operations/create-file/create-file-def.d.ts +0 -10
  798. package/dist/src/operations/create-file/create-file-def.js +0 -26
  799. package/dist/src/operations/create-file/create-file-def.js.map +0 -1
  800. package/dist/src/operations/create-file/create-file-executor.d.ts +0 -6
  801. package/dist/src/operations/create-file/create-file-executor.js +0 -27
  802. package/dist/src/operations/create-file/create-file-executor.js.map +0 -1
  803. package/dist/src/operations/delete-file/delete-file-def.d.ts +0 -9
  804. package/dist/src/operations/delete-file/delete-file-def.js +0 -22
  805. package/dist/src/operations/delete-file/delete-file-def.js.map +0 -1
  806. package/dist/src/operations/delete-file/delete-file-executor.d.ts +0 -6
  807. package/dist/src/operations/delete-file/delete-file-executor.js +0 -23
  808. package/dist/src/operations/delete-file/delete-file-executor.js.map +0 -1
  809. package/dist/src/operations/download-file/download-file-def.d.ts +0 -10
  810. package/dist/src/operations/download-file/download-file-def.js +0 -26
  811. package/dist/src/operations/download-file/download-file-def.js.map +0 -1
  812. package/dist/src/operations/download-file/download-file-executor.d.ts +0 -6
  813. package/dist/src/operations/download-file/download-file-executor.js +0 -44
  814. package/dist/src/operations/download-file/download-file-executor.js.map +0 -1
  815. package/dist/src/operations/imgly-remove-background/imgly-remove-background-def.d.ts +0 -10
  816. package/dist/src/operations/imgly-remove-background/imgly-remove-background-def.js +0 -26
  817. package/dist/src/operations/imgly-remove-background/imgly-remove-background-def.js.map +0 -1
  818. package/dist/src/operations/imgly-remove-background/imgly-remove-background-executor.d.ts +0 -6
  819. package/dist/src/operations/imgly-remove-background/imgly-remove-background-executor.js +0 -40
  820. package/dist/src/operations/imgly-remove-background/imgly-remove-background-executor.js.map +0 -1
  821. package/dist/src/operations/move-file/move-file-def.d.ts +0 -10
  822. package/dist/src/operations/move-file/move-file-def.js +0 -26
  823. package/dist/src/operations/move-file/move-file-def.js.map +0 -1
  824. package/dist/src/operations/move-file/move-file-executor.d.ts +0 -6
  825. package/dist/src/operations/move-file/move-file-executor.js +0 -29
  826. package/dist/src/operations/move-file/move-file-executor.js.map +0 -1
  827. package/dist/src/operations/operations-index.d.ts +0 -3
  828. package/dist/src/operations/operations-index.js +0 -33
  829. package/dist/src/operations/operations-index.js.map +0 -1
  830. package/dist/src/operations/patch-file/patch-file-def.d.ts +0 -10
  831. package/dist/src/operations/patch-file/patch-file-def.js +0 -39
  832. package/dist/src/operations/patch-file/patch-file-def.js.map +0 -1
  833. package/dist/src/operations/patch-file/patch-file-executor.d.ts +0 -5
  834. package/dist/src/operations/patch-file/patch-file-executor.js +0 -26
  835. package/dist/src/operations/patch-file/patch-file-executor.js.map +0 -1
  836. package/dist/src/operations/resize-image/resize-image-def.d.ts +0 -13
  837. package/dist/src/operations/resize-image/resize-image-def.js +0 -37
  838. package/dist/src/operations/resize-image/resize-image-def.js.map +0 -1
  839. package/dist/src/operations/resize-image/resize-image-executor.d.ts +0 -5
  840. package/dist/src/operations/resize-image/resize-image-executor.js +0 -30
  841. package/dist/src/operations/resize-image/resize-image-executor.js.map +0 -1
  842. package/dist/src/operations/split-image/split-image-def.d.ts +0 -18
  843. package/dist/src/operations/split-image/split-image-def.js +0 -46
  844. package/dist/src/operations/split-image/split-image-def.js.map +0 -1
  845. package/dist/src/operations/split-image/split-image-executor.d.ts +0 -6
  846. package/dist/src/operations/split-image/split-image-executor.js +0 -51
  847. package/dist/src/operations/split-image/split-image-executor.js.map +0 -1
  848. package/dist/src/operations/update-file/update-file-def.d.ts +0 -10
  849. package/dist/src/operations/update-file/update-file-def.js +0 -26
  850. package/dist/src/operations/update-file/update-file-def.js.map +0 -1
  851. package/dist/src/operations/update-file/update-file-executor.d.ts +0 -5
  852. package/dist/src/operations/update-file/update-file-executor.js +0 -22
  853. package/dist/src/operations/update-file/update-file-executor.js.map +0 -1
  854. package/dist/src/prompt/ai-service-fallback.d.ts +0 -3
  855. package/dist/src/prompt/ai-service-fallback.js +0 -84
  856. package/dist/src/prompt/ai-service-fallback.js.map +0 -1
  857. package/dist/src/prompt/function-calling-validate.d.ts +0 -3
  858. package/dist/src/prompt/function-calling-validate.js +0 -99
  859. package/dist/src/prompt/function-calling-validate.js.map +0 -1
  860. package/dist/src/prompt/function-calling.d.ts +0 -5
  861. package/dist/src/prompt/function-calling.js +0 -43
  862. package/dist/src/prompt/function-calling.js.map +0 -1
  863. package/dist/src/prompt/function-defs/ask-question-reflect.d.ts +0 -2
  864. package/dist/src/prompt/function-defs/ask-question-reflect.js +0 -21
  865. package/dist/src/prompt/function-defs/ask-question-reflect.js.map +0 -1
  866. package/dist/src/prompt/function-defs/ask-question.d.ts +0 -8
  867. package/dist/src/prompt/function-defs/ask-question.js +0 -100
  868. package/dist/src/prompt/function-defs/ask-question.js.map +0 -1
  869. package/dist/src/prompt/function-defs/codegen-summary.d.ts +0 -5
  870. package/dist/src/prompt/function-defs/codegen-summary.js +0 -82
  871. package/dist/src/prompt/function-defs/codegen-summary.js.map +0 -1
  872. package/dist/src/prompt/function-defs/explanation.d.ts +0 -5
  873. package/dist/src/prompt/function-defs/explanation.js +0 -18
  874. package/dist/src/prompt/function-defs/explanation.js.map +0 -1
  875. package/dist/src/prompt/function-defs/generate-image.d.ts +0 -5
  876. package/dist/src/prompt/function-defs/generate-image.js +0 -42
  877. package/dist/src/prompt/function-defs/generate-image.js.map +0 -1
  878. package/dist/src/prompt/function-defs/get-image-assets.d.ts +0 -5
  879. package/dist/src/prompt/function-defs/get-image-assets.js +0 -21
  880. package/dist/src/prompt/function-defs/get-image-assets.js.map +0 -1
  881. package/dist/src/prompt/function-defs/get-source-code.d.ts +0 -5
  882. package/dist/src/prompt/function-defs/get-source-code.js +0 -22
  883. package/dist/src/prompt/function-defs/get-source-code.js.map +0 -1
  884. package/dist/src/prompt/function-defs/optimize-context.d.ts +0 -5
  885. package/dist/src/prompt/function-defs/optimize-context.js +0 -47
  886. package/dist/src/prompt/function-defs/optimize-context.js.map +0 -1
  887. package/dist/src/prompt/function-defs/read-history.d.ts +0 -2
  888. package/dist/src/prompt/function-defs/read-history.js +0 -14
  889. package/dist/src/prompt/function-defs/read-history.js.map +0 -1
  890. package/dist/src/prompt/function-defs/set-summaries.d.ts +0 -5
  891. package/dist/src/prompt/function-defs/set-summaries.js +0 -32
  892. package/dist/src/prompt/function-defs/set-summaries.js.map +0 -1
  893. package/dist/src/prompt/function-defs/update-history.d.ts +0 -5
  894. package/dist/src/prompt/function-defs/update-history.js +0 -22
  895. package/dist/src/prompt/function-defs/update-history.js.map +0 -1
  896. package/dist/src/prompt/limits.d.ts +0 -3
  897. package/dist/src/prompt/limits.js +0 -21
  898. package/dist/src/prompt/limits.js.map +0 -1
  899. package/dist/src/prompt/limits.test.d.ts +0 -1
  900. package/dist/src/prompt/limits.test.js +0 -35
  901. package/dist/src/prompt/limits.test.js.map +0 -1
  902. package/dist/src/prompt/prompt-codegen.d.ts +0 -9
  903. package/dist/src/prompt/prompt-codegen.js +0 -117
  904. package/dist/src/prompt/prompt-codegen.js.map +0 -1
  905. package/dist/src/prompt/prompt-codegen.test.d.ts +0 -1
  906. package/dist/src/prompt/prompt-codegen.test.js +0 -98
  907. package/dist/src/prompt/prompt-codegen.test.js.map +0 -1
  908. package/dist/src/prompt/prompt-consts.d.ts +0 -1
  909. package/dist/src/prompt/prompt-consts.js +0 -2
  910. package/dist/src/prompt/prompt-consts.js.map +0 -1
  911. package/dist/src/prompt/prompt-service-ask-question.test.d.ts +0 -4
  912. package/dist/src/prompt/prompt-service-ask-question.test.js +0 -215
  913. package/dist/src/prompt/prompt-service-ask-question.test.js.map +0 -1
  914. package/dist/src/prompt/prompt-service.d.ts +0 -5
  915. package/dist/src/prompt/prompt-service.js +0 -214
  916. package/dist/src/prompt/prompt-service.js.map +0 -1
  917. package/dist/src/prompt/prompt-service.test.d.ts +0 -2
  918. package/dist/src/prompt/prompt-service.test.js +0 -553
  919. package/dist/src/prompt/prompt-service.test.js.map +0 -1
  920. package/dist/src/prompt/steps/step-ask-question/handlers/cancel-code-generation.d.ts +0 -2
  921. package/dist/src/prompt/steps/step-ask-question/handlers/cancel-code-generation.js +0 -16
  922. package/dist/src/prompt/steps/step-ask-question/handlers/cancel-code-generation.js.map +0 -1
  923. package/dist/src/prompt/steps/step-ask-question/handlers/confirm-code-generation.d.ts +0 -2
  924. package/dist/src/prompt/steps/step-ask-question/handlers/confirm-code-generation.js +0 -37
  925. package/dist/src/prompt/steps/step-ask-question/handlers/confirm-code-generation.js.map +0 -1
  926. package/dist/src/prompt/steps/step-ask-question/handlers/context-optimization.d.ts +0 -2
  927. package/dist/src/prompt/steps/step-ask-question/handlers/context-optimization.js +0 -36
  928. package/dist/src/prompt/steps/step-ask-question/handlers/context-optimization.js.map +0 -1
  929. package/dist/src/prompt/steps/step-ask-question/handlers/default-action.d.ts +0 -2
  930. package/dist/src/prompt/steps/step-ask-question/handlers/default-action.js +0 -18
  931. package/dist/src/prompt/steps/step-ask-question/handlers/default-action.js.map +0 -1
  932. package/dist/src/prompt/steps/step-ask-question/handlers/handle-request-answer.d.ts +0 -2
  933. package/dist/src/prompt/steps/step-ask-question/handlers/handle-request-answer.js +0 -20
  934. package/dist/src/prompt/steps/step-ask-question/handlers/handle-request-answer.js.map +0 -1
  935. package/dist/src/prompt/steps/step-ask-question/handlers/remove-files-from-context.d.ts +0 -2
  936. package/dist/src/prompt/steps/step-ask-question/handlers/remove-files-from-context.js +0 -43
  937. package/dist/src/prompt/steps/step-ask-question/handlers/remove-files-from-context.js.map +0 -1
  938. package/dist/src/prompt/steps/step-ask-question/handlers/request-files-content.d.ts +0 -2
  939. package/dist/src/prompt/steps/step-ask-question/handlers/request-files-content.js +0 -49
  940. package/dist/src/prompt/steps/step-ask-question/handlers/request-files-content.js.map +0 -1
  941. package/dist/src/prompt/steps/step-ask-question/handlers/request-permissions.d.ts +0 -2
  942. package/dist/src/prompt/steps/step-ask-question/handlers/request-permissions.js +0 -46
  943. package/dist/src/prompt/steps/step-ask-question/handlers/request-permissions.js.map +0 -1
  944. package/dist/src/prompt/steps/step-ask-question/handlers/start-code-generation.d.ts +0 -2
  945. package/dist/src/prompt/steps/step-ask-question/handlers/start-code-generation.js +0 -16
  946. package/dist/src/prompt/steps/step-ask-question/handlers/start-code-generation.js.map +0 -1
  947. package/dist/src/prompt/steps/step-ask-question/step-ask-question-handlers.d.ts +0 -0
  948. package/dist/src/prompt/steps/step-ask-question/step-ask-question-handlers.js +0 -2
  949. package/dist/src/prompt/steps/step-ask-question/step-ask-question-handlers.js.map +0 -1
  950. package/dist/src/prompt/steps/step-ask-question/step-ask-question-reflect.d.ts +0 -4
  951. package/dist/src/prompt/steps/step-ask-question/step-ask-question-reflect.js +0 -91
  952. package/dist/src/prompt/steps/step-ask-question/step-ask-question-reflect.js.map +0 -1
  953. package/dist/src/prompt/steps/step-ask-question/step-ask-question-types.d.ts +0 -55
  954. package/dist/src/prompt/steps/step-ask-question/step-ask-question-types.js +0 -2
  955. package/dist/src/prompt/steps/step-ask-question/step-ask-question-types.js.map +0 -1
  956. package/dist/src/prompt/steps/step-ask-question/step-ask-question.d.ts +0 -6
  957. package/dist/src/prompt/steps/step-ask-question/step-ask-question.js +0 -88
  958. package/dist/src/prompt/steps/step-ask-question/step-ask-question.js.map +0 -1
  959. package/dist/src/prompt/steps/step-context-optimization.d.ts +0 -4
  960. package/dist/src/prompt/steps/step-context-optimization.js +0 -200
  961. package/dist/src/prompt/steps/step-context-optimization.js.map +0 -1
  962. package/dist/src/prompt/steps/step-generate-image.d.ts +0 -2
  963. package/dist/src/prompt/steps/step-generate-image.js +0 -29
  964. package/dist/src/prompt/steps/step-generate-image.js.map +0 -1
  965. package/dist/src/prompt/steps/step-generate-summary.d.ts +0 -3
  966. package/dist/src/prompt/steps/step-generate-summary.js +0 -41
  967. package/dist/src/prompt/steps/step-generate-summary.js.map +0 -1
  968. package/dist/src/prompt/steps/step-history-update.d.ts +0 -5
  969. package/dist/src/prompt/steps/step-history-update.js +0 -54
  970. package/dist/src/prompt/steps/step-history-update.js.map +0 -1
  971. package/dist/src/prompt/steps/step-summarization.d.ts +0 -8
  972. package/dist/src/prompt/steps/step-summarization.js +0 -75
  973. package/dist/src/prompt/steps/step-summarization.js.map +0 -1
  974. package/dist/src/prompt/steps/step-validate-recover.d.ts +0 -2
  975. package/dist/src/prompt/steps/step-validate-recover.js +0 -51
  976. package/dist/src/prompt/steps/step-validate-recover.js.map +0 -1
  977. package/dist/src/prompt/steps/step-verify-patch.d.ts +0 -6
  978. package/dist/src/prompt/steps/step-verify-patch.js +0 -34
  979. package/dist/src/prompt/steps/step-verify-patch.js.map +0 -1
  980. package/dist/src/prompt/steps/steps-types.d.ts +0 -16
  981. package/dist/src/prompt/steps/steps-types.js +0 -6
  982. package/dist/src/prompt/steps/steps-types.js.map +0 -1
  983. package/dist/src/prompt/steps/steps-utils.d.ts +0 -7
  984. package/dist/src/prompt/steps/steps-utils.js +0 -11
  985. package/dist/src/prompt/steps/steps-utils.js.map +0 -1
  986. package/dist/src/prompt/systemprompt.d.ts +0 -3
  987. package/dist/src/prompt/systemprompt.js +0 -209
  988. package/dist/src/prompt/systemprompt.js.map +0 -1
  989. package/dist/src/prompt/systemprompt.test.d.ts +0 -3
  990. package/dist/src/prompt/systemprompt.test.js +0 -43
  991. package/dist/src/prompt/systemprompt.test.js.map +0 -1
  992. package/dist/src/prompt/token-estimator.d.ts +0 -8
  993. package/dist/src/prompt/token-estimator.js +0 -31
  994. package/dist/src/prompt/token-estimator.js.map +0 -1
  995. package/dist/src/vite-genaicode/vite-genaicode-frontend.d.ts +0 -1
  996. package/dist/src/vite-genaicode/vite-genaicode-frontend.js +0 -142
  997. package/dist/src/vite-genaicode/vite-genaicode-frontend.js.map +0 -1
  998. package/dist/src/vite-genaicode/vite-genaicode-plugin.d.ts +0 -7
  999. package/dist/src/vite-genaicode/vite-genaicode-plugin.js +0 -40
  1000. package/dist/src/vite-genaicode/vite-genaicode-plugin.js.map +0 -1
  1001. package/dist/vite-genaicode/vite-genaicode-frontend.d.ts.map +0 -1
  1002. package/dist/vite-genaicode/vite-genaicode-plugin.d.ts.map +0 -1
  1003. /package/dist/{ai-service/common.test.d.ts → main/ui/backend/endpoints/context-endpoint.d.ts} +0 -0
@@ -1,26 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
- import assert from 'node:assert';
4
- import * as diff from 'diff';
5
- import { rcConfig } from '../../main/config.js';
6
- import { isProjectPath } from '../../files/path-utils.js';
7
- import { patchFileDef } from './patch-file-def.js';
8
- async function executePatchFile(args) {
9
- const { filePath, patch } = args;
10
- assert(filePath, 'filePath must not be empty');
11
- assert(patch, 'patch must not be empty');
12
- const absoluteFilePath = path.isAbsolute(filePath) ? filePath : path.join(rcConfig.rootDir, filePath);
13
- if (!isProjectPath(absoluteFilePath)) {
14
- console.log(`Skipping file: ${absoluteFilePath}`);
15
- throw new Error(`File ${absoluteFilePath} is not located inside project directory, something is wrong?`);
16
- }
17
- console.log(`Applying a patch: ${absoluteFilePath} content`);
18
- assert(fs.existsSync(absoluteFilePath), 'File does not exist');
19
- const originalContent = fs.readFileSync(absoluteFilePath, 'utf-8');
20
- const newContent = diff.applyPatch(originalContent, patch);
21
- assert(newContent !== false, 'Patch was not successful');
22
- fs.writeFileSync(absoluteFilePath, newContent, 'utf-8');
23
- }
24
- export const executor = executePatchFile;
25
- export const def = patchFileDef;
26
- //# sourceMappingURL=patch-file-executor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"patch-file-executor.js","sourceRoot":"","sources":["../../../../src/operations/patch-file/patch-file-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAElE,KAAK,UAAU,gBAAgB,CAAC,IAAmB;IACjD,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,IAAI,CAAC;IAEjC,MAAM,CAAC,QAAQ,EAAE,4BAA4B,CAAC,CAAC;IAC/C,MAAM,CAAC,KAAK,EAAE,yBAAyB,CAAC,CAAC;IAEzC,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEtG,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,kBAAkB,gBAAgB,EAAE,CAAC,CAAC;QAClD,MAAM,IAAI,KAAK,CAAC,QAAQ,gBAAgB,+DAA+D,CAAC,CAAC;IAC3G,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,qBAAqB,gBAAgB,UAAU,CAAC,CAAC;IAC7D,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,qBAAqB,CAAC,CAAC;IAE/D,MAAM,eAAe,GAAG,EAAE,CAAC,YAAY,CAAC,gBAAgB,EAAE,OAAO,CAAC,CAAC;IACnE,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,CAAC,eAAe,EAAE,KAAK,CAAC,CAAC;IAE3D,MAAM,CAAC,UAAU,KAAK,KAAK,EAAE,0BAA0B,CAAC,CAAC;IAEzD,EAAE,CAAC,aAAa,CAAC,gBAAgB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,gBAAgB,CAAC;AACzC,MAAM,CAAC,MAAM,GAAG,GAAG,YAAY,CAAC"}
@@ -1,13 +0,0 @@
1
- import { FunctionDef } from '../../ai-service/common';
2
- /**
3
- * Function definition for resizeImage
4
- */
5
- export declare const resizeImageDef: FunctionDef;
6
- export type ResizeImageArgs = {
7
- filePath: string;
8
- size: {
9
- width: number;
10
- height: number;
11
- };
12
- explanation?: string;
13
- };
@@ -1,37 +0,0 @@
1
- /**
2
- * Function definition for resizeImage
3
- */
4
- export const resizeImageDef = {
5
- name: 'resizeImage',
6
- description: 'Resize image to the desired size',
7
- parameters: {
8
- type: 'object',
9
- properties: {
10
- filePath: {
11
- type: 'string',
12
- description: 'The file path of the image.',
13
- },
14
- size: {
15
- type: 'object',
16
- properties: {
17
- width: {
18
- type: 'number',
19
- description: 'width of the image',
20
- },
21
- height: {
22
- type: 'number',
23
- description: 'height of the image',
24
- },
25
- },
26
- required: ['width', 'height'],
27
- description: 'The size of the image to generate.',
28
- },
29
- explanation: {
30
- type: 'string',
31
- description: 'The explanation of the reasoning behind resizing this image',
32
- },
33
- },
34
- required: ['filePath', 'size'],
35
- },
36
- };
37
- //# sourceMappingURL=resize-image-def.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resize-image-def.js","sourceRoot":"","sources":["../../../../src/operations/resize-image/resize-image-def.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,kCAAkC;IAC/C,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,oBAAoB;qBAClC;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,qBAAqB;qBACnC;iBACF;gBACD,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;gBAC7B,WAAW,EAAE,oCAAoC;aAClD;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6DAA6D;aAC3E;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,MAAM,CAAC;KAC/B;CACF,CAAC"}
@@ -1,5 +0,0 @@
1
- import { ResizeImageArgs } from './resize-image-def.js';
2
- declare function executeResizeImage(args: ResizeImageArgs): Promise<void>;
3
- export declare const executor: typeof executeResizeImage;
4
- export declare const def: import("../../ai-service/common.js").FunctionDef;
5
- export {};
@@ -1,30 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
- import assert from 'node:assert';
4
- import { rcConfig } from '../../main/config.js';
5
- import { isProjectPath } from '../../files/path-utils.js';
6
- import { resizeImageDef } from './resize-image-def.js';
7
- import { resizeImageFile } from '../../images/resize-image.js';
8
- async function executeResizeImage(args) {
9
- const { filePath, size } = args;
10
- assert(filePath, 'filePath must not be empty');
11
- assert(size && size.width && size.height, 'size with width and height must be provided');
12
- const absoluteFilePath = path.isAbsolute(filePath) ? filePath : path.join(rcConfig.rootDir, filePath);
13
- if (!isProjectPath(absoluteFilePath)) {
14
- console.log(`Skipping image resize: ${absoluteFilePath}`);
15
- throw new Error(`File ${absoluteFilePath} is not located inside project directory, something is wrong?`);
16
- }
17
- assert(fs.existsSync(absoluteFilePath), 'Input file does not exist');
18
- console.log(`Resizing image: ${absoluteFilePath}`, size);
19
- try {
20
- await resizeImageFile(absoluteFilePath, { width: size.width, height: size.height });
21
- console.log(`Image resized successfully`);
22
- }
23
- catch (error) {
24
- console.error('Failed to resize image', error);
25
- throw error;
26
- }
27
- }
28
- export const executor = executeResizeImage;
29
- export const def = resizeImageDef;
30
- //# sourceMappingURL=resize-image-executor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"resize-image-executor.js","sourceRoot":"","sources":["../../../../src/operations/resize-image/resize-image-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAmB,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACxE,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAE/D,KAAK,UAAU,kBAAkB,CAAC,IAAqB;IACrD,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC;IAEhC,MAAM,CAAC,QAAQ,EAAE,4BAA4B,CAAC,CAAC;IAC/C,MAAM,CAAC,IAAI,IAAI,IAAI,CAAC,KAAK,IAAI,IAAI,CAAC,MAAM,EAAE,6CAA6C,CAAC,CAAC;IAEzF,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEtG,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,0BAA0B,gBAAgB,EAAE,CAAC,CAAC;QAC1D,MAAM,IAAI,KAAK,CAAC,QAAQ,gBAAgB,+DAA+D,CAAC,CAAC;IAC3G,CAAC;IAED,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,2BAA2B,CAAC,CAAC;IAErE,OAAO,CAAC,GAAG,CAAC,mBAAmB,gBAAgB,EAAE,EAAE,IAAI,CAAC,CAAC;IAEzD,IAAI,CAAC;QACH,MAAM,eAAe,CAAC,gBAAgB,EAAE,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;QACpF,OAAO,CAAC,GAAG,CAAC,4BAA4B,CAAC,CAAC;IAC5C,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QAC/C,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,kBAAkB,CAAC;AAC3C,MAAM,CAAC,MAAM,GAAG,GAAG,cAAc,CAAC"}
@@ -1,18 +0,0 @@
1
- import { FunctionDef } from '../../ai-service/common';
2
- /**
3
- * Function definition for splitImage
4
- */
5
- export declare const splitImageDef: FunctionDef;
6
- export type SplitImageArgs = {
7
- inputFilePath: string;
8
- parts: Array<{
9
- rect: {
10
- x: number;
11
- y: number;
12
- width: number;
13
- height: number;
14
- };
15
- outputFilePath: string;
16
- }>;
17
- explanation?: string;
18
- };
@@ -1,46 +0,0 @@
1
- /**
2
- * Function definition for splitImage
3
- */
4
- export const splitImageDef = {
5
- name: 'splitImage',
6
- description: 'Split an image into multiple parts and save them as separate files.',
7
- parameters: {
8
- type: 'object',
9
- properties: {
10
- inputFilePath: {
11
- type: 'string',
12
- description: 'The file path of the input image to be split.',
13
- },
14
- parts: {
15
- type: 'array',
16
- items: {
17
- type: 'object',
18
- properties: {
19
- rect: {
20
- type: 'object',
21
- properties: {
22
- x: { type: 'number', description: 'The x-coordinate of the top-left corner of the rectangle.' },
23
- y: { type: 'number', description: 'The y-coordinate of the top-left corner of the rectangle.' },
24
- width: { type: 'number', description: 'The width of the rectangle.' },
25
- height: { type: 'number', description: 'The height of the rectangle.' },
26
- },
27
- required: ['x', 'y', 'width', 'height'],
28
- },
29
- outputFilePath: {
30
- type: 'string',
31
- description: 'The file path to save the extracted part of the image.',
32
- },
33
- },
34
- required: ['rect', 'outputFilePath'],
35
- },
36
- description: 'An array of parts to extract from the image, each with a rectangle and output file path.',
37
- },
38
- explanation: {
39
- type: 'string',
40
- description: 'The explanation of the reasoning behind splitting this image',
41
- },
42
- },
43
- required: ['inputFilePath', 'parts'],
44
- },
45
- };
46
- //# sourceMappingURL=split-image-def.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"split-image-def.js","sourceRoot":"","sources":["../../../../src/operations/split-image/split-image-def.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAgB;IACxC,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,qEAAqE;IAClF,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,aAAa,EAAE;gBACb,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+CAA+C;aAC7D;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,IAAI,EAAE;4BACJ,IAAI,EAAE,QAAQ;4BACd,UAAU,EAAE;gCACV,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2DAA2D,EAAE;gCAC/F,CAAC,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2DAA2D,EAAE;gCAC/F,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,6BAA6B,EAAE;gCACrE,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,8BAA8B,EAAE;6BACxE;4BACD,QAAQ,EAAE,CAAC,GAAG,EAAE,GAAG,EAAE,OAAO,EAAE,QAAQ,CAAC;yBACxC;wBACD,cAAc,EAAE;4BACd,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,wDAAwD;yBACtE;qBACF;oBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,CAAC;iBACrC;gBACD,WAAW,EAAE,0FAA0F;aACxG;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8DAA8D;aAC5E;SACF;QACD,QAAQ,EAAE,CAAC,eAAe,EAAE,OAAO,CAAC;KACrC;CACF,CAAC"}
@@ -1,6 +0,0 @@
1
- import { SplitImageArgs } from './split-image-def.js';
2
- import { CodegenOptions } from '../../main/codegen-types.js';
3
- declare function executeSplitImage(args: SplitImageArgs, options: CodegenOptions): Promise<void>;
4
- export declare const executor: typeof executeSplitImage;
5
- export declare const def: import("../../ai-service/common.js").FunctionDef;
6
- export {};
@@ -1,51 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
- import assert from 'node:assert';
4
- import { rcConfig } from '../../main/config.js';
5
- import { isProjectPath } from '../../files/path-utils.js';
6
- import { splitImageDef } from './split-image-def.js';
7
- import { splitImage } from '../../images/split-image.js';
8
- async function executeSplitImage(args, options) {
9
- const { inputFilePath, parts } = args;
10
- const { allowFileCreate, allowDirectoryCreate } = options;
11
- assert(inputFilePath, 'inputFilePath must not be empty');
12
- assert(Array.isArray(parts) && parts.length > 0, 'Parts array must not be empty');
13
- const absoluteInputFilePath = path.isAbsolute(inputFilePath)
14
- ? inputFilePath
15
- : path.join(rcConfig.rootDir, inputFilePath);
16
- if (!isProjectPath(absoluteInputFilePath)) {
17
- console.log(`Skipping image split: ${absoluteInputFilePath}`);
18
- throw new Error(`File ${absoluteInputFilePath} is not located inside project directory, something is wrong?`);
19
- }
20
- assert(fs.existsSync(absoluteInputFilePath), 'Input file does not exist');
21
- for (const part of parts) {
22
- const absoluteOutputFilePath = path.isAbsolute(part.outputFilePath)
23
- ? part.outputFilePath
24
- : path.join(rcConfig.rootDir, part.outputFilePath);
25
- if (!isProjectPath(absoluteOutputFilePath)) {
26
- console.log(`Skipping output file: ${absoluteOutputFilePath}`);
27
- throw new Error(`Output file ${absoluteOutputFilePath} is not located inside project directory, something is wrong?`);
28
- }
29
- assert(allowFileCreate || fs.existsSync(absoluteOutputFilePath), 'File create option was not enabled and output file does not exist');
30
- if (allowDirectoryCreate) {
31
- fs.mkdirSync(path.dirname(absoluteOutputFilePath), { recursive: true });
32
- }
33
- }
34
- console.log(`Splitting image: ${absoluteInputFilePath}`);
35
- try {
36
- await splitImage(absoluteInputFilePath, parts.map((part) => ({
37
- outputFilePath: path.isAbsolute(part.outputFilePath)
38
- ? part.outputFilePath
39
- : path.join(rcConfig.rootDir, part.outputFilePath),
40
- rect: part.rect,
41
- })));
42
- console.log(`Image split successfully`);
43
- }
44
- catch (error) {
45
- console.error('Failed to split image', error);
46
- throw error;
47
- }
48
- }
49
- export const executor = executeSplitImage;
50
- export const def = splitImageDef;
51
- //# sourceMappingURL=split-image-executor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"split-image-executor.js","sourceRoot":"","sources":["../../../../src/operations/split-image/split-image-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,aAAa,CAA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G,aAAa,CAAC"}
@@ -1,10 +0,0 @@
1
- import { FunctionDef } from '../../ai-service/common';
2
- /**
3
- * Function definition for updateFile
4
- */
5
- export declare const updateFileDef: FunctionDef;
6
- export type UpdateFileArgs = {
7
- filePath: string;
8
- explanation?: string;
9
- newContent: string;
10
- };
@@ -1,26 +0,0 @@
1
- /**
2
- * Function definition for updateFile
3
- */
4
- export const updateFileDef = {
5
- name: 'updateFile',
6
- description: 'Update a file with new content. The file must already exists in the application source code. The function should be called only if there is a need to actually change something.',
7
- parameters: {
8
- type: 'object',
9
- properties: {
10
- filePath: {
11
- type: 'string',
12
- description: 'The file path to update.',
13
- },
14
- explanation: {
15
- type: 'string',
16
- description: 'The explanation of the reasoning behind the suggested code changes for this file',
17
- },
18
- newContent: {
19
- type: 'string',
20
- description: 'The content to update the file with. Must not be empty.',
21
- },
22
- },
23
- required: ['filePath', 'newContent'],
24
- },
25
- };
26
- //# sourceMappingURL=update-file-def.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-file-def.js","sourceRoot":"","sources":["../../../../src/operations/update-file/update-file-def.ts"],"names":[],"mappings":"AAEA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAgB;IACxC,IAAI,EAAE,YAAY;IAClB,WAAW,EACT,kLAAkL;IACpL,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kFAAkF;aAChG;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yDAAyD;aACvE;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;KACrC;CACF,CAAC"}
@@ -1,5 +0,0 @@
1
- import { UpdateFileArgs } from './update-file-def.js';
2
- declare function executeUpdateFile(args: UpdateFileArgs): Promise<void>;
3
- export declare const executor: typeof executeUpdateFile;
4
- export declare const def: import("../../ai-service/common.js").FunctionDef;
5
- export {};
@@ -1,22 +0,0 @@
1
- import fs from 'fs';
2
- import path from 'path';
3
- import assert from 'node:assert';
4
- import { rcConfig } from '../../main/config.js';
5
- import { isProjectPath } from '../../files/path-utils.js';
6
- import { updateFileDef } from './update-file-def.js';
7
- async function executeUpdateFile(args) {
8
- const { filePath, newContent } = args;
9
- assert(filePath, 'filePath must not be empty');
10
- assert(newContent, 'newContent must not be empty');
11
- const absoluteFilePath = path.isAbsolute(filePath) ? filePath : path.join(rcConfig.rootDir, filePath);
12
- if (!isProjectPath(absoluteFilePath)) {
13
- console.log(`Skipping file: ${absoluteFilePath}`);
14
- throw new Error(`File ${absoluteFilePath} is not located inside project directory, something is wrong?`);
15
- }
16
- console.log(`Updating file: ${absoluteFilePath}`);
17
- assert(fs.existsSync(absoluteFilePath), 'File does not exist');
18
- fs.writeFileSync(absoluteFilePath, newContent, 'utf-8');
19
- }
20
- export const executor = executeUpdateFile;
21
- export const def = updateFileDef;
22
- //# sourceMappingURL=update-file-executor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"update-file-executor.js","sourceRoot":"","sources":["../../../../src/operations/update-file/update-file-executor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAkB,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAErE,KAAK,UAAU,iBAAiB,CAAC,IAAoB;IACnD,MAAM,EAAE,QAAQ,EAAE,UAAU,EAAE,GAAG,IAAI,CAAC;IAEtC,MAAM,CAAC,QAAQ,EAAE,4BAA4B,CAAC,CAAC;IAC/C,MAAM,CAAC,UAAU,EAAE,8BAA8B,CAAC,CAAC;IAEnD,MAAM,gBAAgB,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;IAEtG,IAAI,CAAC,aAAa,CAAC,gBAAgB,CAAC,EAAE,CAAC;QACrC,OAAO,CAAC,GAAG,CAAC,kBAAkB,gBAAgB,EAAE,CAAC,CAAC;QAClD,MAAM,IAAI,KAAK,CAAC,QAAQ,gBAAgB,+DAA+D,CAAC,CAAC;IAC3G,CAAC;IAED,OAAO,CAAC,GAAG,CAAC,kBAAkB,gBAAgB,EAAE,CAAC,CAAC;IAClD,MAAM,CAAC,EAAE,CAAC,UAAU,CAAC,gBAAgB,CAAC,EAAE,qBAAqB,CAAC,CAAC;IAE/D,EAAE,CAAC,aAAa,CAAC,gBAAgB,EAAE,UAAU,EAAE,OAAO,CAAC,CAAC;AAC1D,CAAC;AAED,MAAM,CAAC,MAAM,QAAQ,GAAG,iBAAiB,CAAC;AAC1C,MAAM,CAAC,MAAM,GAAG,GAAG,aAAa,CAAC"}
@@ -1,3 +0,0 @@
1
- import { AiServiceType, CodegenOptions } from '../main/codegen-types.js';
2
- import { GenerateContentFunction } from '../ai-service/common.js';
3
- export declare function handleAiServiceFallback(generateContentFns: Record<AiServiceType, GenerateContentFunction>, currentService: AiServiceType, options: CodegenOptions, ...args: Parameters<GenerateContentFunction>): Promise<ReturnType<GenerateContentFunction>>;
@@ -1,84 +0,0 @@
1
- import { putSystemMessage } from '../main/common/content-bus.js';
2
- import { askUserForConfirmation } from '../main/common/user-actions.js';
3
- import { abortController } from '../main/interactive/codegen-worker.js';
4
- const AI_SERVICES_MAP = [
5
- [() => process.env.ANTHROPIC_API_KEY, 'anthropic'],
6
- [() => process.env.GOOGLE_CLOUD_PROJECT && process.env.GOOGLE_CLOUD_REGION, 'vertex-ai-claude'],
7
- [() => process.env.OPENAI_API_KEY, 'chat-gpt'],
8
- [() => process.env.GOOGLE_CLOUD_PROJECT, 'vertex-ai'],
9
- [() => process.env.API_KEY, 'ai-studio'],
10
- ];
11
- export async function handleAiServiceFallback(generateContentFns, currentService, options, ...args) {
12
- let retryCount = 0;
13
- const maxRetries = AI_SERVICES_MAP.length;
14
- let permanentService = currentService;
15
- while (retryCount < maxRetries) {
16
- if (abortController?.signal.aborted) {
17
- putSystemMessage(`Operation interrupted for ${permanentService}`);
18
- throw new Error(`Operation interrupted`);
19
- }
20
- try {
21
- const result = await generateContentFns[permanentService](...args);
22
- options.aiService = permanentService;
23
- return result;
24
- }
25
- catch (error) {
26
- if (error instanceof Error) {
27
- // Check if the error is due to an interruption
28
- if (error.name === 'AbortError' || error.message.includes('interrupted')) {
29
- putSystemMessage(`Operation interrupted for ${permanentService}`);
30
- throw error; // Re-throw the interruption error
31
- }
32
- if (error.message.includes('Rate limit exceeded')) {
33
- putSystemMessage(`Rate limit exceeded for ${permanentService}`);
34
- if (options.disableAiServiceFallback) {
35
- if (options.interactive || options.ui) {
36
- const nextService = getNextAiService(permanentService);
37
- if (nextService) {
38
- const shouldSwitch = await askUserForConfirmation(`Rate limit exceeded for ${permanentService}. Would you like to switch to ${nextService}?`, true);
39
- if (shouldSwitch) {
40
- putSystemMessage(`Switching to ${nextService} due to rate limiting.`);
41
- permanentService = nextService;
42
- retryCount++;
43
- continue;
44
- }
45
- }
46
- }
47
- else {
48
- throw new Error(`Rate limit exceeded for ${permanentService}. AI service fallback is disabled.`);
49
- }
50
- }
51
- else {
52
- const nextService = getNextAiService(permanentService);
53
- if (nextService) {
54
- putSystemMessage(`Rate limit exceeded for ${permanentService}. Automatically switching to ${nextService}.`);
55
- permanentService = nextService;
56
- retryCount++;
57
- }
58
- else {
59
- throw new Error(`Rate limit exceeded for ${permanentService}. AI service fallback was not possible.`);
60
- }
61
- }
62
- }
63
- else {
64
- // For other types of errors, re-throw
65
- throw error;
66
- }
67
- }
68
- else {
69
- // If it's not an Error instance, re-throw
70
- throw error;
71
- }
72
- }
73
- }
74
- throw new Error('All AI services have been exhausted due to rate limiting.');
75
- }
76
- function getNextAiService(currentService) {
77
- const options = AI_SERVICES_MAP.filter(([check]) => check()).map(([, service]) => service);
78
- const currentIndex = options.indexOf(currentService);
79
- if (currentIndex === -1 || currentIndex === options.length - 1) {
80
- return undefined;
81
- }
82
- return options[currentIndex + 1];
83
- }
84
- //# sourceMappingURL=ai-service-fallback.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ai-service-fallback.js","sourceRoot":"","sources":["../../../src/prompt/ai-service-fallback.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AAExE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE,MAAM,eAAe,GAAG;IACtB,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,iBAAiB,EAAE,WAAW,CAAC;IAClD,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,IAAI,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,kBAAkB,CAAC;IAC/F,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,cAAc,EAAE,UAAU,CAAC;IAC9C,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,oBAAoB,EAAE,WAAW,CAAC;IACrD,CAAC,GAAG,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,EAAE,WAAW,CAAC;CAChC,CAAC;AAEX,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,kBAAkE,EAClE,cAA6B,EAC7B,OAAuB,EACvB,GAAG,IAAyC;IAE5C,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,MAAM,UAAU,GAAG,eAAe,CAAC,MAAM,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,CAAC,EAAE,CAAC;QAC/D,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;AACnC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { ValidatorResult } from 'jsonschema';
2
- import { FunctionCall } from '../ai-service/common.js';
3
- export declare function validateFunctionCall(call: FunctionCall | undefined, requiredFunctionName: string): Omit<ValidatorResult, 'addError'> | undefined;
@@ -1,99 +0,0 @@
1
- import { Validator } from 'jsonschema';
2
- import path from 'path';
3
- import { getFunctionDefs } from './function-calling.js';
4
- import { rcConfig } from '../main/config.js';
5
- export function validateFunctionCall(call, requiredFunctionName) {
6
- const validator = new Validator();
7
- const functionDef = getFunctionDefs().find((def) => def.name === call?.name);
8
- // Step 1: Check if the function name matches
9
- if (!call || call.name !== requiredFunctionName) {
10
- return makeError(`Function "${requiredFunctionName}" was not called.`, call, '');
11
- }
12
- // Step 2: Check if the function is defined
13
- if (!functionDef) {
14
- return makeError(`Function "${call.name}" is not defined.`, call, '');
15
- }
16
- // Step 3: Validate against the schema
17
- const validationResult = validator.validate(call.args, functionDef.parameters);
18
- if (validationResult.errors.length > 0) {
19
- return validationResult;
20
- }
21
- // Step 4: Validate file paths
22
- const filePathValidationError = validateFilePaths(call);
23
- if (filePathValidationError) {
24
- return filePathValidationError;
25
- }
26
- return undefined;
27
- }
28
- function validateFilePaths(call) {
29
- const rootDir = path.normalize(rcConfig.rootDir);
30
- function checkPaths(obj, parentKey = '') {
31
- const errors = [];
32
- if (Array.isArray(obj)) {
33
- obj.forEach((item, index) => {
34
- if (typeof item === 'string' && isPathProperty(parentKey)) {
35
- errors.push(...validatePath(item, `${parentKey}[${index}]`));
36
- }
37
- else if (typeof item === 'object' && item !== null) {
38
- errors.push(...checkPaths(item, `${parentKey}[${index}]`));
39
- }
40
- });
41
- }
42
- else if (typeof obj === 'object' && obj !== null) {
43
- for (const [key, value] of Object.entries(obj)) {
44
- const currentKey = parentKey ? `${parentKey}.${key}` : key;
45
- if (typeof value === 'string' && isPathProperty(key)) {
46
- errors.push(...validatePath(value, currentKey));
47
- }
48
- else if (Array.isArray(value) || (typeof value === 'object' && value !== null)) {
49
- errors.push(...checkPaths(value, currentKey));
50
- }
51
- }
52
- }
53
- return errors;
54
- }
55
- function validatePath(value, key) {
56
- const errors = [];
57
- const normalizedPath = path.normalize(value);
58
- if (!path.isAbsolute(value)) {
59
- errors.push(makeError(`File path "${value}" is not absolute.`, call, key).errors[0]);
60
- }
61
- else if (!normalizedPath.startsWith(rootDir)) {
62
- errors.push(makeError(`File path "${value}" is not inside the root directory "${rootDir}".`, call, key).errors[0]);
63
- }
64
- return errors;
65
- }
66
- const errors = checkPaths(call.args);
67
- if (errors.length > 0) {
68
- return { errors, valid: false };
69
- }
70
- return undefined;
71
- }
72
- function isPathProperty(prop) {
73
- return [
74
- 'filePath',
75
- 'source',
76
- 'destination',
77
- 'inputFilePath',
78
- 'outputFilePath',
79
- 'contextPaths',
80
- 'filePaths',
81
- 'requestFilesContent',
82
- ].includes(prop);
83
- }
84
- function makeError(message, call, propertyPath) {
85
- return {
86
- errors: [
87
- {
88
- message,
89
- },
90
- ],
91
- valid: false,
92
- instance: call,
93
- schema: {},
94
- propertyPath,
95
- disableFormat: false,
96
- throwError: true,
97
- };
98
- }
99
- //# sourceMappingURL=function-calling-validate.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"function-calling-validate.js","sourceRoot":"","sources":["../../../src/prompt/function-calling-validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4C,MAAM,YAAY,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,UAAU,oBAAoB,CAClC,IAA8B,EAC9B,oBAA4B;IAE5B,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAA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jB,CAAC;AACJ,CAAC"}
@@ -1,5 +0,0 @@
1
- import { FunctionDef } from '../ai-service/common.js';
2
- /**
3
- * Function definitions for function calling feature
4
- */
5
- export declare function getFunctionDefs(): FunctionDef[];
@@ -1,43 +0,0 @@
1
- import { disableExplanations } from '../cli/cli-params.js';
2
- import { getSourceCode } from './function-defs/get-source-code.js';
3
- import { getImageAssets } from './function-defs/get-image-assets.js';
4
- import { getCodegenSummaryDef } from './function-defs/codegen-summary.js';
5
- import { explanation } from './function-defs/explanation.js';
6
- import { generateImage } from './function-defs/generate-image.js';
7
- import { askQuestion } from './function-defs/ask-question.js';
8
- import { optimizeContext } from './function-defs/optimize-context.js';
9
- import { setSummaries } from './function-defs/set-summaries.js';
10
- import { updateHistory } from './function-defs/update-history.js';
11
- import { readHistory } from './function-defs/read-history.js';
12
- import { askQuestionReflect } from './function-defs/ask-question-reflect.js';
13
- import { getOperationDefs } from '../operations/operations-index.js';
14
- /**
15
- * Function definitions for function calling feature
16
- */
17
- export function getFunctionDefs() {
18
- return [
19
- getSourceCode,
20
- getImageAssets,
21
- getCodegenSummaryDef(),
22
- explanation,
23
- generateImage,
24
- askQuestion,
25
- optimizeContext,
26
- setSummaries,
27
- updateHistory,
28
- readHistory,
29
- askQuestionReflect,
30
- ...getOperationDefs(),
31
- ].map((fd) => {
32
- if (!disableExplanations &&
33
- fd.parameters.properties.explanation &&
34
- !fd.parameters.required.includes('explanation')) {
35
- fd.parameters.required.unshift('explanation');
36
- }
37
- else if (disableExplanations) {
38
- delete fd.parameters.properties.explanation;
39
- }
40
- return fd;
41
- });
42
- }
43
- //# sourceMappingURL=function-calling.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"function-calling.js","sourceRoot":"","sources":["../../../src/prompt/function-calling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,c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