genaicode 0.8.5 → 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.
- package/README.md +18 -1
- package/dist/ai-service/ai-studio.d.ts +2 -3
- package/dist/ai-service/ai-studio.js +55 -27
- package/dist/ai-service/ai-studio.js.map +1 -1
- package/dist/ai-service/anthropic.d.ts +2 -3
- package/dist/ai-service/anthropic.js +24 -8
- package/dist/ai-service/anthropic.js.map +1 -1
- package/dist/{src/ai-service/common.d.ts → ai-service/common-types.d.ts} +24 -26
- package/dist/ai-service/common-types.js +10 -0
- package/dist/ai-service/common-types.js.map +1 -0
- package/dist/ai-service/common.d.ts +3 -55
- package/dist/ai-service/common.js +19 -6
- package/dist/ai-service/common.js.map +1 -1
- package/dist/ai-service/dall-e.d.ts +2 -9
- package/dist/ai-service/dall-e.js +4 -11
- package/dist/ai-service/dall-e.js.map +1 -1
- package/dist/ai-service/openai.d.ts +15 -4
- package/dist/ai-service/openai.js +45 -20
- package/dist/ai-service/openai.js.map +1 -1
- package/dist/ai-service/service-configurations-types.d.ts +55 -0
- package/dist/ai-service/service-configurations-types.js +6 -0
- package/dist/ai-service/service-configurations-types.js.map +1 -0
- package/dist/ai-service/service-configurations.d.ts +3 -2
- package/dist/ai-service/service-configurations.js +5 -0
- package/dist/ai-service/service-configurations.js.map +1 -1
- package/dist/ai-service/unescape-function-call.d.ts +1 -1
- package/dist/ai-service/vertex-ai-claude.d.ts +2 -2
- package/dist/ai-service/vertex-ai-claude.js +22 -8
- package/dist/ai-service/vertex-ai-claude.js.map +1 -1
- package/dist/ai-service/vertex-ai-imagen.d.ts +2 -9
- package/dist/ai-service/vertex-ai-imagen.js +4 -11
- package/dist/ai-service/vertex-ai-imagen.js.map +1 -1
- package/dist/ai-service/vertex-ai.d.ts +2 -3
- package/dist/ai-service/vertex-ai.js +17 -12
- package/dist/ai-service/vertex-ai.js.map +1 -1
- package/dist/cli/cli-params.d.ts +1 -1
- package/dist/cli/cli-params.js +1 -1
- package/dist/cli/cli-params.js.map +1 -1
- package/dist/files/read-files.d.ts +1 -28
- package/dist/files/read-files.js +1 -1
- package/dist/files/read-files.js.map +1 -1
- package/dist/files/source-code-tree.d.ts +3 -1
- package/dist/files/source-code-tree.js.map +1 -1
- package/dist/files/source-code-types.d.ts +26 -0
- package/dist/files/source-code-types.js +2 -0
- package/dist/files/source-code-types.js.map +1 -0
- package/dist/files/summary-cache.d.ts +20 -0
- package/dist/files/summary-cache.js +15 -0
- package/dist/files/summary-cache.js.map +1 -0
- package/dist/files/update-files.d.ts +1 -1
- package/dist/help-docs/genaicode-help-document.d.ts +1 -0
- package/dist/help-docs/genaicode-help-document.js +286 -0
- package/dist/help-docs/genaicode-help-document.js.map +1 -0
- package/dist/index.d.ts +2 -4
- package/dist/index.js +1 -3
- package/dist/index.js.map +1 -1
- package/dist/main/codegen-types.d.ts +12 -10
- package/dist/main/codegen-utils.d.ts +1 -1
- package/dist/main/codegen.d.ts +4 -3
- package/dist/main/codegen.js.map +1 -1
- package/dist/main/codegen.test-utils.d.ts +1 -1
- package/dist/main/common/abort-controller.d.ts +2 -0
- package/dist/main/common/abort-controller.js +5 -0
- package/dist/main/common/abort-controller.js.map +1 -0
- package/dist/main/common/app-context-bus.d.ts +11 -0
- package/dist/main/common/app-context-bus.js +29 -0
- package/dist/main/common/app-context-bus.js.map +1 -0
- package/dist/main/common/content-bus-types.d.ts +1 -1
- package/dist/main/common/content-bus.d.ts +1 -1
- package/dist/main/common/cost-collector.d.ts +3 -2
- package/dist/main/common/cost-collector.js +3 -3
- package/dist/main/common/cost-collector.js.map +1 -1
- package/dist/main/common/user-actions.d.ts +3 -3
- package/dist/main/common/user-actions.js +17 -8
- package/dist/main/common/user-actions.js.map +1 -1
- package/dist/main/config-lib.d.ts +1 -36
- package/dist/main/config-lib.js.map +1 -1
- package/dist/main/config-schema.js +10 -0
- package/dist/main/config-schema.js.map +1 -1
- package/dist/main/config-types.d.ts +42 -0
- package/dist/main/config-types.js +2 -0
- package/dist/main/config-types.js.map +1 -0
- package/dist/main/config.d.ts +1 -1
- package/dist/main/config.js +1 -1
- package/dist/main/config.js.map +1 -1
- package/dist/main/interactive/codegen-worker.d.ts +0 -1
- package/dist/main/interactive/codegen-worker.js +4 -3
- package/dist/main/interactive/codegen-worker.js.map +1 -1
- package/dist/main/interactive/select-ai-service.d.ts +1 -1
- package/dist/main/plugin-loader.d.ts +6 -4
- package/dist/main/plugin-loader.js.map +1 -1
- package/dist/main/ui/backend/endpoints/context-endpoint.js +67 -0
- package/dist/main/ui/backend/endpoints/context-endpoint.js.map +1 -0
- package/dist/main/ui/backend/endpoints/generate-content-endpoint.js +2 -1
- package/dist/main/ui/backend/endpoints/generate-content-endpoint.js.map +1 -1
- package/dist/main/ui/backend/endpoints/index.d.ts +1 -0
- package/dist/main/ui/backend/endpoints/index.js +1 -0
- package/dist/main/ui/backend/endpoints/index.js.map +1 -1
- package/dist/main/ui/backend/server.d.ts +2 -1
- package/dist/main/ui/backend/server.js +2 -1
- package/dist/main/ui/backend/server.js.map +1 -1
- package/dist/main/ui/backend/service.d.ts +30 -5
- package/dist/main/ui/backend/service.js +41 -3
- package/dist/main/ui/backend/service.js.map +1 -1
- package/dist/main/ui/codegen-ui.d.ts +5 -1
- package/dist/main/ui/codegen-ui.js +10 -1
- package/dist/main/ui/codegen-ui.js.map +1 -1
- package/dist/main/ui/common/api-types.d.ts +4 -51
- package/dist/main/ui/frontend/assets/favicon-DvroFOpS.png +0 -0
- package/dist/main/ui/frontend/assets/index-DfiFNFf2.js +1771 -0
- package/dist/main/ui/frontend/assets/wolf-bark-Bl17CX4O.mp3 +0 -0
- package/dist/main/ui/frontend/index.html +2 -2
- package/dist/operations/create-directory/create-directory-def.d.ts +1 -1
- package/dist/operations/create-file/create-file-def.d.ts +1 -1
- package/dist/operations/create-file/create-file-def.js +2 -1
- package/dist/operations/create-file/create-file-def.js.map +1 -1
- package/dist/operations/delete-file/delete-file-def.d.ts +1 -1
- package/dist/operations/download-file/download-file-def.d.ts +1 -1
- package/dist/operations/imgly-remove-background/imgly-remove-background-def.d.ts +1 -1
- package/dist/operations/move-file/move-file-def.d.ts +1 -1
- package/dist/operations/patch-file/patch-file-def.d.ts +1 -1
- package/dist/operations/patch-file/patch-file-def.js +2 -1
- package/dist/operations/patch-file/patch-file-def.js.map +1 -1
- package/dist/operations/resize-image/resize-image-def.d.ts +1 -1
- package/dist/operations/split-image/split-image-def.d.ts +1 -1
- package/dist/operations/update-file/update-file-def.d.ts +1 -1
- package/dist/operations/update-file/update-file-def.js +2 -1
- package/dist/operations/update-file/update-file-def.js.map +1 -1
- package/dist/prompt/ai-service-fallback.d.ts +4 -3
- package/dist/prompt/ai-service-fallback.js +10 -58
- package/dist/prompt/ai-service-fallback.js.map +1 -1
- package/dist/prompt/function-calling-validate.d.ts +2 -2
- package/dist/prompt/function-calling-validate.js +4 -5
- package/dist/prompt/function-calling-validate.js.map +1 -1
- package/dist/prompt/function-calling.d.ts +1 -1
- package/dist/prompt/function-calling.js +13 -2
- package/dist/prompt/function-calling.js.map +1 -1
- package/dist/prompt/function-defs/analysis-result.d.ts +7 -0
- package/dist/prompt/function-defs/analysis-result.js +24 -0
- package/dist/prompt/function-defs/analysis-result.js.map +1 -0
- package/dist/prompt/function-defs/ask-question.d.ts +4 -2
- package/dist/prompt/function-defs/ask-question.js +130 -102
- package/dist/prompt/function-defs/ask-question.js.map +1 -1
- package/dist/prompt/function-defs/codegen-planning.d.ts +1 -1
- package/dist/prompt/function-defs/codegen-planning.js +11 -1
- package/dist/prompt/function-defs/codegen-planning.js.map +1 -1
- package/dist/prompt/function-defs/codegen-summary.d.ts +1 -1
- package/dist/prompt/function-defs/codegen-summary.js +19 -10
- package/dist/prompt/function-defs/codegen-summary.js.map +1 -1
- package/dist/prompt/function-defs/explanation.d.ts +1 -1
- package/dist/prompt/function-defs/genaicode-help.d.ts +6 -0
- package/dist/prompt/function-defs/genaicode-help.js +23 -0
- package/dist/prompt/function-defs/genaicode-help.js.map +1 -0
- package/dist/prompt/function-defs/generate-image.d.ts +1 -1
- package/dist/prompt/function-defs/get-image-assets.d.ts +1 -1
- package/dist/prompt/function-defs/get-source-code.d.ts +1 -1
- package/dist/prompt/function-defs/optimize-context.d.ts +1 -1
- package/dist/prompt/function-defs/optimize-context.js +2 -2
- package/dist/prompt/function-defs/optimize-context.js.map +1 -1
- package/dist/prompt/function-defs/perform-analysis.d.ts +8 -0
- package/dist/prompt/function-defs/perform-analysis.js +28 -0
- package/dist/prompt/function-defs/perform-analysis.js.map +1 -0
- package/dist/prompt/function-defs/read-history.d.ts +1 -1
- package/dist/prompt/function-defs/reasoning-inference.d.ts +3 -0
- package/dist/prompt/function-defs/reasoning-inference.js +39 -0
- package/dist/prompt/function-defs/reasoning-inference.js.map +1 -0
- package/dist/prompt/function-defs/set-summaries.d.ts +1 -1
- package/dist/prompt/function-defs/update-history.d.ts +1 -1
- package/dist/prompt/limits.js +1 -1
- package/dist/prompt/prompt-service.d.ts +5 -2
- package/dist/prompt/prompt-service.js +3 -3
- package/dist/prompt/prompt-service.js.map +1 -1
- package/dist/prompt/prompt-service.test-utils.d.ts +2 -2
- package/dist/prompt/prompt-service.test-utils.js +2 -1
- package/dist/prompt/prompt-service.test-utils.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/code-generation.d.ts +2 -0
- package/dist/prompt/steps/step-ask-question/handlers/code-generation.js +11 -9
- package/dist/prompt/steps/step-ask-question/handlers/code-generation.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.d.ts +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.js +4 -8
- package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/context-optimization.d.ts +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/context-optimization.js +3 -7
- package/dist/prompt/steps/step-ask-question/handlers/context-optimization.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/genaicode-help-document.d.ts +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/genaicode-help-document.js +251 -0
- package/dist/prompt/steps/step-ask-question/handlers/genaicode-help-document.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.d.ts +2 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js +157 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.d.ts +2 -0
- package/dist/prompt/steps/step-ask-question/handlers/{cancel-code-generation.js → handle-end-conversation.js} +3 -3
- package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.d.ts +8 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js +91 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.d.ts +2 -0
- package/dist/prompt/steps/step-ask-question/handlers/{handle-send-message-with-image.js → handle-generate-image.js} +30 -31
- package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.d.ts +6 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js +99 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.d.ts +9 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js +90 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.d.ts +9 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js +91 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.d.ts +7 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js +87 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.d.ts +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js +7 -7
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.d.ts +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js +3 -6
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.d.ts +2 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js +167 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/lint.d.ts +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/lint.js +27 -7
- package/dist/prompt/steps/step-ask-question/handlers/lint.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.d.ts +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.js +5 -4
- package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/request-files-content.d.ts +8 -2
- package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js +47 -47
- package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/request-permissions.d.ts +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/request-permissions.js +6 -5
- package/dist/prompt/steps/step-ask-question/handlers/request-permissions.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question-types.d.ts +78 -21
- package/dist/prompt/steps/step-ask-question/step-ask-question.d.ts +5 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question.js +37 -21
- package/dist/prompt/steps/step-ask-question/step-ask-question.js.map +1 -1
- package/dist/prompt/steps/step-codegen-planning.d.ts +2 -1
- package/dist/prompt/steps/step-codegen-planning.js +2 -1
- package/dist/prompt/steps/step-codegen-planning.js.map +1 -1
- package/dist/prompt/steps/step-context-optimization.d.ts +5 -1
- package/dist/prompt/steps/step-context-optimization.js +64 -54
- package/dist/prompt/steps/step-context-optimization.js.map +1 -1
- package/dist/prompt/steps/step-ensure-context.d.ts +1 -1
- package/dist/prompt/steps/step-ensure-context.js +3 -0
- package/dist/prompt/steps/step-ensure-context.js.map +1 -1
- package/dist/prompt/steps/step-generate-codegen-summary-prompt.d.ts +2 -0
- package/dist/prompt/steps/step-generate-codegen-summary-prompt.js +133 -0
- package/dist/prompt/steps/step-generate-codegen-summary-prompt.js.map +1 -0
- package/dist/prompt/steps/step-generate-codegen-summary.d.ts +6 -3
- package/dist/prompt/steps/step-generate-codegen-summary.js +14 -2
- package/dist/prompt/steps/step-generate-codegen-summary.js.map +1 -1
- package/dist/prompt/steps/step-generate-image.d.ts +2 -1
- package/dist/prompt/steps/step-generate-image.js +4 -2
- package/dist/prompt/steps/step-generate-image.js.map +1 -1
- package/dist/prompt/steps/step-generate-summary.d.ts +2 -1
- package/dist/prompt/steps/step-generate-summary.js +3 -2
- package/dist/prompt/steps/step-generate-summary.js.map +1 -1
- package/dist/prompt/steps/step-history-update.d.ts +2 -1
- package/dist/prompt/steps/step-history-update.js +9 -1
- package/dist/prompt/steps/step-history-update.js.map +1 -1
- package/dist/prompt/steps/step-process-file-updates.d.ts +7 -3
- package/dist/prompt/steps/step-process-file-updates.js +9 -7
- package/dist/prompt/steps/step-process-file-updates.js.map +1 -1
- package/dist/prompt/steps/step-summarization.d.ts +2 -6
- package/dist/prompt/steps/step-summarization.js +11 -15
- package/dist/prompt/steps/step-summarization.js.map +1 -1
- package/dist/prompt/steps/step-validate-recover.d.ts +4 -2
- package/dist/prompt/steps/step-validate-recover.js +8 -6
- package/dist/prompt/steps/step-validate-recover.js.map +1 -1
- package/dist/prompt/steps/step-verify-patch.d.ts +4 -1
- package/dist/prompt/steps/step-verify-patch.js +15 -2
- package/dist/prompt/steps/step-verify-patch.js.map +1 -1
- package/dist/prompt/steps/steps-types.d.ts +0 -14
- package/dist/prompt/steps/steps-types.js.map +1 -1
- package/dist/prompt/steps/steps-utils.d.ts +1 -1
- package/dist/prompt/systemprompt.d.ts +2 -1
- package/dist/prompt/systemprompt.js +52 -15
- package/dist/prompt/systemprompt.js.map +1 -1
- package/dist/{eval → prompt-debug}/current-prompt-plugin.d.ts +1 -1
- package/dist/{eval → prompt-debug}/current-prompt-plugin.js +1 -1
- package/dist/prompt-debug/current-prompt-plugin.js.map +1 -0
- package/dist/vite-genaicode/vite-genaicode-context.d.ts +31 -0
- package/dist/vite-genaicode/vite-genaicode-context.js +120 -0
- package/dist/vite-genaicode/vite-genaicode-context.js.map +1 -0
- package/dist/vite-genaicode/vite-genaicode-frontend.js +206 -30
- package/dist/vite-genaicode/vite-genaicode-frontend.js.map +1 -1
- package/dist/vite-genaicode/vite-genaicode-plugin.d.ts +1 -0
- package/dist/vite-genaicode/vite-genaicode-plugin.js +22 -9
- package/dist/vite-genaicode/vite-genaicode-plugin.js.map +1 -1
- package/dist/vite-genaicode/vite-genaicode-types.d.ts +26 -0
- package/dist/vite-genaicode/vite-genaicode-types.js +11 -0
- package/dist/vite-genaicode/vite-genaicode-types.js.map +1 -0
- package/package.json +10 -3
- package/dist/ai-service/ai-studio.d.ts.map +0 -1
- package/dist/ai-service/anthropic.d.ts.map +0 -1
- package/dist/ai-service/chat-gpt.d.ts +0 -7
- package/dist/ai-service/chat-gpt.d.ts.map +0 -1
- package/dist/ai-service/chat-gpt.js +0 -174
- package/dist/ai-service/chat-gpt.js.map +0 -1
- package/dist/ai-service/common.d.ts.map +0 -1
- package/dist/ai-service/common.test.js +0 -86
- package/dist/ai-service/common.test.js.map +0 -1
- package/dist/ai-service/dall-e.d.ts.map +0 -1
- package/dist/ai-service/unescape-function-call.d.ts.map +0 -1
- package/dist/ai-service/unescape-function-call.test.d.ts +0 -1
- package/dist/ai-service/unescape-function-call.test.js +0 -18
- package/dist/ai-service/unescape-function-call.test.js.map +0 -1
- package/dist/ai-service/vertex-ai-claude.d.ts.map +0 -1
- package/dist/ai-service/vertex-ai-imagen.d.ts.map +0 -1
- package/dist/ai-service/vertex-ai.d.ts.map +0 -1
- package/dist/cli/cli-options.d.ts.map +0 -1
- package/dist/cli/cli-options.test.d.ts +0 -1
- package/dist/cli/cli-options.test.js +0 -34
- package/dist/cli/cli-options.test.js.map +0 -1
- package/dist/cli/cli-params.d.ts.map +0 -1
- package/dist/cli/cli-params.test.d.ts +0 -1
- package/dist/cli/cli-params.test.js +0 -38
- package/dist/cli/cli-params.test.js.map +0 -1
- package/dist/cli/service-autodetect.d.ts.map +0 -1
- package/dist/cli/service-autodetect.test.d.ts +0 -1
- package/dist/cli/service-autodetect.test.js +0 -38
- package/dist/cli/service-autodetect.test.js.map +0 -1
- package/dist/cli/validate-cli-params.d.ts.map +0 -1
- package/dist/cli/validate-cli-params.test.d.ts +0 -1
- package/dist/cli/validate-cli-params.test.js +0 -106
- package/dist/cli/validate-cli-params.test.js.map +0 -1
- package/dist/eval/codegen-summary.test.d.ts +0 -1
- package/dist/eval/codegen-summary.test.js +0 -93
- package/dist/eval/codegen-summary.test.js.map +0 -1
- package/dist/eval/current-prompt-plugin.js.map +0 -1
- package/dist/eval/data/current-prompt.d.ts +0 -149
- package/dist/eval/data/current-prompt.js +0 -314
- package/dist/eval/data/current-prompt.js.map +0 -1
- package/dist/eval/data/prompt-assistant-image.d.ts +0 -49
- package/dist/eval/data/prompt-assistant-image.js +0 -67
- package/dist/eval/data/prompt-assistant-image.js.map +0 -1
- package/dist/eval/data/prompt3.d.ts +0 -34
- package/dist/eval/data/prompt3.js +0 -71
- package/dist/eval/data/prompt3.js.map +0 -1
- package/dist/eval/prompt-debug.test.d.ts +0 -1
- package/dist/eval/prompt-debug.test.js +0 -93
- package/dist/eval/prompt-debug.test.js.map +0 -1
- package/dist/eval/prompt2.d.ts +0 -34
- package/dist/eval/prompt2.js +0 -125
- package/dist/eval/prompt2.js.map +0 -1
- package/dist/examples/genaicode_plugins/fake_ai_service.d.ts +0 -3
- package/dist/examples/genaicode_plugins/fake_ai_service.js +0 -11
- package/dist/examples/genaicode_plugins/fake_ai_service.js.map +0 -1
- package/dist/examples/genaicode_plugins/grok_ai_service.d.ts +0 -3
- package/dist/examples/genaicode_plugins/grok_ai_service.js +0 -153
- package/dist/examples/genaicode_plugins/grok_ai_service.js.map +0 -1
- package/dist/examples/genaicode_plugins/nonsense_operation.d.ts +0 -3
- package/dist/examples/genaicode_plugins/nonsense_operation.js +0 -23
- package/dist/examples/genaicode_plugins/nonsense_operation.js.map +0 -1
- package/dist/files/cache-file.d.ts.map +0 -1
- package/dist/files/file-utils.d.ts.map +0 -1
- package/dist/files/file-utils.test.d.ts +0 -1
- package/dist/files/file-utils.test.js +0 -18
- package/dist/files/file-utils.test.js.map +0 -1
- package/dist/files/find-files.d.ts.map +0 -1
- package/dist/files/path-utils.d.ts.map +0 -1
- package/dist/files/read-files.d.ts.map +0 -1
- package/dist/files/read-files.test.d.ts +0 -1
- package/dist/files/read-files.test.js +0 -95
- package/dist/files/read-files.test.js.map +0 -1
- package/dist/files/search-files.d.ts.map +0 -1
- package/dist/files/source-code-tree.d.ts.map +0 -1
- package/dist/files/temp-buffer.d.ts.map +0 -1
- package/dist/files/update-files.d.ts.map +0 -1
- package/dist/images/ensure-alpha.d.ts.map +0 -1
- package/dist/images/imgly-remove-background.d.ts.map +0 -1
- package/dist/images/resize-image.d.ts.map +0 -1
- package/dist/images/split-image.d.ts.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/main/codegen-non-interactive.d.ts.map +0 -1
- package/dist/main/codegen-types.d.ts.map +0 -1
- package/dist/main/codegen-utils.d.ts.map +0 -1
- package/dist/main/codegen.ai-services.test.d.ts +0 -3
- package/dist/main/codegen.ai-services.test.js +0 -198
- package/dist/main/codegen.ai-services.test.js.map +0 -1
- package/dist/main/codegen.cli-options.test.d.ts +0 -3
- package/dist/main/codegen.cli-options.test.js +0 -171
- package/dist/main/codegen.cli-options.test.js.map +0 -1
- package/dist/main/codegen.d.ts.map +0 -1
- package/dist/main/codegen.image-generation.test.d.ts +0 -3
- package/dist/main/codegen.image-generation.test.js +0 -187
- package/dist/main/codegen.image-generation.test.js.map +0 -1
- package/dist/main/codegen.test-utils.d.ts.map +0 -1
- package/dist/main/codegen.test.d.ts +0 -3
- package/dist/main/codegen.test.js +0 -307
- package/dist/main/codegen.test.js.map +0 -1
- package/dist/main/common/content-bus-types.d.ts.map +0 -1
- package/dist/main/common/content-bus.d.ts.map +0 -1
- package/dist/main/common/cost-collector.d.ts.map +0 -1
- package/dist/main/common/user-actions.d.ts.map +0 -1
- package/dist/main/config-lib.d.ts.map +0 -1
- package/dist/main/config-lib.test.d.ts +0 -1
- package/dist/main/config-lib.test.js +0 -64
- package/dist/main/config-lib.test.js.map +0 -1
- package/dist/main/config.d.ts.map +0 -1
- package/dist/main/interactive/codegen-interactive.d.ts.map +0 -1
- package/dist/main/interactive/codegen-interactive.test.d.ts +0 -5
- package/dist/main/interactive/codegen-interactive.test.js +0 -73
- package/dist/main/interactive/codegen-interactive.test.js.map +0 -1
- package/dist/main/interactive/codegen-worker.d.ts.map +0 -1
- package/dist/main/interactive/common.d.ts.map +0 -1
- package/dist/main/interactive/configure.d.ts.map +0 -1
- package/dist/main/interactive/error-handling.d.ts.map +0 -1
- package/dist/main/interactive/help.d.ts.map +0 -1
- package/dist/main/interactive/process-comments.d.ts +0 -2
- package/dist/main/interactive/process-comments.js +0 -39
- package/dist/main/interactive/process-comments.js.map +0 -1
- package/dist/main/interactive/select-ai-service.d.ts.map +0 -1
- package/dist/main/interactive/task-file.d.ts.map +0 -1
- package/dist/main/interactive/text-prompt.d.ts.map +0 -1
- package/dist/main/interactive/user-action-handlers.d.ts.map +0 -1
- package/dist/main/interactive/user-interrupt.d.ts.map +0 -1
- package/dist/main/plugin-loader.d.ts.map +0 -1
- package/dist/main/ui/backend/api-utils.d.ts.map +0 -1
- package/dist/main/ui/backend/api.d.ts.map +0 -1
- package/dist/main/ui/backend/server.d.ts.map +0 -1
- package/dist/main/ui/backend/service.d.ts.map +0 -1
- package/dist/main/ui/codegen-ui.d.ts.map +0 -1
- package/dist/main/ui/common/api-types.d.ts.map +0 -1
- package/dist/main/ui/frontend/assets/index-DY7-_JMu.js +0 -1759
- package/dist/main/ui/user-action-handlers.d.ts.map +0 -1
- package/dist/operations/create-directory/create-directory-def.d.ts.map +0 -1
- package/dist/operations/create-directory/create-directory-executor.d.ts.map +0 -1
- package/dist/operations/create-file/create-file-def.d.ts.map +0 -1
- package/dist/operations/create-file/create-file-executor.d.ts.map +0 -1
- package/dist/operations/delete-file/delete-file-def.d.ts.map +0 -1
- package/dist/operations/delete-file/delete-file-executor.d.ts.map +0 -1
- package/dist/operations/download-file/download-file-def.d.ts.map +0 -1
- package/dist/operations/download-file/download-file-executor.d.ts.map +0 -1
- package/dist/operations/imgly-remove-background/imgly-remove-background-def.d.ts.map +0 -1
- package/dist/operations/imgly-remove-background/imgly-remove-background-executor.d.ts.map +0 -1
- package/dist/operations/move-file/move-file-def.d.ts.map +0 -1
- package/dist/operations/move-file/move-file-executor.d.ts.map +0 -1
- package/dist/operations/operations-index.d.ts.map +0 -1
- package/dist/operations/patch-file/patch-file-def.d.ts.map +0 -1
- package/dist/operations/patch-file/patch-file-executor.d.ts.map +0 -1
- package/dist/operations/resize-image/resize-image-def.d.ts.map +0 -1
- package/dist/operations/resize-image/resize-image-executor.d.ts.map +0 -1
- package/dist/operations/split-image/split-image-def.d.ts.map +0 -1
- package/dist/operations/split-image/split-image-executor.d.ts.map +0 -1
- package/dist/operations/update-file/update-file-def.d.ts.map +0 -1
- package/dist/operations/update-file/update-file-executor.d.ts.map +0 -1
- package/dist/project-profiles/detection.d.ts.map +0 -1
- package/dist/project-profiles/index.d.ts.map +0 -1
- package/dist/project-profiles/profiles/golang.d.ts.map +0 -1
- package/dist/project-profiles/profiles/java-maven.d.ts.map +0 -1
- package/dist/project-profiles/profiles/javascript-npm.d.ts.map +0 -1
- package/dist/project-profiles/profiles/javascript-react.d.ts.map +0 -1
- package/dist/project-profiles/profiles/python-django.d.ts.map +0 -1
- package/dist/project-profiles/types.d.ts.map +0 -1
- package/dist/prompt/ai-service-fallback.d.ts.map +0 -1
- package/dist/prompt/function-calling-validate.d.ts.map +0 -1
- package/dist/prompt/function-calling.d.ts.map +0 -1
- package/dist/prompt/function-defs/ask-question-reflect.d.ts +0 -2
- package/dist/prompt/function-defs/ask-question-reflect.js +0 -21
- package/dist/prompt/function-defs/ask-question-reflect.js.map +0 -1
- package/dist/prompt/function-defs/ask-question.d.ts.map +0 -1
- package/dist/prompt/function-defs/codegen-planning.d.ts.map +0 -1
- package/dist/prompt/function-defs/codegen-summary.d.ts.map +0 -1
- package/dist/prompt/function-defs/create-directory.d.ts +0 -21
- package/dist/prompt/function-defs/create-directory.js +0 -22
- package/dist/prompt/function-defs/create-directory.js.map +0 -1
- package/dist/prompt/function-defs/create-file.d.ts +0 -25
- package/dist/prompt/function-defs/create-file.js +0 -26
- package/dist/prompt/function-defs/create-file.js.map +0 -1
- package/dist/prompt/function-defs/delete-file.d.ts +0 -21
- package/dist/prompt/function-defs/delete-file.js +0 -22
- package/dist/prompt/function-defs/delete-file.js.map +0 -1
- package/dist/prompt/function-defs/download-file.d.ts +0 -25
- package/dist/prompt/function-defs/download-file.js +0 -26
- package/dist/prompt/function-defs/download-file.js.map +0 -1
- package/dist/prompt/function-defs/explanation.d.ts.map +0 -1
- package/dist/prompt/function-defs/generate-image.d.ts.map +0 -1
- package/dist/prompt/function-defs/get-image-assets.d.ts.map +0 -1
- package/dist/prompt/function-defs/get-source-code.d.ts.map +0 -1
- package/dist/prompt/function-defs/imgly-remove-background.d.ts +0 -25
- package/dist/prompt/function-defs/imgly-remove-background.js +0 -26
- package/dist/prompt/function-defs/imgly-remove-background.js.map +0 -1
- package/dist/prompt/function-defs/move-file.d.ts +0 -25
- package/dist/prompt/function-defs/move-file.js +0 -26
- package/dist/prompt/function-defs/move-file.js.map +0 -1
- package/dist/prompt/function-defs/optimize-context.d.ts.map +0 -1
- package/dist/prompt/function-defs/patch-file.d.ts +0 -25
- package/dist/prompt/function-defs/patch-file.js +0 -39
- package/dist/prompt/function-defs/patch-file.js.map +0 -1
- package/dist/prompt/function-defs/read-history.d.ts.map +0 -1
- package/dist/prompt/function-defs/resize-image.d.ts +0 -36
- package/dist/prompt/function-defs/resize-image.js +0 -37
- package/dist/prompt/function-defs/resize-image.js.map +0 -1
- package/dist/prompt/function-defs/set-summaries.d.ts.map +0 -1
- package/dist/prompt/function-defs/split-image.d.ts +0 -57
- package/dist/prompt/function-defs/split-image.js +0 -46
- package/dist/prompt/function-defs/split-image.js.map +0 -1
- package/dist/prompt/function-defs/update-file.d.ts +0 -25
- package/dist/prompt/function-defs/update-file.js +0 -26
- package/dist/prompt/function-defs/update-file.js.map +0 -1
- package/dist/prompt/function-defs/update-history.d.ts.map +0 -1
- package/dist/prompt/limits.d.ts.map +0 -1
- package/dist/prompt/limits.test.d.ts +0 -1
- package/dist/prompt/limits.test.js +0 -35
- package/dist/prompt/limits.test.js.map +0 -1
- package/dist/prompt/prompt-codegen.d.ts.map +0 -1
- package/dist/prompt/prompt-codegen.test.d.ts +0 -1
- package/dist/prompt/prompt-codegen.test.js +0 -92
- package/dist/prompt/prompt-codegen.test.js.map +0 -1
- package/dist/prompt/prompt-consts.d.ts +0 -1
- package/dist/prompt/prompt-consts.js +0 -2
- package/dist/prompt/prompt-consts.js.map +0 -1
- package/dist/prompt/prompt-service-ask-question.test.d.ts +0 -4
- package/dist/prompt/prompt-service-ask-question.test.js +0 -162
- package/dist/prompt/prompt-service-ask-question.test.js.map +0 -1
- package/dist/prompt/prompt-service.ai-services.test.d.ts +0 -1
- package/dist/prompt/prompt-service.ai-services.test.js +0 -149
- package/dist/prompt/prompt-service.ai-services.test.js.map +0 -1
- package/dist/prompt/prompt-service.context-optimization.test.d.ts +0 -1
- package/dist/prompt/prompt-service.context-optimization.test.js +0 -212
- package/dist/prompt/prompt-service.context-optimization.test.js.map +0 -1
- package/dist/prompt/prompt-service.d.ts.map +0 -1
- package/dist/prompt/prompt-service.image-handling.test.d.ts +0 -1
- package/dist/prompt/prompt-service.image-handling.test.js +0 -212
- package/dist/prompt/prompt-service.image-handling.test.js.map +0 -1
- package/dist/prompt/prompt-service.test-utils.d.ts.map +0 -1
- package/dist/prompt/prompt-service.test.d.ts +0 -2
- package/dist/prompt/prompt-service.test.js +0 -629
- package/dist/prompt/prompt-service.test.js.map +0 -1
- package/dist/prompt/prompt-service.validation-recovery.test.d.ts +0 -1
- package/dist/prompt/prompt-service.validation-recovery.test.js +0 -263
- package/dist/prompt/prompt-service.validation-recovery.test.js.map +0 -1
- package/dist/prompt/static-prompts.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/cancel-code-generation.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/cancel-code-generation.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/cancel-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/code-generation.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/context-optimization.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/default-action.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/default-action.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/default-action.js +0 -15
- package/dist/prompt/steps/step-ask-question/handlers/default-action.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer-with-image.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer-with-image.js +0 -86
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer-with-image.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer.js +0 -20
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-answer.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message-with-image.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message-with-image.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message-with-image.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handler-utils.d.ts +0 -0
- package/dist/prompt/steps/step-ask-question/handlers/handler-utils.js +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handler-utils.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/lint.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/request-files-content.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/request-permissions.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/start-code-generation.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/start-code-generation.js +0 -16
- package/dist/prompt/steps/step-ask-question/handlers/start-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.d.ts +0 -0
- package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js +0 -2
- package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question-reflect.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/step-ask-question-reflect.js +0 -92
- package/dist/prompt/steps/step-ask-question/step-ask-question-reflect.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question-types.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question.d.ts.map +0 -1
- package/dist/prompt/steps/step-ask-question-handlers.d.ts +0 -10
- package/dist/prompt/steps/step-ask-question-handlers.js +0 -257
- package/dist/prompt/steps/step-ask-question-handlers.js.map +0 -1
- package/dist/prompt/steps/step-ask-question-reflect.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question-reflect.js +0 -48
- package/dist/prompt/steps/step-ask-question-reflect.js.map +0 -1
- package/dist/prompt/steps/step-ask-question-types.d.ts +0 -55
- package/dist/prompt/steps/step-ask-question-types.js +0 -2
- package/dist/prompt/steps/step-ask-question-types.js.map +0 -1
- package/dist/prompt/steps/step-ask-question.d.ts +0 -6
- package/dist/prompt/steps/step-ask-question.js +0 -80
- package/dist/prompt/steps/step-ask-question.js.map +0 -1
- package/dist/prompt/steps/step-codegen-planning.d.ts.map +0 -1
- package/dist/prompt/steps/step-codegen-summary.d.ts +0 -7
- package/dist/prompt/steps/step-codegen-summary.d.ts.map +0 -1
- package/dist/prompt/steps/step-codegen-summary.js +0 -106
- package/dist/prompt/steps/step-codegen-summary.js.map +0 -1
- package/dist/prompt/steps/step-codegen-summary.test.d.ts +0 -1
- package/dist/prompt/steps/step-codegen-summary.test.js +0 -136
- package/dist/prompt/steps/step-codegen-summary.test.js.map +0 -1
- package/dist/prompt/steps/step-context-optimization.d.ts.map +0 -1
- package/dist/prompt/steps/step-context-optimization.test.d.ts +0 -2
- package/dist/prompt/steps/step-context-optimization.test.js +0 -475
- package/dist/prompt/steps/step-context-optimization.test.js.map +0 -1
- package/dist/prompt/steps/step-ensure-context.d.ts.map +0 -1
- package/dist/prompt/steps/step-ensure-context.test.d.ts +0 -1
- package/dist/prompt/steps/step-ensure-context.test.js +0 -326
- package/dist/prompt/steps/step-ensure-context.test.js.map +0 -1
- package/dist/prompt/steps/step-generate-image.d.ts.map +0 -1
- package/dist/prompt/steps/step-generate-summary.d.ts.map +0 -1
- package/dist/prompt/steps/step-history-update.d.ts.map +0 -1
- package/dist/prompt/steps/step-summarization.d.ts.map +0 -1
- package/dist/prompt/steps/step-validate-recover.d.ts.map +0 -1
- package/dist/prompt/steps/step-verify-patch.d.ts.map +0 -1
- package/dist/prompt/steps/steps-types.d.ts.map +0 -1
- package/dist/prompt/steps/steps-utils.d.ts.map +0 -1
- package/dist/prompt/systemprompt.d.ts.map +0 -1
- package/dist/prompt/systemprompt.test.d.ts +0 -3
- package/dist/prompt/systemprompt.test.js +0 -42
- package/dist/prompt/systemprompt.test.js.map +0 -1
- package/dist/prompt/token-estimator.d.ts.map +0 -1
- package/dist/src/ai-service/ai-studio.d.ts +0 -6
- package/dist/src/ai-service/ai-studio.js +0 -190
- package/dist/src/ai-service/ai-studio.js.map +0 -1
- package/dist/src/ai-service/anthropic.d.ts +0 -6
- package/dist/src/ai-service/anthropic.js +0 -150
- package/dist/src/ai-service/anthropic.js.map +0 -1
- package/dist/src/ai-service/chat-gpt.d.ts +0 -5
- package/dist/src/ai-service/chat-gpt.js +0 -146
- package/dist/src/ai-service/chat-gpt.js.map +0 -1
- package/dist/src/ai-service/common.js +0 -38
- package/dist/src/ai-service/common.js.map +0 -1
- package/dist/src/ai-service/common.test.d.ts +0 -1
- package/dist/src/ai-service/common.test.js +0 -86
- package/dist/src/ai-service/common.test.js.map +0 -1
- package/dist/src/ai-service/dall-e.d.ts +0 -14
- package/dist/src/ai-service/dall-e.js +0 -50
- package/dist/src/ai-service/dall-e.js.map +0 -1
- package/dist/src/ai-service/unescape-function-call.d.ts +0 -7
- package/dist/src/ai-service/unescape-function-call.js +0 -59
- package/dist/src/ai-service/unescape-function-call.js.map +0 -1
- package/dist/src/ai-service/unescape-function-call.test.d.ts +0 -1
- package/dist/src/ai-service/unescape-function-call.test.js +0 -18
- package/dist/src/ai-service/unescape-function-call.test.js.map +0 -1
- package/dist/src/ai-service/vertex-ai-claude.d.ts +0 -5
- package/dist/src/ai-service/vertex-ai-claude.js +0 -104
- package/dist/src/ai-service/vertex-ai-claude.js.map +0 -1
- package/dist/src/ai-service/vertex-ai-imagen.d.ts +0 -14
- package/dist/src/ai-service/vertex-ai-imagen.js +0 -77
- package/dist/src/ai-service/vertex-ai-imagen.js.map +0 -1
- package/dist/src/ai-service/vertex-ai.d.ts +0 -6
- package/dist/src/ai-service/vertex-ai.js +0 -202
- package/dist/src/ai-service/vertex-ai.js.map +0 -1
- package/dist/src/cli/cli-options.d.ts +0 -10
- package/dist/src/cli/cli-options.js +0 -132
- package/dist/src/cli/cli-options.js.map +0 -1
- package/dist/src/cli/cli-options.test.d.ts +0 -1
- package/dist/src/cli/cli-options.test.js +0 -34
- package/dist/src/cli/cli-options.test.js.map +0 -1
- package/dist/src/cli/cli-params.d.ts +0 -32
- package/dist/src/cli/cli-params.js +0 -106
- package/dist/src/cli/cli-params.js.map +0 -1
- package/dist/src/cli/cli-params.test.d.ts +0 -1
- package/dist/src/cli/cli-params.test.js +0 -38
- package/dist/src/cli/cli-params.test.js.map +0 -1
- package/dist/src/cli/service-autodetect.d.ts +0 -2
- package/dist/src/cli/service-autodetect.js +0 -17
- package/dist/src/cli/service-autodetect.js.map +0 -1
- package/dist/src/cli/service-autodetect.test.d.ts +0 -1
- package/dist/src/cli/service-autodetect.test.js +0 -38
- package/dist/src/cli/service-autodetect.test.js.map +0 -1
- package/dist/src/cli/validate-cli-params.d.ts +0 -18
- package/dist/src/cli/validate-cli-params.js +0 -145
- package/dist/src/cli/validate-cli-params.js.map +0 -1
- package/dist/src/cli/validate-cli-params.test.d.ts +0 -1
- package/dist/src/cli/validate-cli-params.test.js +0 -106
- package/dist/src/cli/validate-cli-params.test.js.map +0 -1
- package/dist/src/files/cache-file.d.ts +0 -3
- package/dist/src/files/cache-file.js +0 -36
- package/dist/src/files/cache-file.js.map +0 -1
- package/dist/src/files/file-utils.d.ts +0 -2
- package/dist/src/files/file-utils.js +0 -7
- package/dist/src/files/file-utils.js.map +0 -1
- package/dist/src/files/file-utils.test.d.ts +0 -1
- package/dist/src/files/file-utils.test.js +0 -18
- package/dist/src/files/file-utils.test.js.map +0 -1
- package/dist/src/files/find-files.d.ts +0 -9
- package/dist/src/files/find-files.js +0 -81
- package/dist/src/files/find-files.js.map +0 -1
- package/dist/src/files/path-utils.d.ts +0 -1
- package/dist/src/files/path-utils.js +0 -12
- package/dist/src/files/path-utils.js.map +0 -1
- package/dist/src/files/read-files.d.ts +0 -21
- package/dist/src/files/read-files.js +0 -68
- package/dist/src/files/read-files.js.map +0 -1
- package/dist/src/files/read-files.test.d.ts +0 -1
- package/dist/src/files/read-files.test.js +0 -89
- package/dist/src/files/read-files.test.js.map +0 -1
- package/dist/src/files/temp-buffer.d.ts +0 -2
- package/dist/src/files/temp-buffer.js +0 -12
- package/dist/src/files/temp-buffer.js.map +0 -1
- package/dist/src/files/update-files.d.ts +0 -6
- package/dist/src/files/update-files.js +0 -19
- package/dist/src/files/update-files.js.map +0 -1
- package/dist/src/images/ensure-alpha.d.ts +0 -1
- package/dist/src/images/ensure-alpha.js +0 -5
- package/dist/src/images/ensure-alpha.js.map +0 -1
- package/dist/src/images/imgly-remove-background.d.ts +0 -2
- package/dist/src/images/imgly-remove-background.js +0 -21
- package/dist/src/images/imgly-remove-background.js.map +0 -1
- package/dist/src/images/resize-image.d.ts +0 -19
- package/dist/src/images/resize-image.js +0 -22
- package/dist/src/images/resize-image.js.map +0 -1
- package/dist/src/images/split-image.d.ts +0 -18
- package/dist/src/images/split-image.js +0 -25
- package/dist/src/images/split-image.js.map +0 -1
- package/dist/src/index.d.ts +0 -3
- package/dist/src/index.js +0 -3
- package/dist/src/index.js.map +0 -1
- package/dist/src/main/codegen-types.d.ts +0 -58
- package/dist/src/main/codegen-types.js +0 -2
- package/dist/src/main/codegen-types.js.map +0 -1
- package/dist/src/main/codegen-utils.d.ts +0 -3
- package/dist/src/main/codegen-utils.js +0 -18
- package/dist/src/main/codegen-utils.js.map +0 -1
- package/dist/src/main/codegen.d.ts +0 -4
- package/dist/src/main/codegen.js +0 -201
- package/dist/src/main/codegen.js.map +0 -1
- package/dist/src/main/codegen.test.d.ts +0 -3
- package/dist/src/main/codegen.test.js +0 -288
- package/dist/src/main/codegen.test.js.map +0 -1
- package/dist/src/main/common/content-bus-types.d.ts +0 -21
- package/dist/src/main/common/content-bus-types.js +0 -11
- package/dist/src/main/common/content-bus-types.js.map +0 -1
- package/dist/src/main/common/content-bus.d.ts +0 -10
- package/dist/src/main/common/content-bus.js +0 -39
- package/dist/src/main/common/content-bus.js.map +0 -1
- package/dist/src/main/common/cost-collector.d.ts +0 -11
- package/dist/src/main/common/cost-collector.js +0 -90
- package/dist/src/main/common/cost-collector.js.map +0 -1
- package/dist/src/main/common/user-actions.d.ts +0 -19
- package/dist/src/main/common/user-actions.js +0 -30
- package/dist/src/main/common/user-actions.js.map +0 -1
- package/dist/src/main/config-lib.d.ts +0 -36
- package/dist/src/main/config-lib.js +0 -51
- package/dist/src/main/config-lib.js.map +0 -1
- package/dist/src/main/config-lib.test.d.ts +0 -1
- package/dist/src/main/config-lib.test.js +0 -64
- package/dist/src/main/config-lib.test.js.map +0 -1
- package/dist/src/main/config.d.ts +0 -7
- package/dist/src/main/config.js +0 -51
- package/dist/src/main/config.js.map +0 -1
- package/dist/src/main/interactive/codegen-interactive.d.ts +0 -2
- package/dist/src/main/interactive/codegen-interactive.js +0 -61
- package/dist/src/main/interactive/codegen-interactive.js.map +0 -1
- package/dist/src/main/interactive/codegen-interactive.test.d.ts +0 -5
- package/dist/src/main/interactive/codegen-interactive.test.js +0 -79
- package/dist/src/main/interactive/codegen-interactive.test.js.map +0 -1
- package/dist/src/main/interactive/codegen-worker.d.ts +0 -3
- package/dist/src/main/interactive/codegen-worker.js +0 -54
- package/dist/src/main/interactive/codegen-worker.js.map +0 -1
- package/dist/src/main/interactive/common.d.ts +0 -5
- package/dist/src/main/interactive/common.js +0 -51
- package/dist/src/main/interactive/common.js.map +0 -1
- package/dist/src/main/interactive/configure.d.ts +0 -2
- package/dist/src/main/interactive/configure.js +0 -99
- package/dist/src/main/interactive/configure.js.map +0 -1
- package/dist/src/main/interactive/error-handling.d.ts +0 -1
- package/dist/src/main/interactive/error-handling.js +0 -43
- package/dist/src/main/interactive/error-handling.js.map +0 -1
- package/dist/src/main/interactive/help.d.ts +0 -1
- package/dist/src/main/interactive/help.js +0 -22
- package/dist/src/main/interactive/help.js.map +0 -1
- package/dist/src/main/interactive/process-comments.d.ts +0 -2
- package/dist/src/main/interactive/process-comments.js +0 -39
- package/dist/src/main/interactive/process-comments.js.map +0 -1
- package/dist/src/main/interactive/select-ai-service.d.ts +0 -2
- package/dist/src/main/interactive/select-ai-service.js +0 -27
- package/dist/src/main/interactive/select-ai-service.js.map +0 -1
- package/dist/src/main/interactive/task-file.d.ts +0 -2
- package/dist/src/main/interactive/task-file.js +0 -35
- package/dist/src/main/interactive/task-file.js.map +0 -1
- package/dist/src/main/interactive/text-prompt.d.ts +0 -2
- package/dist/src/main/interactive/text-prompt.js +0 -18
- package/dist/src/main/interactive/text-prompt.js.map +0 -1
- package/dist/src/main/interactive/user-action-handlers.d.ts +0 -1
- package/dist/src/main/interactive/user-action-handlers.js +0 -13
- package/dist/src/main/interactive/user-action-handlers.js.map +0 -1
- package/dist/src/main/interactive/user-interrupt.d.ts +0 -1
- package/dist/src/main/interactive/user-interrupt.js +0 -36
- package/dist/src/main/interactive/user-interrupt.js.map +0 -1
- package/dist/src/main/plugin-loader.d.ts +0 -6
- package/dist/src/main/plugin-loader.js +0 -40
- package/dist/src/main/plugin-loader.js.map +0 -1
- package/dist/src/main/ui/backend/api-utils.d.ts +0 -2
- package/dist/src/main/ui/backend/api-utils.js +0 -18
- package/dist/src/main/ui/backend/api-utils.js.map +0 -1
- package/dist/src/main/ui/backend/api.d.ts +0 -2
- package/dist/src/main/ui/backend/api.js +0 -210
- package/dist/src/main/ui/backend/api.js.map +0 -1
- package/dist/src/main/ui/backend/server.d.ts +0 -7
- package/dist/src/main/ui/backend/server.js +0 -83
- package/dist/src/main/ui/backend/server.js.map +0 -1
- package/dist/src/main/ui/backend/service.d.ts +0 -44
- package/dist/src/main/ui/backend/service.js +0 -171
- package/dist/src/main/ui/backend/service.js.map +0 -1
- package/dist/src/main/ui/codegen-ui.d.ts +0 -2
- package/dist/src/main/ui/codegen-ui.js +0 -13
- package/dist/src/main/ui/codegen-ui.js.map +0 -1
- package/dist/src/main/ui/common/api-types.d.ts +0 -20
- package/dist/src/main/ui/common/api-types.js +0 -2
- package/dist/src/main/ui/common/api-types.js.map +0 -1
- package/dist/src/main/ui/user-action-handlers.d.ts +0 -2
- package/dist/src/main/ui/user-action-handlers.js +0 -14
- package/dist/src/main/ui/user-action-handlers.js.map +0 -1
- package/dist/src/operations/create-directory/create-directory-def.d.ts +0 -9
- package/dist/src/operations/create-directory/create-directory-def.js +0 -22
- package/dist/src/operations/create-directory/create-directory-def.js.map +0 -1
- package/dist/src/operations/create-directory/create-directory-executor.d.ts +0 -6
- package/dist/src/operations/create-directory/create-directory-executor.js +0 -22
- package/dist/src/operations/create-directory/create-directory-executor.js.map +0 -1
- package/dist/src/operations/create-file/create-file-def.d.ts +0 -10
- package/dist/src/operations/create-file/create-file-def.js +0 -26
- package/dist/src/operations/create-file/create-file-def.js.map +0 -1
- package/dist/src/operations/create-file/create-file-executor.d.ts +0 -6
- package/dist/src/operations/create-file/create-file-executor.js +0 -27
- package/dist/src/operations/create-file/create-file-executor.js.map +0 -1
- package/dist/src/operations/delete-file/delete-file-def.d.ts +0 -9
- package/dist/src/operations/delete-file/delete-file-def.js +0 -22
- package/dist/src/operations/delete-file/delete-file-def.js.map +0 -1
- package/dist/src/operations/delete-file/delete-file-executor.d.ts +0 -6
- package/dist/src/operations/delete-file/delete-file-executor.js +0 -23
- package/dist/src/operations/delete-file/delete-file-executor.js.map +0 -1
- package/dist/src/operations/download-file/download-file-def.d.ts +0 -10
- package/dist/src/operations/download-file/download-file-def.js +0 -26
- package/dist/src/operations/download-file/download-file-def.js.map +0 -1
- package/dist/src/operations/download-file/download-file-executor.d.ts +0 -6
- package/dist/src/operations/download-file/download-file-executor.js +0 -44
- package/dist/src/operations/download-file/download-file-executor.js.map +0 -1
- package/dist/src/operations/imgly-remove-background/imgly-remove-background-def.d.ts +0 -10
- package/dist/src/operations/imgly-remove-background/imgly-remove-background-def.js +0 -26
- package/dist/src/operations/imgly-remove-background/imgly-remove-background-def.js.map +0 -1
- package/dist/src/operations/imgly-remove-background/imgly-remove-background-executor.d.ts +0 -6
- package/dist/src/operations/imgly-remove-background/imgly-remove-background-executor.js +0 -40
- package/dist/src/operations/imgly-remove-background/imgly-remove-background-executor.js.map +0 -1
- package/dist/src/operations/move-file/move-file-def.d.ts +0 -10
- package/dist/src/operations/move-file/move-file-def.js +0 -26
- package/dist/src/operations/move-file/move-file-def.js.map +0 -1
- package/dist/src/operations/move-file/move-file-executor.d.ts +0 -6
- package/dist/src/operations/move-file/move-file-executor.js +0 -29
- package/dist/src/operations/move-file/move-file-executor.js.map +0 -1
- package/dist/src/operations/operations-index.d.ts +0 -3
- package/dist/src/operations/operations-index.js +0 -33
- package/dist/src/operations/operations-index.js.map +0 -1
- package/dist/src/operations/patch-file/patch-file-def.d.ts +0 -10
- package/dist/src/operations/patch-file/patch-file-def.js +0 -39
- package/dist/src/operations/patch-file/patch-file-def.js.map +0 -1
- package/dist/src/operations/patch-file/patch-file-executor.d.ts +0 -5
- package/dist/src/operations/patch-file/patch-file-executor.js +0 -26
- package/dist/src/operations/patch-file/patch-file-executor.js.map +0 -1
- package/dist/src/operations/resize-image/resize-image-def.d.ts +0 -13
- package/dist/src/operations/resize-image/resize-image-def.js +0 -37
- package/dist/src/operations/resize-image/resize-image-def.js.map +0 -1
- package/dist/src/operations/resize-image/resize-image-executor.d.ts +0 -5
- package/dist/src/operations/resize-image/resize-image-executor.js +0 -30
- package/dist/src/operations/resize-image/resize-image-executor.js.map +0 -1
- package/dist/src/operations/split-image/split-image-def.d.ts +0 -18
- package/dist/src/operations/split-image/split-image-def.js +0 -46
- package/dist/src/operations/split-image/split-image-def.js.map +0 -1
- package/dist/src/operations/split-image/split-image-executor.d.ts +0 -6
- package/dist/src/operations/split-image/split-image-executor.js +0 -51
- package/dist/src/operations/split-image/split-image-executor.js.map +0 -1
- package/dist/src/operations/update-file/update-file-def.d.ts +0 -10
- package/dist/src/operations/update-file/update-file-def.js +0 -26
- package/dist/src/operations/update-file/update-file-def.js.map +0 -1
- package/dist/src/operations/update-file/update-file-executor.d.ts +0 -5
- package/dist/src/operations/update-file/update-file-executor.js +0 -22
- package/dist/src/operations/update-file/update-file-executor.js.map +0 -1
- package/dist/src/prompt/ai-service-fallback.d.ts +0 -3
- package/dist/src/prompt/ai-service-fallback.js +0 -84
- package/dist/src/prompt/ai-service-fallback.js.map +0 -1
- package/dist/src/prompt/function-calling-validate.d.ts +0 -3
- package/dist/src/prompt/function-calling-validate.js +0 -99
- package/dist/src/prompt/function-calling-validate.js.map +0 -1
- package/dist/src/prompt/function-calling.d.ts +0 -5
- package/dist/src/prompt/function-calling.js +0 -43
- package/dist/src/prompt/function-calling.js.map +0 -1
- package/dist/src/prompt/function-defs/ask-question-reflect.d.ts +0 -2
- package/dist/src/prompt/function-defs/ask-question-reflect.js +0 -21
- package/dist/src/prompt/function-defs/ask-question-reflect.js.map +0 -1
- package/dist/src/prompt/function-defs/ask-question.d.ts +0 -8
- package/dist/src/prompt/function-defs/ask-question.js +0 -100
- package/dist/src/prompt/function-defs/ask-question.js.map +0 -1
- package/dist/src/prompt/function-defs/codegen-summary.d.ts +0 -5
- package/dist/src/prompt/function-defs/codegen-summary.js +0 -82
- package/dist/src/prompt/function-defs/codegen-summary.js.map +0 -1
- package/dist/src/prompt/function-defs/explanation.d.ts +0 -5
- package/dist/src/prompt/function-defs/explanation.js +0 -18
- package/dist/src/prompt/function-defs/explanation.js.map +0 -1
- package/dist/src/prompt/function-defs/generate-image.d.ts +0 -5
- package/dist/src/prompt/function-defs/generate-image.js +0 -42
- package/dist/src/prompt/function-defs/generate-image.js.map +0 -1
- package/dist/src/prompt/function-defs/get-image-assets.d.ts +0 -5
- package/dist/src/prompt/function-defs/get-image-assets.js +0 -21
- package/dist/src/prompt/function-defs/get-image-assets.js.map +0 -1
- package/dist/src/prompt/function-defs/get-source-code.d.ts +0 -5
- package/dist/src/prompt/function-defs/get-source-code.js +0 -22
- package/dist/src/prompt/function-defs/get-source-code.js.map +0 -1
- package/dist/src/prompt/function-defs/optimize-context.d.ts +0 -5
- package/dist/src/prompt/function-defs/optimize-context.js +0 -47
- package/dist/src/prompt/function-defs/optimize-context.js.map +0 -1
- package/dist/src/prompt/function-defs/read-history.d.ts +0 -2
- package/dist/src/prompt/function-defs/read-history.js +0 -14
- package/dist/src/prompt/function-defs/read-history.js.map +0 -1
- package/dist/src/prompt/function-defs/set-summaries.d.ts +0 -5
- package/dist/src/prompt/function-defs/set-summaries.js +0 -32
- package/dist/src/prompt/function-defs/set-summaries.js.map +0 -1
- package/dist/src/prompt/function-defs/update-history.d.ts +0 -5
- package/dist/src/prompt/function-defs/update-history.js +0 -22
- package/dist/src/prompt/function-defs/update-history.js.map +0 -1
- package/dist/src/prompt/limits.d.ts +0 -3
- package/dist/src/prompt/limits.js +0 -21
- package/dist/src/prompt/limits.js.map +0 -1
- package/dist/src/prompt/limits.test.d.ts +0 -1
- package/dist/src/prompt/limits.test.js +0 -35
- package/dist/src/prompt/limits.test.js.map +0 -1
- package/dist/src/prompt/prompt-codegen.d.ts +0 -9
- package/dist/src/prompt/prompt-codegen.js +0 -117
- package/dist/src/prompt/prompt-codegen.js.map +0 -1
- package/dist/src/prompt/prompt-codegen.test.d.ts +0 -1
- package/dist/src/prompt/prompt-codegen.test.js +0 -98
- package/dist/src/prompt/prompt-codegen.test.js.map +0 -1
- package/dist/src/prompt/prompt-consts.d.ts +0 -1
- package/dist/src/prompt/prompt-consts.js +0 -2
- package/dist/src/prompt/prompt-consts.js.map +0 -1
- package/dist/src/prompt/prompt-service-ask-question.test.d.ts +0 -4
- package/dist/src/prompt/prompt-service-ask-question.test.js +0 -215
- package/dist/src/prompt/prompt-service-ask-question.test.js.map +0 -1
- package/dist/src/prompt/prompt-service.d.ts +0 -5
- package/dist/src/prompt/prompt-service.js +0 -214
- package/dist/src/prompt/prompt-service.js.map +0 -1
- package/dist/src/prompt/prompt-service.test.d.ts +0 -2
- package/dist/src/prompt/prompt-service.test.js +0 -553
- package/dist/src/prompt/prompt-service.test.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/handlers/cancel-code-generation.d.ts +0 -2
- package/dist/src/prompt/steps/step-ask-question/handlers/cancel-code-generation.js +0 -16
- package/dist/src/prompt/steps/step-ask-question/handlers/cancel-code-generation.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/handlers/confirm-code-generation.d.ts +0 -2
- package/dist/src/prompt/steps/step-ask-question/handlers/confirm-code-generation.js +0 -37
- package/dist/src/prompt/steps/step-ask-question/handlers/confirm-code-generation.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/handlers/context-optimization.d.ts +0 -2
- package/dist/src/prompt/steps/step-ask-question/handlers/context-optimization.js +0 -36
- package/dist/src/prompt/steps/step-ask-question/handlers/context-optimization.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/handlers/default-action.d.ts +0 -2
- package/dist/src/prompt/steps/step-ask-question/handlers/default-action.js +0 -18
- package/dist/src/prompt/steps/step-ask-question/handlers/default-action.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/handlers/handle-request-answer.d.ts +0 -2
- package/dist/src/prompt/steps/step-ask-question/handlers/handle-request-answer.js +0 -20
- package/dist/src/prompt/steps/step-ask-question/handlers/handle-request-answer.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/handlers/remove-files-from-context.d.ts +0 -2
- package/dist/src/prompt/steps/step-ask-question/handlers/remove-files-from-context.js +0 -43
- package/dist/src/prompt/steps/step-ask-question/handlers/remove-files-from-context.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/handlers/request-files-content.d.ts +0 -2
- package/dist/src/prompt/steps/step-ask-question/handlers/request-files-content.js +0 -49
- package/dist/src/prompt/steps/step-ask-question/handlers/request-files-content.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/handlers/request-permissions.d.ts +0 -2
- package/dist/src/prompt/steps/step-ask-question/handlers/request-permissions.js +0 -46
- package/dist/src/prompt/steps/step-ask-question/handlers/request-permissions.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/handlers/start-code-generation.d.ts +0 -2
- package/dist/src/prompt/steps/step-ask-question/handlers/start-code-generation.js +0 -16
- package/dist/src/prompt/steps/step-ask-question/handlers/start-code-generation.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/step-ask-question-handlers.d.ts +0 -0
- package/dist/src/prompt/steps/step-ask-question/step-ask-question-handlers.js +0 -2
- package/dist/src/prompt/steps/step-ask-question/step-ask-question-handlers.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/step-ask-question-reflect.d.ts +0 -4
- package/dist/src/prompt/steps/step-ask-question/step-ask-question-reflect.js +0 -91
- package/dist/src/prompt/steps/step-ask-question/step-ask-question-reflect.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/step-ask-question-types.d.ts +0 -55
- package/dist/src/prompt/steps/step-ask-question/step-ask-question-types.js +0 -2
- package/dist/src/prompt/steps/step-ask-question/step-ask-question-types.js.map +0 -1
- package/dist/src/prompt/steps/step-ask-question/step-ask-question.d.ts +0 -6
- package/dist/src/prompt/steps/step-ask-question/step-ask-question.js +0 -88
- package/dist/src/prompt/steps/step-ask-question/step-ask-question.js.map +0 -1
- package/dist/src/prompt/steps/step-context-optimization.d.ts +0 -4
- package/dist/src/prompt/steps/step-context-optimization.js +0 -200
- package/dist/src/prompt/steps/step-context-optimization.js.map +0 -1
- package/dist/src/prompt/steps/step-generate-image.d.ts +0 -2
- package/dist/src/prompt/steps/step-generate-image.js +0 -29
- package/dist/src/prompt/steps/step-generate-image.js.map +0 -1
- package/dist/src/prompt/steps/step-generate-summary.d.ts +0 -3
- package/dist/src/prompt/steps/step-generate-summary.js +0 -41
- package/dist/src/prompt/steps/step-generate-summary.js.map +0 -1
- package/dist/src/prompt/steps/step-history-update.d.ts +0 -5
- package/dist/src/prompt/steps/step-history-update.js +0 -54
- package/dist/src/prompt/steps/step-history-update.js.map +0 -1
- package/dist/src/prompt/steps/step-summarization.d.ts +0 -8
- package/dist/src/prompt/steps/step-summarization.js +0 -75
- package/dist/src/prompt/steps/step-summarization.js.map +0 -1
- package/dist/src/prompt/steps/step-validate-recover.d.ts +0 -2
- package/dist/src/prompt/steps/step-validate-recover.js +0 -51
- package/dist/src/prompt/steps/step-validate-recover.js.map +0 -1
- package/dist/src/prompt/steps/step-verify-patch.d.ts +0 -6
- package/dist/src/prompt/steps/step-verify-patch.js +0 -34
- package/dist/src/prompt/steps/step-verify-patch.js.map +0 -1
- package/dist/src/prompt/steps/steps-types.d.ts +0 -16
- package/dist/src/prompt/steps/steps-types.js +0 -6
- package/dist/src/prompt/steps/steps-types.js.map +0 -1
- package/dist/src/prompt/steps/steps-utils.d.ts +0 -7
- package/dist/src/prompt/steps/steps-utils.js +0 -11
- package/dist/src/prompt/steps/steps-utils.js.map +0 -1
- package/dist/src/prompt/systemprompt.d.ts +0 -3
- package/dist/src/prompt/systemprompt.js +0 -209
- package/dist/src/prompt/systemprompt.js.map +0 -1
- package/dist/src/prompt/systemprompt.test.d.ts +0 -3
- package/dist/src/prompt/systemprompt.test.js +0 -43
- package/dist/src/prompt/systemprompt.test.js.map +0 -1
- package/dist/src/prompt/token-estimator.d.ts +0 -8
- package/dist/src/prompt/token-estimator.js +0 -31
- package/dist/src/prompt/token-estimator.js.map +0 -1
- package/dist/src/vite-genaicode/vite-genaicode-frontend.d.ts +0 -1
- package/dist/src/vite-genaicode/vite-genaicode-frontend.js +0 -142
- package/dist/src/vite-genaicode/vite-genaicode-frontend.js.map +0 -1
- package/dist/src/vite-genaicode/vite-genaicode-plugin.d.ts +0 -7
- package/dist/src/vite-genaicode/vite-genaicode-plugin.js +0 -40
- package/dist/src/vite-genaicode/vite-genaicode-plugin.js.map +0 -1
- package/dist/vite-genaicode/vite-genaicode-frontend.d.ts.map +0 -1
- package/dist/vite-genaicode/vite-genaicode-plugin.d.ts.map +0 -1
- /package/dist/{ai-service/common.test.d.ts → main/ui/backend/endpoints/context-endpoint.d.ts} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-utils.js","sourceRoot":"","sources":["../../../src/files/file-utils.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,wDAAwD;AACxD,MAAM,UAAU,mBAAmB,CAAC,MAAc,EAAE,GAAW;IAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC5C,OAAO,MAAM,KAAK,GAAG,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACzG,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { vi, describe, beforeEach, it, expect } from 'vitest';
|
|
2
|
-
import { isAncestorDirectory } from './file-utils.js';
|
|
3
|
-
// Test for isAncestorDirectory
|
|
4
|
-
describe('isAncestorDirectory', () => {
|
|
5
|
-
beforeEach(() => {
|
|
6
|
-
vi.resetAllMocks();
|
|
7
|
-
});
|
|
8
|
-
it('should return true if directories are the same', () => {
|
|
9
|
-
expect(isAncestorDirectory('/project', '/project')).toBe(true);
|
|
10
|
-
});
|
|
11
|
-
it('should return true if parent is ancestor of dir', () => {
|
|
12
|
-
expect(isAncestorDirectory('/project', '/project/src')).toBe(true);
|
|
13
|
-
});
|
|
14
|
-
it('should return false if parent is not ancestor of dir', () => {
|
|
15
|
-
expect(isAncestorDirectory('/project', '/other')).toBe(false);
|
|
16
|
-
});
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=file-utils.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-utils.test.js","sourceRoot":"","sources":["../../../src/files/file-utils.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,EAAE,QAAQ,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,+BAA+B;AAC/B,QAAQ,CAAC,qBAAqB,EAAE,GAAG,EAAE;IACnC,UAAU,CAAC,GAAG,EAAE;QACd,EAAE,CAAC,aAAa,EAAE,CAAC;IACrB,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;QACxD,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACjE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,iDAAiD,EAAE,GAAG,EAAE;QACzD,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACrE,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,sDAAsD,EAAE,GAAG,EAAE;QAC9D,MAAM,CAAC,mBAAmB,CAAC,UAAU,EAAE,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;IAChE,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
type DependencyList = string[];
|
|
2
|
-
/** Generates a dependency list for given file */
|
|
3
|
-
export declare function getDependencyList(entryFile: string): DependencyList;
|
|
4
|
-
/** Get source files of the application */
|
|
5
|
-
export declare function getSourceFiles(): string[];
|
|
6
|
-
/** Get source files of the application */
|
|
7
|
-
export declare function getImageAssetFiles(): string[];
|
|
8
|
-
export declare function refreshFiles(): void;
|
|
9
|
-
export {};
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import path from 'path';
|
|
3
|
-
import { rcConfig, sourceExtensions, IMAGE_ASSET_EXTENSIONS, ignorePaths } from '../main/config.js';
|
|
4
|
-
// List of possible extensions for dependency resolution
|
|
5
|
-
const POSSIBLE_DEPENDENCY_EXTENSIONS = ['.ts', '.js', '.tsx', '.jsx'];
|
|
6
|
-
function findFiles(dir, recursive, extensions) {
|
|
7
|
-
const files = [];
|
|
8
|
-
const items = fs.readdirSync(dir);
|
|
9
|
-
for (const item of items) {
|
|
10
|
-
const fullPath = path.join(dir, item);
|
|
11
|
-
if (ignorePaths.some((ignorePath) => fullPath.endsWith(ignorePath))) {
|
|
12
|
-
continue;
|
|
13
|
-
}
|
|
14
|
-
if (fs.statSync(fullPath).isDirectory()) {
|
|
15
|
-
if (recursive) {
|
|
16
|
-
files.push(...findFiles(fullPath, true, extensions));
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
else if (extensions.includes(path.extname(fullPath))) {
|
|
20
|
-
files.push(fullPath);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
return files;
|
|
24
|
-
}
|
|
25
|
-
function getDependencies(filePath) {
|
|
26
|
-
const content = fs.readFileSync(filePath, 'utf-8');
|
|
27
|
-
const dependencyRegex = /import\s+.+?\s+from\s+['"](.+?\/?[^'"]+)['"]/g;
|
|
28
|
-
const dependencies = [];
|
|
29
|
-
let match;
|
|
30
|
-
while ((match = dependencyRegex.exec(content)) !== null) {
|
|
31
|
-
const dependencyPath = match[1];
|
|
32
|
-
// Resolve relative paths from the file's directory
|
|
33
|
-
const resolvedPath = path.resolve(path.dirname(filePath), dependencyPath);
|
|
34
|
-
// Only add the dependency if it's a local file and not a module
|
|
35
|
-
if (fs.existsSync(resolvedPath)) {
|
|
36
|
-
dependencies.push(resolvedPath);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
const possibleExtensions = POSSIBLE_DEPENDENCY_EXTENSIONS;
|
|
40
|
-
for (const ext of possibleExtensions) {
|
|
41
|
-
const extendedPath = resolvedPath + ext;
|
|
42
|
-
if (fs.existsSync(extendedPath)) {
|
|
43
|
-
dependencies.push(extendedPath);
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
return dependencies;
|
|
49
|
-
}
|
|
50
|
-
/** Generates a dependency list for given file */
|
|
51
|
-
export function getDependencyList(entryFile) {
|
|
52
|
-
const visitedFiles = new Set();
|
|
53
|
-
const result = new Set();
|
|
54
|
-
function traverse(file) {
|
|
55
|
-
if (visitedFiles.has(file))
|
|
56
|
-
return;
|
|
57
|
-
visitedFiles.add(file);
|
|
58
|
-
const dependencies = getDependencies(file);
|
|
59
|
-
dependencies.forEach((dependency) => result.add(dependency));
|
|
60
|
-
dependencies.forEach(traverse);
|
|
61
|
-
}
|
|
62
|
-
result.add(path.resolve(entryFile));
|
|
63
|
-
traverse(entryFile);
|
|
64
|
-
return Array.from(result);
|
|
65
|
-
}
|
|
66
|
-
let sourceFiles = [];
|
|
67
|
-
let imageAssetFiles = [];
|
|
68
|
-
refreshFiles();
|
|
69
|
-
/** Get source files of the application */
|
|
70
|
-
export function getSourceFiles() {
|
|
71
|
-
return [...sourceFiles];
|
|
72
|
-
}
|
|
73
|
-
/** Get source files of the application */
|
|
74
|
-
export function getImageAssetFiles() {
|
|
75
|
-
return [...imageAssetFiles];
|
|
76
|
-
}
|
|
77
|
-
export function refreshFiles() {
|
|
78
|
-
sourceFiles = findFiles(rcConfig.rootDir, true, sourceExtensions);
|
|
79
|
-
imageAssetFiles = findFiles(rcConfig.rootDir, true, IMAGE_ASSET_EXTENSIONS);
|
|
80
|
-
}
|
|
81
|
-
//# sourceMappingURL=find-files.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,GAAG,CAAC,IAAI,CAAC,CAAC;QACvB,MAAM,YAAY,GAAG,eAAe,CAAC,IAAI,CAAC,CAAC;QAC3C,YAAY,CAAC,OAAO,CAAC,CAAC,UAAU,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC;QAC7D,YAAY,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC;IACjC,CAAC;IAED,MAAM,CAAC,GAAG,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CAAC;IACpC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAEpB,OAAO,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;AAC5B,CAAC;AAED,IAAI,WAAW,GAAa,EAAE,CAAC;AAC/B,IAAI,eAAe,GAAa,EAAE,CAAC;AAEnC,YAAY,EAAE,CAAC;AAEf,0CAA0C;AAC1C,MAAM,UAAU,cAAc;IAC5B,OAAO,CAAC,GAAG,WAAW,CAAC,CAAC;AAC1B,CAAC;AAED,0CAA0C;AAC1C,MAAM,UAAU,kBAAkB;IAChC,OAAO,CAAC,GAAG,eAAe,CAAC,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,YAAY;IAC1B,WAAW,GAAG,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,gBAAgB,CAAC,CAAC;IAClE,eAAe,GAAG,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,EAAE,sBAAsB,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function isProjectPath(filePath: string): boolean;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import path from 'path';
|
|
2
|
-
import { getSourceFiles } from './find-files.js';
|
|
3
|
-
import { rcConfig } from '../main/config.js';
|
|
4
|
-
import { isAncestorDirectory } from './file-utils.js';
|
|
5
|
-
export function isProjectPath(filePath) {
|
|
6
|
-
const sourceFiles = getSourceFiles();
|
|
7
|
-
return (isAncestorDirectory(rcConfig.rootDir, filePath) ||
|
|
8
|
-
sourceFiles.includes(filePath) ||
|
|
9
|
-
!sourceFiles.some((sourceFile) => path.dirname(filePath) === path.dirname(sourceFile) ||
|
|
10
|
-
isAncestorDirectory(path.dirname(sourceFile), path.dirname(filePath))));
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=path-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"path-utils.js","sourceRoot":"","sources":["../../../src/files/path-utils.ts"],"names":[],"mappings":"AAAA,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,mBAAmB,EAAE,MAAM,iBAAiB,CAAC;AAEtD,MAAM,UAAU,aAAa,CAAC,QAAgB;IAC5C,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IAErC,OAAO,CACL,mBAAmB,CAAC,QAAQ,CAAC,OAAO,EAAE,QAAQ,CAAC;QAC/C,WAAW,CAAC,QAAQ,CAAC,QAAQ,CAAC;QAC9B,CAAC,WAAW,CAAC,IAAI,CACf,CAAC,UAAU,EAAE,EAAE,CACb,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC;YACnD,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CACxE,CACF,CAAC;AACJ,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { CodegenOptions } from '../main/codegen-types.js';
|
|
2
|
-
export type SourceCodeMap = Record<string, {
|
|
3
|
-
content: string | null;
|
|
4
|
-
} | {
|
|
5
|
-
summary: string;
|
|
6
|
-
tokenCount: number;
|
|
7
|
-
}>;
|
|
8
|
-
type ImageAssetsMap = Record<string, {
|
|
9
|
-
mimeType: string | false;
|
|
10
|
-
width: number;
|
|
11
|
-
height: number;
|
|
12
|
-
}>;
|
|
13
|
-
/** Print source code of all source files */
|
|
14
|
-
export declare function getSourceCode({ filterPaths, taskFile, forceAll, }: {
|
|
15
|
-
filterPaths?: string[];
|
|
16
|
-
taskFile?: string | undefined;
|
|
17
|
-
forceAll?: boolean;
|
|
18
|
-
}, options: CodegenOptions): SourceCodeMap;
|
|
19
|
-
/** Get image asset files summary */
|
|
20
|
-
export declare function getImageAssets(): ImageAssetsMap;
|
|
21
|
-
export {};
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import mime from 'mime-types';
|
|
3
|
-
import sizeOf from 'image-size';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import globRegex from 'glob-regex';
|
|
6
|
-
import { getSourceFiles, getImageAssetFiles } from './find-files.js';
|
|
7
|
-
import { rcConfig, importantContext } from '../main/config.js';
|
|
8
|
-
import { verifySourceCodeLimit } from '../prompt/limits.js';
|
|
9
|
-
import { getSummary } from '../prompt/steps/step-summarization.js';
|
|
10
|
-
/**
|
|
11
|
-
* Read contents of source files and create a map with file path as key and file content as value
|
|
12
|
-
*/
|
|
13
|
-
function readSourceFiles({ contentMask, ignorePatterns }, filterPaths, forceAll = false) {
|
|
14
|
-
const sourceCode = {};
|
|
15
|
-
const importantFiles = new Set(importantContext.files || []);
|
|
16
|
-
for (const file of getSourceFiles()) {
|
|
17
|
-
if (!filterPaths || filterPaths.includes(file) || importantFiles.has(file)) {
|
|
18
|
-
// Always include important files
|
|
19
|
-
if (importantFiles.has(file)) {
|
|
20
|
-
sourceCode[file] = { content: fs.readFileSync(file, 'utf-8') };
|
|
21
|
-
continue;
|
|
22
|
-
}
|
|
23
|
-
const summary = getSummary(file);
|
|
24
|
-
// Apply content mask filter if it's set
|
|
25
|
-
if (!filterPaths && contentMask && !forceAll) {
|
|
26
|
-
const relativePath = path.relative(rcConfig.rootDir, file);
|
|
27
|
-
if (!relativePath.startsWith(contentMask)) {
|
|
28
|
-
sourceCode[file] = summary ? { ...summary } : { content: null };
|
|
29
|
-
continue;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
if (!forceAll && ignorePatterns?.some((pattern) => globRegex(pattern).test(file))) {
|
|
33
|
-
sourceCode[file] = summary ? { ...summary } : { content: null };
|
|
34
|
-
}
|
|
35
|
-
else {
|
|
36
|
-
const content = fs.readFileSync(file, 'utf-8');
|
|
37
|
-
sourceCode[file] = { content, ...summary };
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return sourceCode;
|
|
42
|
-
}
|
|
43
|
-
/** Print source code of all source files */
|
|
44
|
-
export function getSourceCode({ filterPaths, taskFile, forceAll, }, options) {
|
|
45
|
-
const sourceCode = readSourceFiles(options, filterPaths, forceAll);
|
|
46
|
-
if (taskFile && !sourceCode[taskFile]) {
|
|
47
|
-
sourceCode[taskFile] = {
|
|
48
|
-
content: fs.readFileSync(taskFile, 'utf-8'),
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
verifySourceCodeLimit(JSON.stringify(sourceCode));
|
|
52
|
-
return sourceCode;
|
|
53
|
-
}
|
|
54
|
-
/** Get image asset files summary */
|
|
55
|
-
export function getImageAssets() {
|
|
56
|
-
const imageAssets = {};
|
|
57
|
-
for (const file of getImageAssetFiles()) {
|
|
58
|
-
const dimensions = sizeOf(file);
|
|
59
|
-
imageAssets[file] = {
|
|
60
|
-
mimeType: mime.lookup(file),
|
|
61
|
-
width: dimensions.width,
|
|
62
|
-
height: dimensions.height,
|
|
63
|
-
};
|
|
64
|
-
}
|
|
65
|
-
verifySourceCodeLimit(JSON.stringify(imageAssets));
|
|
66
|
-
return imageAssets;
|
|
67
|
-
}
|
|
68
|
-
//# sourceMappingURL=read-files.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"read-files.js","sourceRoot":"","sources":["../../../src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C;IACJ,CAAC;IAED,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC;IAClD,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,oCAAoC;AACpC,MAAM,UAAU,cAAc;IAC5B,MAAM,WAAW,GAAmB,EAAE,CAAC;IACvC,KAAK,MAAM,IAAI,IAAI,kBAAkB,EAAE,EAAE,CAAC;QACxC,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC;QAChC,WAAW,CAAC,IAAI,CAAC,GAAG;YAClB,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC;YAC3B,KAAK,EAAE,UAAU,CAAC,KAAM;YACxB,MAAM,EAAE,UAAU,CAAC,MAAO;SAC3B,CAAC;IACJ,CAAC;IACD,qBAAqB,CAAC,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC,CAAC;IACnD,OAAO,WAAW,CAAC;AACrB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, vi, beforeEach, afterEach } from 'vitest';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import mime from 'mime-types';
|
|
4
|
-
import sizeOf from 'image-size';
|
|
5
|
-
import { getSourceCode, getImageAssets } from './read-files.js';
|
|
6
|
-
import { getSourceFiles, getImageAssetFiles } from './find-files.js';
|
|
7
|
-
import { verifySourceCodeLimit } from '../prompt/limits.js';
|
|
8
|
-
import * as cliParams from '../cli/cli-params.js';
|
|
9
|
-
import { rcConfig } from '../main/config.js';
|
|
10
|
-
vi.mock('fs');
|
|
11
|
-
vi.mock('mime-types');
|
|
12
|
-
vi.mock('image-size');
|
|
13
|
-
vi.mock('./find-files.js', () => ({
|
|
14
|
-
getImageAssetFiles: vi.fn(),
|
|
15
|
-
getSourceFiles: vi.fn(),
|
|
16
|
-
}));
|
|
17
|
-
vi.mock('../prompt/limits.js');
|
|
18
|
-
vi.mock('../cli/cli-params.js', () => ({
|
|
19
|
-
taskFile: null,
|
|
20
|
-
contentMask: null,
|
|
21
|
-
disableExplanations: true,
|
|
22
|
-
ignorePatterns: [],
|
|
23
|
-
}));
|
|
24
|
-
vi.mock('../main/config.js', () => ({
|
|
25
|
-
rcConfig: { rootDir: '/home/project' },
|
|
26
|
-
importantContext: {},
|
|
27
|
-
}));
|
|
28
|
-
describe('read-files', () => {
|
|
29
|
-
beforeEach(() => {
|
|
30
|
-
vi.resetAllMocks();
|
|
31
|
-
vi.mocked(cliParams).contentMask = undefined;
|
|
32
|
-
});
|
|
33
|
-
afterEach(() => {
|
|
34
|
-
vi.clearAllMocks();
|
|
35
|
-
});
|
|
36
|
-
describe('getSourceCode', () => {
|
|
37
|
-
it('should return source code for all files', () => {
|
|
38
|
-
const mockFiles = ['/home/project/file1.js', '/home/project/file2.js'];
|
|
39
|
-
vi.mocked(getSourceFiles).mockReturnValue(mockFiles);
|
|
40
|
-
vi.mocked(fs).readFileSync.mockImplementation((file) => `Content of ${file}`);
|
|
41
|
-
rcConfig.rootDir = '/home/project';
|
|
42
|
-
const result = getSourceCode({ taskFile: undefined }, { aiService: 'vertex-ai' });
|
|
43
|
-
expect(result).toEqual({
|
|
44
|
-
'/home/project/file1.js': { content: 'Content of /home/project/file1.js' },
|
|
45
|
-
'/home/project/file2.js': { content: 'Content of /home/project/file2.js' },
|
|
46
|
-
});
|
|
47
|
-
expect(verifySourceCodeLimit).toHaveBeenCalled();
|
|
48
|
-
});
|
|
49
|
-
it('should apply content mask when specified', () => {
|
|
50
|
-
const mockFiles = ['/home/project/file1.js', '/home/project/subfolder/file2.js'];
|
|
51
|
-
vi.mocked(getSourceFiles).mockReturnValue(mockFiles);
|
|
52
|
-
vi.mocked(fs).readFileSync.mockImplementation((file) => `Content of ${file}`);
|
|
53
|
-
rcConfig.rootDir = '/home/project';
|
|
54
|
-
const result = getSourceCode({ taskFile: undefined }, { aiService: 'vertex-ai', contentMask: 'subfolder' });
|
|
55
|
-
expect(result).toEqual({
|
|
56
|
-
'/home/project/file1.js': { content: null },
|
|
57
|
-
'/home/project/subfolder/file2.js': {
|
|
58
|
-
content: 'Content of /home/project/subfolder/file2.js',
|
|
59
|
-
},
|
|
60
|
-
});
|
|
61
|
-
});
|
|
62
|
-
it('should include task file when specified', () => {
|
|
63
|
-
const mockFiles = ['/home/project/file1.js'];
|
|
64
|
-
vi.mocked(getSourceFiles).mockReturnValue(mockFiles);
|
|
65
|
-
vi.mocked(fs).readFileSync.mockImplementation((file) => `Content of ${file}`);
|
|
66
|
-
rcConfig.rootDir = '/home/project';
|
|
67
|
-
const result = getSourceCode({ taskFile: '/home/project/task.md' }, { aiService: 'vertex-ai' });
|
|
68
|
-
expect(result).toEqual({
|
|
69
|
-
'/home/project/file1.js': { content: 'Content of /home/project/file1.js' },
|
|
70
|
-
'/home/project/task.md': { content: 'Content of /home/project/task.md' },
|
|
71
|
-
});
|
|
72
|
-
});
|
|
73
|
-
});
|
|
74
|
-
describe('getImageAssets', () => {
|
|
75
|
-
it('should return image assets information', () => {
|
|
76
|
-
const mockImageFiles = ['/home/project/image1.png', '/home/project/image2.jpg'];
|
|
77
|
-
vi.mocked(getImageAssetFiles).mockReturnValue(mockImageFiles);
|
|
78
|
-
vi.mocked(mime).lookup.mockImplementation((file) => (file.endsWith('.png') ? 'image/png' : 'image/jpeg'));
|
|
79
|
-
vi.mocked(sizeOf).mockImplementation(() => ({ width: 100, height: 200 }));
|
|
80
|
-
const result = getImageAssets();
|
|
81
|
-
expect(result).toEqual({
|
|
82
|
-
'/home/project/image1.png': { mimeType: 'image/png', width: 100, height: 200 },
|
|
83
|
-
'/home/project/image2.jpg': { mimeType: 'image/jpeg', width: 100, height: 200 },
|
|
84
|
-
});
|
|
85
|
-
expect(verifySourceCodeLimit).toHaveBeenCalled();
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
//# sourceMappingURL=read-files.test.js.map
|
|
@@ -1 +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|
-
let tempId = 1;
|
|
3
|
-
const temp = {};
|
|
4
|
-
export function getTempBuffer(url) {
|
|
5
|
-
return temp[url];
|
|
6
|
-
}
|
|
7
|
-
export function setTempBuffer(buffer) {
|
|
8
|
-
const imageUrl = 'temp://' + tempId++;
|
|
9
|
-
temp[imageUrl] = buffer;
|
|
10
|
-
return imageUrl;
|
|
11
|
-
}
|
|
12
|
-
//# sourceMappingURL=temp-buffer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"temp-buffer.js","sourceRoot":"","sources":["../../../src/files/temp-buffer.ts"],"names":[],"mappings":"AAAA,wBAAwB;AACxB,IAAI,MAAM,GAAG,CAAC,CAAC;AACf,MAAM,IAAI,GAA8B,EAAE,CAAC;AAE3C,MAAM,UAAU,aAAa,CAAC,GAAW;IACvC,OAAO,IAAI,CAAC,GAAG,CAAC,CAAC;AACnB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,MAAc;IAC1C,MAAM,QAAQ,GAAG,SAAS,GAAG,MAAM,EAAE,CAAC;IACtC,IAAI,CAAC,QAAQ,CAAC,GAAG,MAAM,CAAC;IACxB,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { CodegenOptions } from '../main/codegen-types.js';
|
|
2
|
-
import { FunctionCall } from '../ai-service/common.js';
|
|
3
|
-
/**
|
|
4
|
-
* @param functionCalls Result of the code generation, a map of file paths to new content
|
|
5
|
-
*/
|
|
6
|
-
export declare function updateFiles(functionCalls: FunctionCall[], options: CodegenOptions): Promise<void>;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { getOperationExecutor } from '../operations/operations-index.js';
|
|
2
|
-
/**
|
|
3
|
-
* @param functionCalls Result of the code generation, a map of file paths to new content
|
|
4
|
-
*/
|
|
5
|
-
export async function updateFiles(functionCalls, options) {
|
|
6
|
-
for (const { name, args } of functionCalls) {
|
|
7
|
-
const executor = getOperationExecutor(name);
|
|
8
|
-
if (!executor) {
|
|
9
|
-
console.warn(`Unknown operation: ${name}`);
|
|
10
|
-
}
|
|
11
|
-
else if (args === undefined) {
|
|
12
|
-
console.warn(`Operation ${name} has no arguments`);
|
|
13
|
-
}
|
|
14
|
-
else {
|
|
15
|
-
await executor(args, options);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
//# sourceMappingURL=update-files.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"update-files.js","sourceRoot":"","sources":["../../../src/files/update-files.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AAEzE;;GAEG;AACH,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,aAA6B,EAAE,OAAuB;IACtF,KAAK,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,aAAa,EAAE,CAAC;QAC3C,MAAM,QAAQ,GAAG,oBAAoB,CAAC,IAAI,CAAC,CAAC;QAC5C,IAAI,CAAC,QAAQ,EAAE,CAAC;YACd,OAAO,CAAC,IAAI,CAAC,sBAAsB,IAAI,EAAE,CAAC,CAAC;QAC7C,CAAC;aAAM,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;YAC9B,OAAO,CAAC,IAAI,CAAC,aAAa,IAAI,mBAAmB,CAAC,CAAC;QACrD,CAAC;aAAM,CAAC;YACN,MAAM,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function ensureAlpha(image: string | Buffer): Promise<Buffer>;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ensure-alpha.js","sourceRoot":"","sources":["../../../src/images/ensure-alpha.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,KAAK,UAAU,WAAW,CAAC,KAAsB;IACtD,OAAO,KAAK,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC,QAAQ,EAAE,CAAC;AAC/C,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import fs from 'fs';
|
|
2
|
-
import { createRequire } from 'node:module';
|
|
3
|
-
import { removeBackground } from '@imgly/background-removal-node';
|
|
4
|
-
/** Converts white color to transparency on a image and saves to destination path */
|
|
5
|
-
export async function imglyRemoveBackground(inputFilePath, outputFilePath) {
|
|
6
|
-
try {
|
|
7
|
-
console.log(`Removing background for image: ${inputFilePath}`);
|
|
8
|
-
const publicPath = 'file://' + createRequire(import.meta.url).resolve('@imgly/background-removal-node');
|
|
9
|
-
const blob = await removeBackground(inputFilePath, {
|
|
10
|
-
publicPath,
|
|
11
|
-
});
|
|
12
|
-
fs.writeFileSync(outputFilePath, Buffer.from(await blob.arrayBuffer()));
|
|
13
|
-
console.log(`Background removed successfully. Saved to: ${outputFilePath}`);
|
|
14
|
-
return outputFilePath;
|
|
15
|
-
}
|
|
16
|
-
catch (error) {
|
|
17
|
-
console.error('Error removing background:', error);
|
|
18
|
-
throw error;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
//# sourceMappingURL=imgly-remove-background.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"imgly-remove-background.js","sourceRoot":"","sources":["../../../src/images/imgly-remove-background.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAElE,oFAAoF;AACpF,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,aAAqB,EAAE,cAAsB;IACvF,IAAI,CAAC;QACH,OAAO,CAAC,GAAG,CAAC,kCAAkC,aAAa,EAAE,CAAC,CAAC;QAE/D,MAAM,UAAU,GAAG,SAAS,GAAG,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,gCAAgC,CAAC,CAAC;QACxG,MAAM,IAAI,GAAS,MAAM,gBAAgB,CAAC,aAAa,EAAE;YACvD,UAAU;SACX,CAAC,CAAC;QACH,EAAE,CAAC,aAAa,CAAC,cAAc,EAAE,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC;QAExE,OAAO,CAAC,GAAG,CAAC,8CAA8C,cAAc,EAAE,CAAC,CAAC;QAC5E,OAAO,cAAc,CAAC;IACxB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;QACnD,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
interface ImageSize {
|
|
2
|
-
width: number;
|
|
3
|
-
height: number;
|
|
4
|
-
}
|
|
5
|
-
/**
|
|
6
|
-
* Resize an image buffer to the desired size
|
|
7
|
-
* @param {Buffer} input - The input image buffer
|
|
8
|
-
* @param {ImageSize} size - The desired size of the image
|
|
9
|
-
* @returns {Promise<Buffer>} - The resized image buffer
|
|
10
|
-
*/
|
|
11
|
-
export declare function resizeImageBuffer(input: Buffer, size: ImageSize): Promise<Buffer>;
|
|
12
|
-
/**
|
|
13
|
-
* Resize an image file to the desired size and save it back to the same file
|
|
14
|
-
* @param {string} filePath - The path of the image file to resize
|
|
15
|
-
* @param {ImageSize} size - The desired size of the image
|
|
16
|
-
* @returns {Promise<void>}
|
|
17
|
-
*/
|
|
18
|
-
export declare function resizeImageFile(filePath: string, size: ImageSize): Promise<void>;
|
|
19
|
-
export {};
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
/**
|
|
4
|
-
* Resize an image buffer to the desired size
|
|
5
|
-
* @param {Buffer} input - The input image buffer
|
|
6
|
-
* @param {ImageSize} size - The desired size of the image
|
|
7
|
-
* @returns {Promise<Buffer>} - The resized image buffer
|
|
8
|
-
*/
|
|
9
|
-
export async function resizeImageBuffer(input, size) {
|
|
10
|
-
return await sharp(input).resize(size.width, size.height).toBuffer();
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Resize an image file to the desired size and save it back to the same file
|
|
14
|
-
* @param {string} filePath - The path of the image file to resize
|
|
15
|
-
* @param {ImageSize} size - The desired size of the image
|
|
16
|
-
* @returns {Promise<void>}
|
|
17
|
-
*/
|
|
18
|
-
export async function resizeImageFile(filePath, size) {
|
|
19
|
-
const buffer = await resizeImageBuffer(await fs.promises.readFile(filePath), size);
|
|
20
|
-
await fs.promises.writeFile(filePath, buffer);
|
|
21
|
-
}
|
|
22
|
-
//# sourceMappingURL=resize-image.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"resize-image.js","sourceRoot":"","sources":["../../../src/images/resize-image.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,MAAM,IAAI,CAAC;AAOpB;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,iBAAiB,CAAC,KAAa,EAAE,IAAe;IACpE,OAAO,MAAM,KAAK,CAAC,KAAK,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,CAAC;AACvE,CAAC;AAED;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,eAAe,CAAC,QAAgB,EAAE,IAAe;IACrE,MAAM,MAAM,GAAG,MAAM,iBAAiB,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,CAAC;IACnF,MAAM,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;AAChD,CAAC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
interface Rect {
|
|
2
|
-
x: number;
|
|
3
|
-
y: number;
|
|
4
|
-
width: number;
|
|
5
|
-
height: number;
|
|
6
|
-
}
|
|
7
|
-
interface Part {
|
|
8
|
-
rect: Rect;
|
|
9
|
-
outputFilePath: string;
|
|
10
|
-
}
|
|
11
|
-
/**
|
|
12
|
-
* This function opens the input file, and splits its into parts, extracting parts of the input image, and saving to outputFilePaths
|
|
13
|
-
*
|
|
14
|
-
* @param {string} inputFilePath
|
|
15
|
-
* @param {Part[]} parts
|
|
16
|
-
*/
|
|
17
|
-
export declare function splitImage(inputFilePath: string, parts: Part[]): Promise<void>;
|
|
18
|
-
export {};
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import sharp from 'sharp';
|
|
2
|
-
/**
|
|
3
|
-
* This function opens the input file, and splits its into parts, extracting parts of the input image, and saving to outputFilePaths
|
|
4
|
-
*
|
|
5
|
-
* @param {string} inputFilePath
|
|
6
|
-
* @param {Part[]} parts
|
|
7
|
-
*/
|
|
8
|
-
export async function splitImage(inputFilePath, parts) {
|
|
9
|
-
try {
|
|
10
|
-
// Process each part
|
|
11
|
-
for (const part of parts) {
|
|
12
|
-
const { rect, outputFilePath } = part;
|
|
13
|
-
const { x, y, width, height } = rect;
|
|
14
|
-
// Extract the specified rectangle from the input image
|
|
15
|
-
console.log('Extracting', rect, outputFilePath);
|
|
16
|
-
await sharp(inputFilePath).extract({ left: x, top: y, width, height }).toFile(outputFilePath);
|
|
17
|
-
}
|
|
18
|
-
console.log('Image splitting completed successfully.');
|
|
19
|
-
}
|
|
20
|
-
catch (error) {
|
|
21
|
-
console.error('Error splitting image:', error);
|
|
22
|
-
throw error;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=split-image.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"split-image.js","sourceRoot":"","sources":["../../../src/images/split-image.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAc1B;;;;;GAKG;AACH,MAAM,CAAC,KAAK,UAAU,UAAU,CAAC,aAAqB,EAAE,KAAa;IACnE,IAAI,CAAC;QACH,oBAAoB;QACpB,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;YACzB,MAAM,EAAE,IAAI,EAAE,cAAc,EAAE,GAAG,IAAI,CAAC;YACtC,MAAM,EAAE,CAAC,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;YAErC,uDAAuD;YACvD,OAAO,CAAC,GAAG,CAAC,YAAY,EAAE,IAAI,EAAE,cAAc,CAAC,CAAC;YAChD,MAAM,KAAK,CAAC,aAAa,CAAC,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,cAAc,CAAC,CAAC;QAChG,CAAC;QAED,OAAO,CAAC,GAAG,CAAC,yCAAyC,CAAC,CAAC;IACzD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QAC/C,MAAM,KAAK,CAAC;IACd,CAAC;AACH,CAAC"}
|
package/dist/src/index.d.ts
DELETED
package/dist/src/index.js
DELETED
package/dist/src/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAEA,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { FunctionDef, GenerateContentFunction } from '../ai-service/common';
|
|
2
|
-
export type PluginAiServiceType = `plugin:${string}`;
|
|
3
|
-
export type AiServiceType = 'vertex-ai' | 'ai-studio' | 'vertex-ai-claude' | 'chat-gpt' | 'anthropic' | PluginAiServiceType;
|
|
4
|
-
export type ImagenType = 'vertex-ai' | 'dall-e';
|
|
5
|
-
export interface UploadedImage {
|
|
6
|
-
base64url: string;
|
|
7
|
-
mediaType: 'image/jpeg' | 'image/png' | 'image/gif' | 'image/webp';
|
|
8
|
-
originalName: string;
|
|
9
|
-
}
|
|
10
|
-
export interface CodegenOptions {
|
|
11
|
-
explicitPrompt?: string;
|
|
12
|
-
taskFile?: string;
|
|
13
|
-
considerAllFiles?: boolean;
|
|
14
|
-
allowFileCreate?: boolean;
|
|
15
|
-
allowFileDelete?: boolean;
|
|
16
|
-
allowDirectoryCreate?: boolean;
|
|
17
|
-
allowFileMove?: boolean;
|
|
18
|
-
vision?: boolean;
|
|
19
|
-
imagen?: ImagenType;
|
|
20
|
-
aiService: AiServiceType;
|
|
21
|
-
disableContextOptimization?: boolean;
|
|
22
|
-
temperature?: number;
|
|
23
|
-
cheap?: boolean;
|
|
24
|
-
dryRun?: boolean;
|
|
25
|
-
verbose?: boolean;
|
|
26
|
-
requireExplanations?: boolean;
|
|
27
|
-
geminiBlockNone?: boolean;
|
|
28
|
-
disableInitialLint?: boolean;
|
|
29
|
-
contentMask?: string;
|
|
30
|
-
ignorePatterns?: string[];
|
|
31
|
-
askQuestion?: boolean;
|
|
32
|
-
interactive?: boolean;
|
|
33
|
-
ui?: boolean;
|
|
34
|
-
uiPort?: number;
|
|
35
|
-
uiFrameAncestors?: string[];
|
|
36
|
-
disableCache?: boolean;
|
|
37
|
-
dependencyTree?: boolean;
|
|
38
|
-
historyEnabled?: boolean;
|
|
39
|
-
disableAiServiceFallback?: boolean;
|
|
40
|
-
selfReflectionEnabled?: boolean;
|
|
41
|
-
conversationSummaryEnabled?: boolean;
|
|
42
|
-
images?: UploadedImage[];
|
|
43
|
-
isDev?: boolean;
|
|
44
|
-
}
|
|
45
|
-
interface ExecutorArgs {
|
|
46
|
-
[key: string]: unknown;
|
|
47
|
-
}
|
|
48
|
-
export type OperationExecutor = (args: ExecutorArgs, options: CodegenOptions) => Promise<void>;
|
|
49
|
-
export type Operation = {
|
|
50
|
-
executor: OperationExecutor;
|
|
51
|
-
def: FunctionDef;
|
|
52
|
-
};
|
|
53
|
-
export interface Plugin {
|
|
54
|
-
name: string;
|
|
55
|
-
aiServices?: Record<string, GenerateContentFunction>;
|
|
56
|
-
operations?: Record<string, Operation>;
|
|
57
|
-
}
|
|
58
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"codegen-types.js","sourceRoot":"","sources":["../../../src/main/codegen-types.ts"],"names":[],"mappings":""}
|