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,41 +1,11 @@
1
+ import { ModelType } from '../../../../ai-service/common-types.js';
1
2
  import { getSourceFiles, refreshFiles } from '../../../../files/find-files.js';
2
3
  import { getSourceCode } from '../../../../files/read-files.js';
3
4
  import { getSourceCodeTree } from '../../../../files/source-code-tree.js';
4
5
  import { putSystemMessage } from '../../../../main/common/content-bus.js';
5
6
  import { getFunctionDefs } from '../../../function-calling.js';
6
- /**
7
- * Checks if a file's content is already provided in the conversation history
8
- * @param filePath The path of the file to check
9
- * @param prompt The conversation history
10
- * @returns true if the file content is already available in the history
11
- */
12
- function isFileContentAlreadyProvided(filePath, prompt) {
13
- return prompt.some((item) => {
14
- if (item.type !== 'user' || !item.functionResponses) {
15
- return false;
16
- }
17
- return item.functionResponses.some((response) => {
18
- if (response.name !== 'getSourceCode' || !response.content) {
19
- return false;
20
- }
21
- try {
22
- const sourceCodeTree = JSON.parse(response.content);
23
- const dirPath = filePath.substring(0, filePath.lastIndexOf('/'));
24
- const fileName = filePath.substring(filePath.lastIndexOf('/') + 1);
25
- return (sourceCodeTree[dirPath] &&
26
- sourceCodeTree[dirPath][fileName] &&
27
- 'content' in sourceCodeTree[dirPath][fileName] &&
28
- sourceCodeTree[dirPath][fileName].content !== null);
29
- }
30
- catch (error) {
31
- console.warn('Error parsing getSourceCode response:', error);
32
- return false;
33
- }
34
- });
35
- });
36
- }
37
7
  export async function handleRequestFilesContent({ askQuestionCall, options, prompt, generateContentFn, }) {
38
- let requestFilesContentCall = await generateRequestFilesContentCall(generateContentFn, prompt, askQuestionCall, options, true);
8
+ let requestFilesContentCall = await generateRequestFilesContentCall(generateContentFn, prompt, askQuestionCall, options, ModelType.CHEAP);
39
9
  if (!requestFilesContentCall) {
40
10
  return {
41
11
  breakLoop: true,
@@ -48,15 +18,13 @@ export async function handleRequestFilesContent({ askQuestionCall, options, prom
48
18
  const alreadyProvidedFiles = requestedFiles.filter((file) => isFileContentAlreadyProvided(file, prompt));
49
19
  if (alreadyProvidedFiles.length === requestedFiles.length) {
50
20
  // All requested files are already provided
51
- const assistant = {
21
+ prompt.push({
52
22
  type: 'assistant',
53
23
  text: askQuestionCall.args?.message ?? '',
54
24
  functionCalls: [requestFilesContentCall],
55
- };
56
- const user = {
25
+ }, {
57
26
  type: 'user',
58
27
  text: 'The requested file contents are already provided in the conversation history.',
59
- data: { requestedFiles },
60
28
  functionResponses: [
61
29
  {
62
30
  name: 'requestFilesContent',
@@ -65,8 +33,8 @@ export async function handleRequestFilesContent({ askQuestionCall, options, prom
65
33
  },
66
34
  ],
67
35
  cache: true,
68
- };
69
- return { breakLoop: false, items: [{ assistant, user }] };
36
+ });
37
+ return { breakLoop: false, items: [] };
70
38
  }
71
39
  // Filter out already provided files
72
40
  requestedFiles = requestedFiles.filter((file) => !isFileContentAlreadyProvided(file, prompt));
@@ -76,7 +44,7 @@ export async function handleRequestFilesContent({ askQuestionCall, options, prom
76
44
  if (illegitimateFiles.length > 0) {
77
45
  requestFilesContentCall = await generateRequestFilesContentCall(generateContentFn, prompt, askQuestionCall, options,
78
46
  // use non cheap mode, as maybe the cheap mode didn't provide correct files
79
- false);
47
+ ModelType.DEFAULT);
80
48
  if (!requestFilesContentCall) {
81
49
  return {
82
50
  breakLoop: true,
@@ -127,9 +95,10 @@ ${illegitimateFiles.map((path) => `- ${path}`).join('\n')}`
127
95
  ],
128
96
  cache: true,
129
97
  };
130
- return { breakLoop: false, items: [{ assistant, user }] };
98
+ prompt.push(assistant, user);
99
+ return { breakLoop: false, items: [] };
131
100
  }
132
- async function generateRequestFilesContentCall(generateContentFn, prompt, askQuestionCall, options, cheap) {
101
+ export async function generateRequestFilesContentCall(generateContentFn, prompt, askQuestionCall, options, modelType) {
133
102
  const [requestFilesContentCall] = (await generateContentFn([
134
103
  ...prompt,
135
104
  {
@@ -140,9 +109,40 @@ async function generateRequestFilesContentCall(generateContentFn, prompt, askQue
140
109
  type: 'user',
141
110
  text: 'Yes, you can request the files contents.',
142
111
  },
143
- ], getFunctionDefs(), 'requestFilesContent', 0.7, cheap, options));
112
+ ], getFunctionDefs(), 'requestFilesContent', 0.7, modelType, options));
144
113
  return requestFilesContentCall;
145
114
  }
115
+ /**
116
+ * Checks if a file's content is already provided in the conversation history
117
+ * @param filePath The path of the file to check
118
+ * @param prompt The conversation history
119
+ * @returns true if the file content is already available in the history
120
+ */
121
+ function isFileContentAlreadyProvided(filePath, prompt) {
122
+ return prompt.some((item) => {
123
+ if (item.type !== 'user' || !item.functionResponses) {
124
+ return false;
125
+ }
126
+ return item.functionResponses.some((response) => {
127
+ if (response.name !== 'getSourceCode' || !response.content) {
128
+ return false;
129
+ }
130
+ try {
131
+ const sourceCodeTree = JSON.parse(response.content);
132
+ const dirPath = filePath.substring(0, filePath.lastIndexOf('/'));
133
+ const fileName = filePath.substring(filePath.lastIndexOf('/') + 1);
134
+ return (sourceCodeTree[dirPath] &&
135
+ sourceCodeTree[dirPath][fileName] &&
136
+ 'content' in sourceCodeTree[dirPath][fileName] &&
137
+ sourceCodeTree[dirPath][fileName].content !== null);
138
+ }
139
+ catch (error) {
140
+ console.warn('Error parsing getSourceCode response:', error);
141
+ return false;
142
+ }
143
+ });
144
+ });
145
+ }
146
146
  function categorizeLegitimateFiles(requestedFiles) {
147
147
  const legitimateFiles = [];
148
148
  const illegitimateFiles = [];
@@ -1 +1 @@
1
- {"version":3,"file":"request-files-content.js","sourceRoot":"","sources":["../../../../../src/prompt/steps/step-ask-question/handlers/request-files-content.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAU/D;;;;;GAKG;AACH,SAAS,4BAA4B,CAAC,QAAgB,EAAE,MAAoB;IAC1E,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACpD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC9C,IAAI,QAAQ,CAAC,IAAI,KAAK,eAAe,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC;gBAC3D,OAAO,KAAK,CAAC;YACf,CAAC;YAED,IAAI,CAAC;gBACH,MAAM,cAAc,GAAG,IAAI,CAAC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AAE,EACjB,qBAAqB,EACrB,GAAG,EACH,KAAK,EACL,OAAO,CACR,CAAwD,CAAC;IAE1D,OAAO,uBAAuB,CAAC;AACjC,CAAC;AAED,SAAS,yBAAyB,CAAC,cAAwB;IAIzD,MAAM,eAAe,GAAa,EAAE,CAAC;IACrC,MAAM,iBAAiB,GAAa,EAAE,CAAC;IAEvC,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAClC,IAAI,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC;AAChD,CAAC;AAED,SAAS,oBAAoB,CAAC,QAAgB;IAC5C,OAAO,cAAc,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
1
+ {"version":3,"file":"request-files-content.js","sourceRoot":"","sources":["../../../../../src/prompt/steps/step-ask-question/handlers/request-files-content.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/E,OAAO,EAAE,aAAa,EAAE,MAAM,iCAAiC,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAE1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAC1E,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAU/D,MAAM,CAAC,KAAK,UAAU,yBAAyB,CAAC,EAC9C,eAAe,EACf,OAAO,EACP,MAAM,EACN,iBAAiB,GACE;IACnB,IAAI,uBAAuB,GAAG,MAAM,+BAA+B,CACjE,iBAA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,CACL,cAAc,CAAC,OAAO,CAAC;oBACvB,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC;oBACjC,SAAS,IAAI,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC;oBAC9C,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,CAAC,CAAC,OAAO,KAAK,IAAI,CACnD,CAAC;YACJ,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,OAAO,CAAC,IAAI,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;gBAC7D,OAAO,KAAK,CAAC;YACf,CAAC;QACH,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,yBAAyB,CAAC,cAAwB;IAIzD,MAAM,eAAe,GAAa,EAAE,CAAC;IACrC,MAAM,iBAAiB,GAAa,EAAE,CAAC;IAEvC,cAAc,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE;QAClC,IAAI,oBAAoB,CAAC,QAAQ,CAAC,EAAE,CAAC;YACnC,eAAe,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACjC,CAAC;aAAM,CAAC;YACN,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QACnC,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,CAAC;AAChD,CAAC;AAED,SAAS,oBAAoB,CAAC,QAAgB;IAC5C,OAAO,cAAc,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
@@ -1,3 +1,4 @@
1
+ import { ModelType } from '../../../../ai-service/common-types.js';
1
2
  import { askUserForConfirmation } from '../../../../main/common/user-actions.js';
2
3
  import { getFunctionDefs } from '../../../function-calling.js';
3
4
  export async function handleRequestPermissions({ askQuestionCall, options, prompt, generateContentFn, }) {
@@ -11,14 +12,14 @@ export async function handleRequestPermissions({ askQuestionCall, options, promp
11
12
  type: 'user',
12
13
  text: 'Yes, you can request the permissions.',
13
14
  },
14
- ], getFunctionDefs(), 'requestPermissions', 0.7, true, options));
15
+ ], getFunctionDefs(), 'requestPermissions', 0.7, ModelType.CHEAP, options));
15
16
  if (!requestPermissionsCall) {
16
17
  return {
17
18
  breakLoop: true,
18
19
  items: [],
19
20
  };
20
21
  }
21
- const userConfirmation = await askUserForConfirmation('The assistant is requesting additional permissions. Do you want to grant them?', false);
22
+ const userConfirmation = await askUserForConfirmation('The assistant is requesting additional permissions. Do you want to grant them?', false, options);
22
23
  const user = {
23
24
  type: 'user',
24
25
  text: userConfirmation ? 'Permissions granted.' : 'Permission request denied.',
@@ -1 +1 @@
1
- {"version":3,"file":"request-permissions.js","sourceRoot":"","sources":["../../../../../src/prompt/steps/step-ask-question/handlers/request-permissions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAG/D,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,EAC7C,eAAe,EACf,OAAO,EACP,MAAM,EACN,iBAAiB,GACE;IACnB,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,MAAM,iBAAiB,CACvD;QACE,GAAG,MAAM;QACT;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE;SAC1C;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,uCAAuC;SAC9C;KACF,EACD,eAAe,EAAE,EACjB,oBAAoB,EACpB,GAAG,EACH,IAAI,EACJ,OAAO,CACR,CAAuD,CAAC;IAEzD,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC5B,OAAO;YACL,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC;IAED,MAAM,gBAAgB,GAAG,MAAM,sBAAsB,CACnD,gFAAgF,EAChF,KAAK,CACN,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ACnH,IAAI,iBAAiB,IAAI,WAAW,IAAI,WAAW,CAAC,eAAe;YAAE,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;QACpG,IAAI,iBAAiB,IAAI,WAAW,IAAI,WAAW,CAAC,eAAe;YAAE,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;QACpG,IAAI,eAAe,IAAI,WAAW,IAAI,WAAW,CAAC,aAAa;YAAE,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAChG,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"request-permissions.js","sourceRoot":"","sources":["../../../../../src/prompt/steps/step-ask-question/handlers/request-permissions.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,wCAAwC,CAAC;AAEnE,OAAO,EAAE,sBAAsB,EAAE,MAAM,yCAAyC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAG/D,MAAM,CAAC,KAAK,UAAU,wBAAwB,CAAC,EAC7C,eAAe,EACf,OAAO,EACP,MAAM,EACN,iBAAiB,GACE;IACnB,MAAM,CAAC,sBAAsB,CAAC,GAAG,CAAC,MAAM,iBAAiB,CACvD;QACE,GAAG,MAAM;QACT;YACE,IAAI,EAAE,WAAW;YACjB,IAAI,EAAE,eAAe,CAAC,IAAI,EAAE,OAAO,IAAI,EAAE;SAC1C;QACD;YACE,IAAI,EAAE,MAAM;YACZ,IAAI,EAAE,uCAAuC;SAC9C;KACF,EACD,eAAe,EAAE,EACjB,oBAAoB,EACpB,GAAG,EACH,SAAS,CAAC,KAAK,EACf,OAAO,CACR,CAAuD,CAAC;IAEzD,IAAI,CAAC,sBAAsB,EAAE,CAAC;QAC5B,OAAO;YACL,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC;IAED,MAAM,gBAAgB,GAAG,MAAM,sBAAsB,CACnD,gFAAgF,EAChF,KAAK,EACL,OAAO,CACR,CAAC;IAEF,MAAM,IAAI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I,WAAW,IAAI,WAAW,CAAC,eAAe;YAAE,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;QACpG,IAAI,iBAAiB,IAAI,WAAW,IAAI,WAAW,CAAC,eAAe;YAAE,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;QACpG,IAAI,eAAe,IAAI,WAAW,IAAI,WAAW,CAAC,aAAa;YAAE,OAAO,CAAC,aAAa,GAAG,IAAI,CAAC;IAChG,CAAC;AACH,CAAC"}
@@ -1,15 +1,45 @@
1
- import { FunctionCall, GenerateContentFunction, GenerateImageFunction, PromptItem, PromptItemImage } from '../../../ai-service/common.js';
1
+ import { GenerateImageFunction } from '../../../ai-service/common-types.js';
2
+ import { GenerateContentFunction } from '../../../ai-service/common-types.js';
3
+ import { PromptItem } from '../../../ai-service/common-types.js';
4
+ import { PromptItemImage } from '../../../ai-service/common-types.js';
5
+ import { FunctionCall } from '../../../ai-service/common-types.js';
2
6
  import { CodegenOptions } from '../../../main/codegen-types.js';
3
- import { PluginActionType } from '../../../main/codegen-types.js';
4
- export type ActionType = 'codeGeneration' | 'sendMessage' | 'sendMessageWithImage' | 'requestPermissions' | 'requestFilesContent' | 'removeFilesFromContext' | 'confirmCodeGeneration' | 'cancelCodeGeneration' | 'contextOptimization' | 'searchCode' | 'lint' | 'updateFile' | PluginActionType;
7
+ import { PluginActionType } from '../../../ai-service/service-configurations-types.js';
8
+ export type ActionType = 'codeGeneration' | 'sendMessage' | 'generateImage' | 'requestPermissions' | 'requestFilesContent' | 'removeFilesFromContext' | 'confirmCodeGeneration' | 'endConversation' | 'contextOptimization' | 'searchCode' | 'lint' | 'updateFile' | 'performAnalysis' | 'createFile' | 'pullAppContext' | 'genaicodeHelp' | 'pushAppContext' | 'reasoningInference' | PluginActionType;
5
9
  type AskQuestionArgs = {
6
10
  actionType: ActionType;
7
11
  message: string;
8
12
  decisionMakingProcess?: string;
9
13
  };
10
- export type SendMessageWithImageArgs = {
14
+ /**
15
+ * Arguments for help action
16
+ */
17
+ export type GenaicodeHelpArgs = {
18
+ reasoning: string;
19
+ message: string;
20
+ };
21
+ /**
22
+ * Arguments for pullAppContext action
23
+ */
24
+ export type PullAppContextArgs = {
25
+ reason: string;
26
+ key: string;
27
+ };
28
+ /**
29
+ * Arguments for pushAppContext action
30
+ */
31
+ export type PushAppContextArgs = {
32
+ reason: string;
33
+ key: string;
34
+ value: string;
35
+ };
36
+ export type GenerateImageArgs = {
11
37
  prompt: string;
12
- contextImage?: string;
38
+ filePath: string;
39
+ contextImagePath?: string;
40
+ width: number;
41
+ height: number;
42
+ cheap: boolean;
13
43
  };
14
44
  export type RequestPermissionsArgs = Record<'allowDirectoryCreate' | 'allowFileCreate' | 'allowFileDelete' | 'allowFileMove' | 'enableVision' | 'enableImagen', boolean>;
15
45
  export type RequestFilesContentArgs = {
@@ -21,6 +51,24 @@ export type RemoveFilesFromContextArgs = {
21
51
  export type ContextOptimizationArgs = {
22
52
  filePaths: string[];
23
53
  };
54
+ /**
55
+ * Arguments for the performAnalysis action
56
+ */
57
+ export type PerformAnalysisArgs = {
58
+ /** The type of analysis to perform */
59
+ analysisType: 'code' | 'image' | 'security' | 'performance' | 'architecture' | 'general';
60
+ /** The analysis prompt describing what needs to be analyzed */
61
+ prompt: string;
62
+ };
63
+ /**
64
+ * Results of the analysis operation
65
+ */
66
+ export type AnalysisResultArgs = {
67
+ /** Reasoning behind the analysis results */
68
+ reasoning: string;
69
+ /** User-friendly message summarizing results */
70
+ message: string;
71
+ };
24
72
  /**
25
73
  * Arguments for the searchCode action
26
74
  */
@@ -42,12 +90,33 @@ export type SearchCodeArgs = {
42
90
  /** Number of context lines to include around content matches */
43
91
  contextLines?: number;
44
92
  };
93
+ /**
94
+ * Arguments for the reasoningInference action
95
+ */
96
+ export type ReasoningInferenceArgs = {
97
+ /** The prompt to send to the reasoning model */
98
+ prompt: string;
99
+ /** The context paths to provide to the reasoning model */
100
+ contextPaths: string[];
101
+ };
102
+ /**
103
+ * Results from the reasoning model
104
+ */
105
+ export type ReasoningInferenceResponseArgs = {
106
+ /** The generated response text */
107
+ response: string;
108
+ /** The reasoning tokens provided by the model */
109
+ reasoning: string;
110
+ };
45
111
  export type LintResult = {
46
112
  success: boolean;
47
113
  stdout?: string;
48
114
  stderr?: string;
49
115
  };
50
116
  export type AskQuestionCall = FunctionCall<AskQuestionArgs>;
117
+ export type PerformAnalysisCall = FunctionCall<PerformAnalysisArgs>;
118
+ export type AnalysisResultCall = FunctionCall<AnalysisResultArgs>;
119
+ export type ReasoningInferenceCall = FunctionCall<ReasoningInferenceArgs>;
51
120
  export interface AssistantItem {
52
121
  type: 'assistant';
53
122
  text: string;
@@ -57,7 +126,7 @@ export interface AssistantItem {
57
126
  }
58
127
  export interface UserItem {
59
128
  type: 'user';
60
- text: string;
129
+ text?: string;
61
130
  data?: Record<string, unknown>;
62
131
  functionResponses?: Array<{
63
132
  name: string;
@@ -1,3 +1,7 @@
1
- import { FunctionDef, GenerateContentFunction, PromptItem, GenerateImageFunction, FunctionCall } from '../../../ai-service/common.js';
1
+ import { GenerateImageFunction } from '../../../ai-service/common-types.js';
2
+ import { GenerateContentFunction } from '../../../ai-service/common-types.js';
3
+ import { PromptItem } from '../../../ai-service/common-types.js';
4
+ import { FunctionCall } from '../../../ai-service/common-types.js';
5
+ import { FunctionDef } from '../../../ai-service/common-types.js';
2
6
  import { CodegenOptions } from '../../../main/codegen-types.js';
3
7
  export declare function executeStepAskQuestion(generateContentFn: GenerateContentFunction, generateImageFn: GenerateImageFunction, prompt: PromptItem[], functionDefs: FunctionDef[], waitIfPaused: () => Promise<void>, temperature: number, options: CodegenOptions): Promise<FunctionCall[]>;
@@ -1,21 +1,28 @@
1
+ import { ModelType } from '../../../ai-service/common-types.js';
1
2
  import { putAssistantMessage, putSystemMessage, putUserMessage } from '../../../main/common/content-bus.js';
2
- import { abortController } from '../../../main/interactive/codegen-worker.js';
3
+ import { abortController } from '../../../main/common/abort-controller.js';
3
4
  import { validateAndRecoverSingleResult } from '../step-validate-recover.js';
4
5
  import { handleRequestFilesContent } from './handlers/request-files-content.js';
5
6
  import { handleContextOptimization } from './handlers/context-optimization.js';
6
7
  import { handleRemoveFilesFromContext } from './handlers/remove-files-from-context.js';
7
8
  import { handleRequestPermissions } from './handlers/request-permissions.js';
8
9
  import { handleSendMessage } from './handlers/handle-send-message.js';
9
- import { handleSendMessageWithImage } from './handlers/handle-send-message-with-image.js';
10
+ import { handleGenerateImage } from './handlers/handle-generate-image.js';
10
11
  import { handleConfirmCodeGeneration } from './handlers/confirm-code-generation.js';
11
- import { handleCancelCodeGeneration } from './handlers/cancel-code-generation.js';
12
+ import { handleEndConversation } from './handlers/handle-end-conversation.js';
12
13
  import { handleLint } from './handlers/lint.js';
13
14
  import { getRegisteredActionHandlers } from '../../../main/plugin-loader.js';
14
15
  import { handleCodeGeneration } from './handlers/code-generation.js';
15
16
  import { handleSearchCode } from './handlers/handle-search-code.js';
16
17
  import { handleUpdateFile } from './handlers/handle-update-file.js';
18
+ import { handlePerformAnalysis } from './handlers/handle-perform-analysis.js';
19
+ import { handleCreateFile } from './handlers/handle-create-file.js';
20
+ import { handlePullAppContext } from './handlers/handle-pull-app-context.js';
21
+ import { handlePushAppContext } from './handlers/handle-push-app-context.js';
22
+ import { handleReasoningInference } from './handlers/handle-reasoning-inference.js';
23
+ import { handleGenaicodeHelp } from './handlers/handle-genaicode-help.js';
17
24
  export async function executeStepAskQuestion(generateContentFn, generateImageFn, prompt, functionDefs, waitIfPaused, temperature, options) {
18
- console.log('Allowing the assistant to ask a question...');
25
+ putSystemMessage('Allowing the assistant to ask a question...');
19
26
  while (!abortController?.signal.aborted) {
20
27
  try {
21
28
  const askQuestionCall = await getAskQuestionCall(generateContentFn, prompt, functionDefs, temperature, options);
@@ -23,7 +30,6 @@ export async function executeStepAskQuestion(generateContentFn, generateImageFn,
23
30
  break;
24
31
  }
25
32
  if (askQuestionCall.args?.message) {
26
- // TODO: PromptItem should be included here, but a small refactor is needed to achieve this
27
33
  putAssistantMessage(askQuestionCall.args.message, askQuestionCall.args);
28
34
  }
29
35
  const actionType = askQuestionCall.args?.actionType;
@@ -39,7 +45,7 @@ export async function executeStepAskQuestion(generateContentFn, generateImageFn,
39
45
  });
40
46
  // This is important to display the content to the user interface (ui or interactive cli)
41
47
  let lastItem = result.items.slice(-1)[0];
42
- if (lastItem) {
48
+ if (lastItem?.user?.text) {
43
49
  putUserMessage(lastItem.user.text, lastItem.user.data, undefined, undefined, lastItem.user);
44
50
  }
45
51
  prompt.push(...result.items.map(({ assistant, user }) => [assistant, user]).flat());
@@ -53,7 +59,7 @@ export async function executeStepAskQuestion(generateContentFn, generateImageFn,
53
59
  waitIfPaused,
54
60
  });
55
61
  lastItem = result.items.slice(-1)[0];
56
- if (lastItem) {
62
+ if (lastItem?.user?.text) {
57
63
  putUserMessage(lastItem.user.text, undefined, undefined, undefined, lastItem.user);
58
64
  }
59
65
  prompt.push(...result.items.map(({ assistant, user }) => [assistant, user]).flat());
@@ -61,15 +67,13 @@ export async function executeStepAskQuestion(generateContentFn, generateImageFn,
61
67
  if (result.breakLoop) {
62
68
  return result.stepResult ?? [];
63
69
  }
64
- console.log('The question was answered');
65
70
  }
66
71
  else {
67
- console.error('Invalid action type received');
72
+ putSystemMessage('Invalid action type received');
68
73
  break;
69
74
  }
70
75
  }
71
76
  catch (error) {
72
- console.error('Error in executeStepAskQuestion:', error);
73
77
  putSystemMessage(`An error occurred: ${error instanceof Error ? error.message : String(error)}`);
74
78
  return [];
75
79
  }
@@ -78,7 +82,14 @@ export async function executeStepAskQuestion(generateContentFn, generateImageFn,
78
82
  return [];
79
83
  }
80
84
  async function getAskQuestionCall(generateContentFn, prompt, functionDefs, temperature, options) {
81
- const askQuestionRequest = [prompt, functionDefs, 'askQuestion', temperature, true, options];
85
+ const askQuestionRequest = [
86
+ prompt,
87
+ functionDefs,
88
+ 'askQuestion',
89
+ temperature,
90
+ ModelType.CHEAP,
91
+ options,
92
+ ];
82
93
  let askQuestionResult = await generateContentFn(...askQuestionRequest);
83
94
  askQuestionResult = await validateAndRecoverSingleResult(askQuestionRequest, askQuestionResult, generateContentFn);
84
95
  return askQuestionResult.find((call) => call.name === 'askQuestion');
@@ -92,17 +103,23 @@ function getActionHandler(actionType) {
92
103
  // If no plugin handler is found, use the built-in handlers
93
104
  const handlers = {
94
105
  codeGeneration: handleCodeGeneration,
95
- cancelCodeGeneration: handleCancelCodeGeneration,
106
+ endConversation: handleEndConversation,
96
107
  confirmCodeGeneration: handleConfirmCodeGeneration,
97
108
  requestFilesContent: handleRequestFilesContent,
98
109
  requestPermissions: handleRequestPermissions,
99
110
  removeFilesFromContext: handleRemoveFilesFromContext,
100
111
  sendMessage: handleSendMessage,
101
- sendMessageWithImage: handleSendMessageWithImage,
112
+ generateImage: handleGenerateImage,
102
113
  searchCode: handleSearchCode,
103
114
  lint: handleLint,
104
115
  contextOptimization: handleContextOptimization,
105
116
  updateFile: handleUpdateFile,
117
+ createFile: handleCreateFile,
118
+ performAnalysis: handlePerformAnalysis,
119
+ pullAppContext: handlePullAppContext,
120
+ genaicodeHelp: handleGenaicodeHelp,
121
+ reasoningInference: handleReasoningInference,
122
+ pushAppContext: handlePushAppContext,
106
123
  };
107
124
  return handlers[actionType] || handleSendMessage;
108
125
  }
@@ -1 +1 @@
1
- {"version":3,"file":"step-ask-question.js","sourceRoot":"","sources":["../../../../src/prompt/steps/step-ask-question/step-ask-question.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,6CAA6C,CAAC;AAC9E,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAE7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;A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AAK,aAAa,CAAgC,CAAC;AACtG,CAAC;AAED,SAAS,gBAAgB,CAAC,UAAsB;IAC9C,yEAAyE;IACzE,MAAM,aAAa,GAAG,2BAA2B,EAAE,CAAC,GAAG,CAAC,UAAgC,CAAC,CAAC;IAC1F,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,2DAA2D;IAC3D,MAAM,QAAQ,GAAsC;QAClD,cAAc,EAAE,oBAAoB;QACpC,oBAAoB,EAAE,0BAA0B;QAChD,qBAAqB,EAAE,2BAA2B;QAClD,mBAAmB,EAAE,yBAAyB;QAC9C,kBAAkB,EAAE,wBAAwB;QAC5C,sBAAsB,EAAE,4BAA4B;QACpD,WAAW,EAAE,iBAAiB;QAC9B,oBAAoB,EAAE,0BAA0B;QAChD,UAAU,EAAE,gBAAgB;QAC5B,IAAI,EAAE,UAAU;QAChB,mBAAmB,EAAE,yBAAyB;QAC9C,UAAU,EAAE,gBAAgB;KAC7B,CAAC;IAEF,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,iBAAiB,CAAC;AACnD,CAAC"}
1
+ {"version":3,"file":"step-ask-question.js","sourceRoot":"","sources":["../../../../src/prompt/steps/step-ask-question/step-ask-question.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,SAAS,EAAE,MAAM,qCAAqC,CAAC;AAEhE,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AAC5G,OAAO,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAC3E,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAE7E,OAAO,EAAE,yBAAyB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,EAAE,yBAAyB,EAAE,MAAM,oCAAoC,CAAC;AAC/E,OAAO,EAAE,4BAA4B,EAAE,MAAM,yCAAyC,CAAC;AACvF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mCAAmC,C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IACvE,iBAAiB,GAAG,MAAM,8BAA8B,CAAC,kBAAkB,EAAE,iBAAiB,EAAE,iBAAiB,CAAC,CAAC;IAEnH,OAAO,iBAAiB,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,KAAK,aAAa,CAAgC,CAAC;AACtG,CAAC;AAED,SAAS,gBAAgB,CAAC,UAAsB;IAC9C,yEAAyE;IACzE,MAAM,aAAa,GAAG,2BAA2B,EAAE,CAAC,GAAG,CAAC,UAAgC,CAAC,CAAC;IAC1F,IAAI,aAAa,EAAE,CAAC;QAClB,OAAO,aAAa,CAAC;IACvB,CAAC;IAED,2DAA2D;IAC3D,MAAM,QAAQ,GAAsC;QAClD,cAAc,EAAE,oBAAoB;QACpC,eAAe,EAAE,qBAAqB;QACtC,qBAAqB,EAAE,2BAA2B;QAClD,mBAAmB,EAAE,yBAAyB;QAC9C,kBAAkB,EAAE,wBAAwB;QAC5C,sBAAsB,EAAE,4BAA4B;QACpD,WAAW,EAAE,iBAAiB;QAC9B,aAAa,EAAE,mBAAmB;QAClC,UAAU,EAAE,gBAAgB;QAC5B,IAAI,EAAE,UAAU;QAChB,mBAAmB,EAAE,yBAAyB;QAC9C,UAAU,EAAE,gBAAgB;QAC5B,UAAU,EAAE,gBAAgB;QAC5B,eAAe,EAAE,qBAAqB;QACtC,cAAc,EAAE,oBAAoB;QACpC,aAAa,EAAE,mBAAmB;QAClC,kBAAkB,EAAE,wBAAwB;QAC5C,cAAc,EAAE,oBAAoB;KACrC,CAAC;IAEF,OAAO,QAAQ,CAAC,UAAU,CAAC,IAAI,iBAAiB,CAAC;AACnD,CAAC"}
@@ -1,4 +1,5 @@
1
- import { GenerateContentFunction, PromptItem } from '../../ai-service/common.js';
1
+ import { GenerateContentFunction } from '../../ai-service/common-types.js';
2
+ import { PromptItem } from '../../ai-service/common-types.js';
2
3
  import { CodegenOptions } from '../../main/codegen-types.js';
3
4
  import { StepResult } from './steps-types.js';
4
5
  export declare const PLANNING_PROMPT = "Please analyze the conversation so far and help plan the implementation:\n\n1. Review the conversation history and requirements\n2. Thoughtfully analyze the problem\n3. Create a step-by-step implementation plan\n4. List all files that will be affected during implementation\n\nRemember to:\n- Consider both direct and indirect dependencies\n- Think about how changes in one file might affect others\n- Include all necessary file paths\n- Explain your reasoning for each step\n- Consider edge cases and potential issues\n\nOutput the plan using `codegenPlanning` function provding all the required fields.";
@@ -1,3 +1,4 @@
1
+ import { ModelType } from '../../ai-service/common-types.js';
1
2
  import { getFunctionDefs } from '../function-calling.js';
2
3
  import { putSystemMessage } from '../../main/common/content-bus.js';
3
4
  import { validateAndRecoverSingleResult } from './step-validate-recover.js';
@@ -40,7 +41,7 @@ export async function executeStepCodegenPlanning(generateContentFn, prompt, opti
40
41
  getFunctionDefs(),
41
42
  'codegenPlanning',
42
43
  options.temperature ?? 0.7,
43
- options.cheap ?? true,
44
+ options.cheap ? ModelType.CHEAP : ModelType.DEFAULT,
44
45
  options,
45
46
  ];
46
47
  try {
@@ -1 +1 @@
1
- {"version":3,"file":"step-codegen-planning.js","sourceRoot":"","sources":["../../../src/prompt/steps/step-codegen-planning.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAC5E,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,wBAAwB,EAAE,MAAM,0BAA0B,CAAC;AACpE,OAAO,EAAE,6BAA6B,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAE5G,MAAM,CAAC,MAAM,eAAe,GAAG;;;;;;;;;;;;;;qFAcsD,CAAC;AAEtF;;;;GAIG;AACH,MAAM,CAAC,KAAK,UAAU,0BAA0B,CAC9C,iBAA0C,EAC1C,MAAoB,EACpB,OAAuB;IAEvB,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AAc,CAAC;IACpC,MAAM,SAAS,GAAG,8BAA8B,EAAE,CAAC;IAEnD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,gBAAgB,CAAC,aAAa,SAAS,CAAC,MAAM,yBAAyB,CAAC,CAAC;QAEzE,KAAK,MAAM,IAAI,IAAI,SAAS,EAAE,CAAC;YAC7B,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC;oBACxB,MAAM,EAAE,cAAc;oBACtB,OAAO;oBACP,MAAM,EAAE,cAAc;iBACvB,CAAC,CAAC;gBACH,IAAI,MAAM,EAAE,CAAC;oBACX,cAAc,GAAG,MAAM,CAAC;gBAC1B,CAAC;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,gBAAgB,CAAC,gCAAiC,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;gBAC7E,OAAO,CAAC,KAAK,CAAC,2BAA2B,EAAE,KAAK,CAAC,CAAC;YACpD,CAAC;QACH,CAAC;IACH,CAAC;IAED,OAAO,cAAc,CAAC;AACxB,CAAC"}
@@ -1,4 +1,5 @@
1
- import { GenerateContentFunction, PromptItem } from '../../ai-service/common.js';
1
+ import { GenerateContentFunction } from '../../ai-service/common-types.js';
2
+ import { PromptItem } from '../../ai-service/common-types.js';
2
3
  import { CodegenOptions } from '../../main/codegen-types.js';
3
4
  import { StepResult } from './steps-types.js';
4
5
  export declare const OPTIMIZATION_PROMPT = "You need to analyze the provided source code files and determine their relevance to the user's prompt. You will then call the `optimizeContext` function with the results.\n\n**Crucially, only include files in the `optimizedContext` array of the `optimizeContext` function call if their calculated relevance score is 0.5 or greater.**\n\nHere are the detailed steps:\n\n1. **Relevance Assessment (Scores from 0.0 to 1.0):**\n - Evaluate the relevance of each file to the user's prompt based on the following scale:\n - 0.0 \u2013 0.3: Not Relevant\n - 0.3 \u2013 0.7: Somewhat Relevant\n - 0.7 \u2013 0.9: Moderately Relevant\n - 0.9 \u2013 1.0: Highly Relevant\n - Consider:\n - Directly implements the core logic required to address the prompt's features.\n - Role in dependency chains of relevant files.\n - Keyword matches with the prompt.\n - Importance as a dependency.\n\n2. **Dependency Consideration:**\n - Understand how files depend on each other.\n - Prioritize files that are directly relevant or are dependencies of highly relevant files.\n - When evaluating a file, consider its position within dependency chains, but **do not include a file in the `optimizedContext` if its individual relevance score is below 0.5, even if it's part of a dependency chain of a relevant file.**\n\n3. **Token Awareness:**\n - Be mindful of token usage, but **relevance (specifically a score of 0.5 or higher) is the primary criterion for inclusion in `optimizedContext`.**\n\n4. **Function Call - `optimizeContext`:**\n - Call the `optimizeContext` function with the following arguments:\n - `\"userPrompt\"`: The original user prompt.\n - `\"reasoning\"`: A detailed, step-by-step explanation of the thought process used to determine the optimized context.\n - `\"optimizedContext\"`: **An array containing ONLY files with a relevance score of 0.5 or higher.** Each object in the array should have:\n - `\"reasoning\"`: Specific reasoning for why *this particular file* is relevant and has a score of 0.5 or higher.\n - `\"filePath\"`: Absolute file path.\n - `\"relevance\"`: The calculated relevance score (0.5 to 1.0).\n\n**Important Guidelines:**\n\n- **Strict Filtering:** **Only files with a relevance score of 0.5 or more should be included in the `optimizedContext` array.**\n- **No Guessing:** Only use files provided in the `getSourceCode` response.\n- **Evaluate Individually and in Chains:** Consider both individual relevance and dependencies, but the 0.5 threshold is paramount for inclusion.\n- **Proper JSON:** Ensure the `optimizeContext` call is valid JSON.\n- **Full Paths:** Use absolute file paths.\n- **Focus on 0.5+:** The `optimizedContext` array should be exclusively populated with files meeting the relevance criteria.\n- **Handling Codebase-Wide Operations:**\n - If the user prompt indicates a codebase-wide operation, choose one of the following `optimizeContext` strategies:\n - **Empty Context:** For operations applying to all files simultaneously, call `optimizeContext` with an empty `optimizedContext` and explain in the `reasoning`.\n - **Main Entry Points:** For operations starting with key files, identify main entry points and call `optimizeContext` with these files (relevance=1.0), explaining in the `reasoning`.\n- **Data Flow Consideration**: Consider the entire lifecycle of the data involved in the user's request, from the user interface to the database and back. Include files involved in handling, storing, and transmitting this data.\n- **Intent and Contribution Analysis:** For each file, evaluate its purpose and how it contributes to fulfilling the user's prompt. Consider the flow of logic and data. Which files are essential for the requested outcome, not just tangentially related?\n- **Functional Web Analysis:** Think of the codebase as a web of interconnected functionalities. Identify the key functional areas involved in the user's prompt and trace the connections between files within these areas.\n- **Core Responsibility Assessment:** Identify the files that are primarily responsible for managing the lifecycle, data, or logic of the entities involved in the `userPrompt`. These files are likely to be highly relevant.\n- **Data Flow Mapping:** Trace the flow of data related to the user's request. Identify the files involved in creating, storing, transforming, and retrieving this data.\n\nNow, analyze the source code and call the `optimizeContext` function accordingly.";
@@ -1,13 +1,14 @@
1
+ import { ModelType } from '../../ai-service/common-types.js';
1
2
  import { putSystemMessage } from '../../main/common/content-bus.js';
2
3
  import { getSourceCode } from '../../files/read-files.js';
3
4
  import { getFunctionDefs } from '../function-calling.js';
4
5
  import { StepResult } from './steps-types.js';
5
6
  import { estimateTokenCount } from '../token-estimator.js';
6
- import { getSummary } from './step-summarization.js';
7
7
  import { validateAndRecoverSingleResult } from './step-validate-recover.js';
8
8
  import { getSourceCodeResponse } from './steps-utils.js';
9
9
  import { getSourceCodeTree, parseSourceCodeTree } from '../../files/source-code-tree.js';
10
10
  import { importantContext } from '../../main/config.js';
11
+ import { getSummary } from '../../files/summary-cache.js';
11
12
  export const OPTIMIZATION_PROMPT = `You need to analyze the provided source code files and determine their relevance to the user's prompt. You will then call the \`optimizeContext\` function with the results.
12
13
 
13
14
  **Crucially, only include files in the \`optimizedContext\` array of the \`optimizeContext\` function call if their calculated relevance score is 0.5 or greater.**
@@ -70,7 +71,7 @@ export async function executeStepContextOptimization(generateContentFn, prompt,
70
71
  const tokensBefore = estimateTokenCount(JSON.stringify(fullSourceCode));
71
72
  const sourceCodeResponse = getSourceCodeResponse(prompt);
72
73
  if (!sourceCodeResponse || !sourceCodeResponse.content) {
73
- console.warn('Could not find source code response, something is wrong, but lets continue anyway.');
74
+ putSystemMessage('Could not find source code response, something is wrong, but lets continue anyway.');
74
75
  return StepResult.CONTINUE;
75
76
  }
76
77
  if (tokensBefore < MAX_TOTAL_TOKENS) {
@@ -97,7 +98,7 @@ export async function executeStepContextOptimization(generateContentFn, prompt,
97
98
  getFunctionDefs(),
98
99
  'optimizeContext',
99
100
  CONTEXT_OPTIMIZATION_TEMPERATURE,
100
- true,
101
+ ModelType.CHEAP,
101
102
  options,
102
103
  ];
103
104
  let result = await generateContentFn(...request);
@@ -111,7 +112,6 @@ export async function executeStepContextOptimization(generateContentFn, prompt,
111
112
  putSystemMessage('Context optimization did not generate changes to current context.');
112
113
  return StepResult.CONTINUE;
113
114
  }
114
- putSystemMessage('Context optimization in progress.', Array.from(optimizedContext));
115
115
  const [optimizedSourceCode, contentTokenCount, summaryTokenCount] = optimizeSourceCode(sourceCode, fullSourceCode, Array.from(optimizedContext), irrelevantFiles);
116
116
  const tokensAfter = estimateTokenCount(JSON.stringify(optimizedSourceCode));
117
117
  const percentageReduced = ((tokensBefore - tokensAfter) / tokensBefore) * 100;
@@ -119,7 +119,6 @@ export async function executeStepContextOptimization(generateContentFn, prompt,
119
119
  clearPreviousSourceCodeResponses(prompt, irrelevantFiles);
120
120
  prompt.push({
121
121
  type: 'assistant',
122
- text: 'Requesting content of the following files:\n' + Object.keys(optimizedSourceCode).join('\n'),
123
122
  functionCalls: [
124
123
  {
125
124
  name: 'requestFilesContent',
@@ -136,7 +135,6 @@ export async function executeStepContextOptimization(generateContentFn, prompt,
136
135
  ],
137
136
  }, {
138
137
  type: 'user',
139
- text: 'Providing content of the requested files:\n' + Object.keys(optimizedSourceCode).join('\n'),
140
138
  functionResponses: [
141
139
  {
142
140
  name: 'requestFilesContent',
@@ -155,12 +153,12 @@ export async function executeStepContextOptimization(generateContentFn, prompt,
155
153
  contentTokenCount,
156
154
  summaryTokenCount,
157
155
  percentageReduced: percentageReduced.toFixed(2) + '%',
156
+ optimizedContext,
158
157
  });
159
158
  return StepResult.CONTINUE;
160
159
  }
161
160
  catch (error) {
162
161
  putSystemMessage('Error: Context optimization failed. This is unexpected.');
163
- console.error('Context optimization error:', error);
164
162
  return StepResult.BREAK;
165
163
  }
166
164
  }