genaicode 0.8.6 → 0.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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 +16 -4
- 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 +1 -3
- 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-schema.js +10 -0
- package/dist/main/config-schema.js.map +1 -1
- package/dist/main/config-types.d.ts +22 -16
- 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 +5 -3
- 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 +29 -4
- 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 +12 -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 +3 -2
- package/dist/prompt/function-defs/ask-question.js +93 -81
- 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 +1 -1
- 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 +1 -2
- 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.js +1 -5
- 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.js +1 -5
- 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} +2 -2
- 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} +28 -29
- 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.js +4 -4
- 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.js +1 -4
- 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.js +92 -61
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.js +2 -1
- 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 +7 -1
- package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js +42 -42
- 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.js +3 -2
- 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 +75 -6
- 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 +30 -13
- 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 +2 -1
- package/dist/prompt/steps/step-context-optimization.js +5 -7
- 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 +1 -1
- package/dist/prompt/systemprompt.js +40 -11
- 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-BAAQr5b1.js +0 -1747
- 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,12 +1,14 @@
|
|
|
1
1
|
import assert from 'node:assert';
|
|
2
|
+
import { ModelType } from '../../ai-service/common-types.js';
|
|
2
3
|
import { validateFunctionCall } from '../function-calling-validate.js';
|
|
3
|
-
|
|
4
|
+
import { rcConfig } from '../../main/config.js';
|
|
5
|
+
export async function validateAndRecoverSingleResult([prompt, functionDefs, requiredFunctionName, temperature, cheap, options], result, generateContentFn, rootDir = rcConfig.rootDir) {
|
|
4
6
|
if (!requiredFunctionName) {
|
|
5
7
|
// quite unexpected
|
|
6
8
|
return result;
|
|
7
9
|
}
|
|
8
10
|
let call = result[0];
|
|
9
|
-
const validatorError = validateFunctionCall(call, requiredFunctionName, result);
|
|
11
|
+
const validatorError = validateFunctionCall(call, requiredFunctionName, result, rootDir);
|
|
10
12
|
if (validatorError) {
|
|
11
13
|
console.log('Invalid function call', call, validatorError);
|
|
12
14
|
if (!call) {
|
|
@@ -36,14 +38,14 @@ export async function validateAndRecoverSingleResult([prompt, functionDefs, requ
|
|
|
36
38
|
if (cheap) {
|
|
37
39
|
console.log('Disabling --cheap for recovery.');
|
|
38
40
|
}
|
|
39
|
-
result = await generateContentFn(prompt, functionDefs, requiredFunctionName, temperature,
|
|
41
|
+
result = await generateContentFn(prompt, functionDefs, requiredFunctionName, temperature, ModelType.CHEAP, options);
|
|
40
42
|
console.log('Recover result:', result);
|
|
41
43
|
if (result?.length === 1) {
|
|
42
|
-
let recoveryError = validateFunctionCall(result[0], requiredFunctionName, result);
|
|
44
|
+
let recoveryError = validateFunctionCall(result[0], requiredFunctionName, result, rootDir);
|
|
43
45
|
if (recoveryError) {
|
|
44
46
|
console.log("Use more expensive recovery method, because we couldn't recover.");
|
|
45
|
-
result = await generateContentFn(prompt, functionDefs, requiredFunctionName, temperature,
|
|
46
|
-
recoveryError = validateFunctionCall(result?.[0], requiredFunctionName, result);
|
|
47
|
+
result = await generateContentFn(prompt, functionDefs, requiredFunctionName, temperature, ModelType.DEFAULT, options);
|
|
48
|
+
recoveryError = validateFunctionCall(result?.[0], requiredFunctionName, result, rootDir);
|
|
47
49
|
assert(!recoveryError, 'Recovery failed');
|
|
48
50
|
}
|
|
49
51
|
console.log('Recovery was successful');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-validate-recover.js","sourceRoot":"","sources":["../../../src/prompt/steps/step-validate-recover.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"step-validate-recover.js","sourceRoot":"","sources":["../../../src/prompt/steps/step-validate-recover.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AAIjC,OA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AAC,GAAG,CAAC,qCAAqC,EAAE,MAAM,CAAC,CAAC;QAC7D,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { GenerateContentFunction } from '../../ai-service/common-types.js';
|
|
2
|
+
import { PromptItem } from '../../ai-service/common-types.js';
|
|
3
|
+
import { FunctionCall } from '../../ai-service/common-types.js';
|
|
4
|
+
import { FunctionDef } from '../../ai-service/common-types.js';
|
|
2
5
|
import { CodegenOptions } from '../../main/codegen-types.js';
|
|
3
6
|
export declare function executeStepVerifyPatch({ filePath, patch, explanation }: {
|
|
4
7
|
filePath: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fs from 'fs';
|
|
2
2
|
import * as diff from 'diff';
|
|
3
|
+
import { ModelType } from '../../ai-service/common-types.js';
|
|
3
4
|
import { validateAndRecoverSingleResult } from './step-validate-recover.js';
|
|
4
5
|
export async function executeStepVerifyPatch({ filePath, patch, explanation }, generateContentFn, prompt, functionDefs, temperature, cheap, options) {
|
|
5
6
|
console.log('Verification of patch for file:', filePath);
|
|
@@ -14,7 +15,14 @@ export async function executeStepVerifyPatch({ filePath, patch, explanation }, g
|
|
|
14
15
|
if (!updatedContent) {
|
|
15
16
|
console.log(`Patch could not be applied for ${filePath}. Retrying without patchFile function.`);
|
|
16
17
|
// Rerun content generation without patchFile function
|
|
17
|
-
const partialRequest = [
|
|
18
|
+
const partialRequest = [
|
|
19
|
+
prompt,
|
|
20
|
+
functionDefs,
|
|
21
|
+
'updateFile',
|
|
22
|
+
temperature,
|
|
23
|
+
cheap ? ModelType.CHEAP : ModelType.DEFAULT,
|
|
24
|
+
options,
|
|
25
|
+
];
|
|
18
26
|
let partialResult = await generateContentFn(...partialRequest);
|
|
19
27
|
partialResult = await validateAndRecoverSingleResult(partialRequest, partialResult, generateContentFn);
|
|
20
28
|
const getSourceCodeCall = partialResult.find((call) => call.name === 'getSourceCode');
|
|
@@ -28,7 +36,12 @@ export async function executeStepVerifyPatch({ filePath, patch, explanation }, g
|
|
|
28
36
|
}
|
|
29
37
|
else {
|
|
30
38
|
console.log('Patch verified successfully');
|
|
31
|
-
return [
|
|
39
|
+
return [
|
|
40
|
+
{
|
|
41
|
+
name: 'patchFile',
|
|
42
|
+
args: { filePath, patch, explanation, oldContent: currentContent, newContent: updatedContent },
|
|
43
|
+
},
|
|
44
|
+
];
|
|
32
45
|
}
|
|
33
46
|
}
|
|
34
47
|
//# sourceMappingURL=step-verify-patch.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"step-verify-patch.js","sourceRoot":"","sources":["../../../src/prompt/steps/step-verify-patch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"step-verify-patch.js","sourceRoot":"","sources":["../../../src/prompt/steps/step-verify-patch.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAM7B,OAAO,EAAE,SAAS,EAAE,MAAM,kCAAkC,CAAC;AAC7D,OAAO,EAAE,8BAA8B,EAAE,MAAM,4BAA4B,CAAC;AAG5E,MAAM,CAAC,KAAK,UAAU,sBAAsB,CAC1C,EAAE,QAAQ,EAAE,KAAK,EAAE,WAAW,EAA4D,EAC1F,iBAA0C,EAC1C,MAAoB,EACpB,YAA2B,EAC3B,WAAmB,EACnB,KAAc,EACd,OAAuB;IAEvB,OAAO,CAAC,GAAG,CAAC,iCAAiC,EAAE,QAAQ,CAAC,CAAC;IAEzD,IAAI,cAAc,GAAqB,KAAK,CAAC;IAC7C,MAAM,cAAc,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAE1D,IAAI,CAAC;QACH,cAAc,GAAG,IAAI,CAAC,UAAU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E,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,UAAU,EAAE,cAAc,EAAE;aAC/F;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,18 +1,4 @@
|
|
|
1
|
-
import { DependencyInfo } from '../../files/read-files';
|
|
2
1
|
export declare enum StepResult {
|
|
3
2
|
CONTINUE = 0,
|
|
4
3
|
BREAK = 1
|
|
5
4
|
}
|
|
6
|
-
export interface SummaryInfo {
|
|
7
|
-
filePath: string;
|
|
8
|
-
tokenCount: number;
|
|
9
|
-
summary: string;
|
|
10
|
-
}
|
|
11
|
-
export type SummaryCache = Record<string, {
|
|
12
|
-
tokenCount: number;
|
|
13
|
-
summary: string;
|
|
14
|
-
checksum: string;
|
|
15
|
-
dependencies: DependencyInfo[];
|
|
16
|
-
}> & {
|
|
17
|
-
_version: string;
|
|
18
|
-
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"steps-types.js","sourceRoot":"","sources":["../../../src/prompt/steps/steps-types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"steps-types.js","sourceRoot":"","sources":["../../../src/prompt/steps/steps-types.ts"],"names":[],"mappings":"AAAA,MAAM,CAAN,IAAY,UAGX;AAHD,WAAY,UAAU;IACpB,mDAAQ,CAAA;IACR,6CAAK,CAAA;AACP,CAAC,EAHW,UAAU,KAAV,UAAU,QAGrB"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { CodegenOptions } from '../main/codegen-types.js';
|
|
2
2
|
import { RcConfig } from '../main/config-types.js';
|
|
3
3
|
/** Generates a system prompt with the codegen prompt merged */
|
|
4
|
-
export declare function getSystemPrompt({ rootDir, importantContext }: Pick<RcConfig, 'rootDir' | 'importantContext'>, options: CodegenOptions): string;
|
|
4
|
+
export declare function getSystemPrompt({ rootDir, importantContext }: Pick<RcConfig, 'rootDir' | 'importantContext'>, options: Omit<CodegenOptions, 'aiService'>): string;
|
|
@@ -15,7 +15,7 @@ Please limit any changes to the root directory of my application, which is \`${r
|
|
|
15
15
|
- **Use Absolute Paths**: Always use absolute file paths exactly as provided.
|
|
16
16
|
- **Return Working Code**: Aim to return fully functional code.
|
|
17
17
|
- **Avoid Incomplete Code Snippets**: Do not include commented-out fragments like \`// ... (keep other existing functions)\`.
|
|
18
|
-
- **Handle Large Files Appropriately**: For large files, prefer to use the \`patchFile\` function.
|
|
18
|
+
- **Handle Large Files Appropriately**: For large files, prefer to use the \`patchFile\` function, otherwise use \`updateFile\` for small files.
|
|
19
19
|
- **Suggest File Splitting When Relevant**: Suggest splitting large files if it improves maintainability.
|
|
20
20
|
- **Verify Permissions**: Ensure you have the necessary permissions before proceeding.
|
|
21
21
|
- **Error Handling**: If instructions are unclear, consider failing the task with an explanation.
|
|
@@ -59,6 +59,33 @@ To have conversation with me use the \`askQuestion\` function. This function all
|
|
|
59
59
|
|
|
60
60
|
Also additional actions can be added by plugins, and their names will be prefixed with \`plugin:\`.
|
|
61
61
|
|
|
62
|
+
### How askQuestion process works
|
|
63
|
+
|
|
64
|
+
1. You receive a conversation history
|
|
65
|
+
2. You call the \`askQuestion\` function, which contains the message and the selected action type.
|
|
66
|
+
3. You receive conversation history with the askQuestion function call added.
|
|
67
|
+
4. You can call the action handler based on the action type.
|
|
68
|
+
5. User will receive the response from the action handler.
|
|
69
|
+
|
|
70
|
+
Example use cases of action types:
|
|
71
|
+
|
|
72
|
+
- Have a conversation with the user, provide direct answers to questions, share immediate observations **based on direct inspection**, provide feedback etc. -> **sendMessage**
|
|
73
|
+
- Need access to some files contents, which exist in the project, but content was not provided for them (have only summary, content is null) -> **requestFilesContent**
|
|
74
|
+
- Small change in one file that exists already is needed, and conversation should continue -> **updateFile**
|
|
75
|
+
- You want to create one new file during the conversation, and then continue the conversation -> **createFile**
|
|
76
|
+
- The conclusion of the conversation is to perform an implementation -> **confirmCodeGeneration**
|
|
77
|
+
- Considering an action, but missing permission to perform it -> **requestPermissions**
|
|
78
|
+
- Analyze a non trivial problem, do it internally, which involves a specific process or computation, and respond with the specific results or findings of that analysis to the user -> **performAnalysis**
|
|
79
|
+
- Simple visual analysis of an image, which is already present in the context -> **sendMessage**
|
|
80
|
+
- Need to reduce size of the context, and content of some files is not needed anymore -> **removeFilesFromContext**
|
|
81
|
+
- Need to reorganize the context of the conversation, or reduce its size -> **contextOptimization**
|
|
82
|
+
- Generate an image -> **generateImage**
|
|
83
|
+
- Search for a keyword/phrase over the codebase of the project -> **searchCode**
|
|
84
|
+
- Need to perform a linting of the code -> **lint**
|
|
85
|
+
- End the conversation -> **endConversation**
|
|
86
|
+
- The user needs help with GenAIcode itself, encountered a problem, or needs guidance -> **genaicodeHelp**
|
|
87
|
+
- Perform inference on a AI model with reasoning capabilities -> **reasoningInference**
|
|
88
|
+
|
|
62
89
|
### Efficient File Content Requests
|
|
63
90
|
|
|
64
91
|
You can request the content of legitimate files within the project without interrupting the user. This allows you to gather more context when needed.
|
|
@@ -86,19 +113,21 @@ It is ** VERY IMPORTANT ** to follow the conversation flow to ensure a smooth an
|
|
|
86
113
|
|
|
87
114
|
## Conversation Flow Best Practices
|
|
88
115
|
|
|
89
|
-
- If the user wants to stop the conversation, you should respect that and stop the conversation (
|
|
116
|
+
- If the user wants to stop the conversation, you should respect that and stop the conversation (instead of using sendMessage prefer to use endConversation).
|
|
90
117
|
- If you want to make small one file change, and continue the conversation, you can do that using actionType=updateFile. This makes sense if the change is small and does not require extensive planning.
|
|
91
118
|
- If you are missing context or have uncertainties, ask for clarification before proposing code changes.
|
|
92
119
|
- Every assistant message must contain meaningful content, whether it’s a summary, clarifying question, or proposed code snippet.
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
-
|
|
99
|
-
-
|
|
100
|
-
-
|
|
101
|
-
-
|
|
120
|
+
- Complete the conversation and fully understand the user's request before starting code generation.
|
|
121
|
+
- Always provide tangible analysis, results, or insights when stating that it is performing analysis.
|
|
122
|
+
- Provide meaningful responses or explanations instead of generic placeholders like "I will do something. Please wait a moment".
|
|
123
|
+
- Request all necessary permissions and information before starting code generation.
|
|
124
|
+
- When responding with \`genaicodeHelp\` action type, assume that the final answer will be generated by subsequent \`genaicodeHelp\` function call. So you should not try to provide the final answer in the first response, and also you should not ask for more information or ask other questions in the first response.
|
|
125
|
+
- When writing content of \`message\` parameter in the \`askQuestion\` function, always direct it to the user, not to the assistant. For example, instead of "User is asking for...", use "You are asking for...".
|
|
126
|
+
- Try to tell the user what is going to happen next, what they should expect, and what they should do next. For example, "I will now generate the code changes summary. Please confirm if you are ready to proceed.".
|
|
127
|
+
- Do not refer to \`actionType\` parameter name or values in the message content. For example, instead of "I will now generate the code changes summary. Please confirm if you are ready to proceed with actionType: confirmCodeGeneration.", use "I will now generate the code changes summary. Please confirm if you are ready to proceed.".
|
|
128
|
+
- Do not use \`createFile\` action type to create a file that already exists in the project. Use it only to create new files.
|
|
129
|
+
- When using \`reasoningInference\` action type to perform reasoning inference, in first step tell the user what you are going to do, and in the second step provide the results of the reasoning inference.
|
|
130
|
+
- When calling \`reasoningInference\` function, always provide a detailed prompt that includes the problem statement, context, constraints, assumptions, and solution. This will help the reasoning model to provide more accurate predictions. REMEMBER: The reasoning model will only consider the prompt and will not have access to any other context, so if you think something is important, include its full content in the context items.
|
|
102
131
|
|
|
103
132
|
## GenAIcode configuration
|
|
104
133
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"systemprompt.js","sourceRoot":"","sources":["../../src/prompt/systemprompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAItD,+DAA+D;AAC/D,MAAM,UAAU,eAAe,CAC7B,EAAE,OAAO,EAAE,gBAAgB,EAAkD,EAC7E,
|
|
1
|
+
{"version":3,"file":"systemprompt.js","sourceRoot":"","sources":["../../src/prompt/systemprompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,uBAAuB,EAAE,MAAM,aAAa,CAAC;AAItD,+DAA+D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GAAG,CAAC,gBAAgB,CAAC,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IAC5B,CAAC;IAED,uBAAuB,CAAC,YAAY,CAAC,CAAC;IAEtC,OAAO,YAAY,CAAC;AACtB,CAAC"}
|
|
@@ -3,7 +3,7 @@ const currentPromptPlugin = {
|
|
|
3
3
|
name: 'current-prompt-plugin',
|
|
4
4
|
// Example implementation of generateContent hooks
|
|
5
5
|
generateContentHook: async ([prompt]) => {
|
|
6
|
-
fs.writeFileSync('./src/
|
|
6
|
+
fs.writeFileSync('./src/prompt-debug/current-prompt.js', 'export const DEBUG_CURRENT_PROMPT = ' + JSON.stringify(prompt, null, 2) + ';');
|
|
7
7
|
},
|
|
8
8
|
};
|
|
9
9
|
export default currentPromptPlugin;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"current-prompt-plugin.js","sourceRoot":"","sources":["../../src/prompt-debug/current-prompt-plugin.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAGpB,MAAM,mBAAmB,GAAW;IAClC,IAAI,EAAE,uBAAuB;IAC7B,kDAAkD;IAClD,mBAAmB,EAAE,KAAK,EAAE,CAAC,MAAM,CAAC,EAAiB,EAAE;QACrD,EAAE,CAAC,aAAa,CACd,sCAAsC,EACtC,sCAAsC,GAAG,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,GAAG,GAAG,CAC/E,CAAC;IACJ,CAAC;CACF,CAAC;AAEF,eAAe,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
interface GenAIcodeContext {
|
|
2
|
+
setContext<T = unknown>(key: string, value: T): Promise<void>;
|
|
3
|
+
getContext<T = unknown>(key: string): Promise<T | undefined>;
|
|
4
|
+
clearContext(key?: string): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
/**
|
|
7
|
+
* Implementation of the GenAIcode context management
|
|
8
|
+
*/
|
|
9
|
+
declare class GenAIcodeContextManager implements GenAIcodeContext {
|
|
10
|
+
getPort(): number;
|
|
11
|
+
getToken(): string;
|
|
12
|
+
/**
|
|
13
|
+
* Sets a context value
|
|
14
|
+
* @param key - The context key
|
|
15
|
+
* @param value - The value to store
|
|
16
|
+
*/
|
|
17
|
+
setContext<T = unknown>(key: string, value: T): Promise<void>;
|
|
18
|
+
/**
|
|
19
|
+
* Gets a context value
|
|
20
|
+
* @param key - The context key
|
|
21
|
+
* @returns The stored value, or undefined if not found
|
|
22
|
+
*/
|
|
23
|
+
getContext<T = unknown>(key: string): Promise<T | undefined>;
|
|
24
|
+
/**
|
|
25
|
+
* Clears context value(s)
|
|
26
|
+
* @param key - Optional key to clear specific context. If not provided, clears all context.
|
|
27
|
+
*/
|
|
28
|
+
clearContext(key?: string): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
export declare const contextManager: GenAIcodeContextManager;
|
|
31
|
+
export {};
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
// Error class for context operations
|
|
2
|
+
class ContextError extends Error {
|
|
3
|
+
constructor(message) {
|
|
4
|
+
super(`GenAIcode Context Error: ${message}`);
|
|
5
|
+
this.name = 'ContextError';
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Implementation of the GenAIcode context management
|
|
10
|
+
*/
|
|
11
|
+
class GenAIcodeContextManager {
|
|
12
|
+
getPort() {
|
|
13
|
+
const portAttr = document.querySelector('[data-genaicode-port]').dataset['genaicodePort'];
|
|
14
|
+
if (!portAttr) {
|
|
15
|
+
throw new ContextError('GenAIcode port not found in the document');
|
|
16
|
+
}
|
|
17
|
+
return parseInt(portAttr);
|
|
18
|
+
}
|
|
19
|
+
getToken() {
|
|
20
|
+
const tokenAttr = document.querySelector('[data-genaicode-token]').dataset['genaicodeToken'];
|
|
21
|
+
if (!tokenAttr) {
|
|
22
|
+
throw new ContextError('GenAIcode token not found in the document');
|
|
23
|
+
}
|
|
24
|
+
return tokenAttr;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sets a context value
|
|
28
|
+
* @param key - The context key
|
|
29
|
+
* @param value - The value to store
|
|
30
|
+
*/
|
|
31
|
+
async setContext(key, value) {
|
|
32
|
+
try {
|
|
33
|
+
// Notify the GenAIcode server about context update
|
|
34
|
+
try {
|
|
35
|
+
await fetch(`http://localhost:${this.getPort()}/api/app-context/${key}`, {
|
|
36
|
+
method: 'POST',
|
|
37
|
+
headers: {
|
|
38
|
+
'Content-Type': 'application/json',
|
|
39
|
+
Authorization: `Bearer ${this.getToken()}`,
|
|
40
|
+
},
|
|
41
|
+
body: JSON.stringify({ value }),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
catch (error) {
|
|
45
|
+
console.warn('Failed to notify GenAIcode server about context update:', error);
|
|
46
|
+
// Don't throw here - the local storage update was successful
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
if (error instanceof ContextError) {
|
|
51
|
+
throw error;
|
|
52
|
+
}
|
|
53
|
+
throw new ContextError(`Failed to set context: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Gets a context value
|
|
58
|
+
* @param key - The context key
|
|
59
|
+
* @returns The stored value, or undefined if not found
|
|
60
|
+
*/
|
|
61
|
+
async getContext(key) {
|
|
62
|
+
try {
|
|
63
|
+
const { value } = await fetch(`http://localhost:${this.getPort()}/api/app-context/${key}`, {
|
|
64
|
+
headers: {
|
|
65
|
+
Authorization: `Bearer ${this.getToken()}`,
|
|
66
|
+
},
|
|
67
|
+
}).then((res) => res.json());
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
catch (error) {
|
|
71
|
+
console.error('Failed to get context:', error);
|
|
72
|
+
return undefined;
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Clears context value(s)
|
|
77
|
+
* @param key - Optional key to clear specific context. If not provided, clears all context.
|
|
78
|
+
*/
|
|
79
|
+
async clearContext(key) {
|
|
80
|
+
try {
|
|
81
|
+
if (key) {
|
|
82
|
+
// Notify the GenAIcode server about context removal
|
|
83
|
+
try {
|
|
84
|
+
await fetch(`http://localhost:${this.getPort()}/api/app-context/${key}`, {
|
|
85
|
+
method: 'DELETE',
|
|
86
|
+
headers: {
|
|
87
|
+
Authorization: `Bearer ${this.getToken()}`,
|
|
88
|
+
},
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
catch (error) {
|
|
92
|
+
console.warn('Failed to notify GenAIcode server about context removal:', error);
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
else {
|
|
96
|
+
// Notify the GenAIcode server about clearing all context
|
|
97
|
+
try {
|
|
98
|
+
await fetch(`http://localhost:${this.getPort()}/api/app-context`, {
|
|
99
|
+
method: 'DELETE',
|
|
100
|
+
headers: {
|
|
101
|
+
Authorization: `Bearer ${this.getToken()}`,
|
|
102
|
+
},
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
catch (error) {
|
|
106
|
+
console.warn('Failed to notify GenAIcode server about context clear:', error);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
catch (error) {
|
|
111
|
+
if (error instanceof ContextError) {
|
|
112
|
+
throw error;
|
|
113
|
+
}
|
|
114
|
+
throw new ContextError(`Failed to clear context: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
// Create and export the context manager instance
|
|
119
|
+
export const contextManager = new GenAIcodeContextManager();
|
|
120
|
+
//# sourceMappingURL=vite-genaicode-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vite-genaicode-context.js","sourceRoot":"","sources":["../../src/vite-genaicode/vite-genaicode-context.ts"],"names":[],"mappings":"AAOA,qCAAqC;AACrC,MAAM,YAAa,SAAQ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