genaicode 1.0.0 → 2.1.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/CHANGELOG.md +37 -0
- package/README.md +371 -88
- package/dist/cli.d.ts +2 -0
- package/dist/cli.js +4 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/client.d.ts +42 -0
- package/dist/core/client.js +190 -0
- package/dist/core/client.js.map +1 -0
- package/dist/core/errors.d.ts +38 -0
- package/dist/core/errors.js +118 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/middleware.d.ts +43 -0
- package/dist/core/middleware.js +173 -0
- package/dist/core/middleware.js.map +1 -0
- package/dist/core/plugins.d.ts +21 -0
- package/dist/core/plugins.js +55 -0
- package/dist/core/plugins.js.map +1 -0
- package/dist/core/prompt.d.ts +14 -0
- package/dist/core/prompt.js +47 -0
- package/dist/core/prompt.js.map +1 -0
- package/dist/core/result.d.ts +5 -0
- package/dist/core/result.js +27 -0
- package/dist/core/result.js.map +1 -0
- package/dist/core/stream.d.ts +11 -0
- package/dist/core/stream.js +93 -0
- package/dist/core/stream.js.map +1 -0
- package/dist/core/types.d.ts +153 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +12 -8
- package/dist/index.js +8 -11
- package/dist/index.js.map +1 -1
- package/dist/pivot-notice.d.ts +1 -0
- package/dist/pivot-notice.js +13 -0
- package/dist/pivot-notice.js.map +1 -0
- package/dist/providers/anthropic-converter.d.ts +12 -0
- package/dist/providers/anthropic-converter.js +111 -0
- package/dist/providers/anthropic-converter.js.map +1 -0
- package/dist/providers/anthropic.d.ts +11 -0
- package/dist/providers/anthropic.js +90 -0
- package/dist/providers/anthropic.js.map +1 -0
- package/dist/providers/fixtures/multimodal-tool-roundtrip.d.ts +4 -0
- package/dist/providers/fixtures/multimodal-tool-roundtrip.js +32 -0
- package/dist/providers/fixtures/multimodal-tool-roundtrip.js.map +1 -0
- package/dist/providers/google-converter.d.ts +10 -0
- package/dist/providers/google-converter.js +142 -0
- package/dist/providers/google-converter.js.map +1 -0
- package/dist/providers/google.d.ts +22 -0
- package/dist/providers/google.js +97 -0
- package/dist/providers/google.js.map +1 -0
- package/dist/providers/openai-converter.d.ts +33 -0
- package/dist/providers/openai-converter.js +192 -0
- package/dist/providers/openai-converter.js.map +1 -0
- package/dist/providers/openai.d.ts +13 -0
- package/dist/providers/openai.js +45 -0
- package/dist/providers/openai.js.map +1 -0
- package/dist/providers.d.ts +11 -0
- package/dist/providers.js +7 -0
- package/dist/providers.js.map +1 -0
- package/docs/pivot.md +111 -0
- package/docs/provider-packages.md +60 -0
- package/docs/retry.md +62 -0
- package/docs/semver.md +55 -0
- package/package.json +34 -91
- package/bin/genaicode-dev.js +0 -12
- package/bin/genaicode.cjs +0 -23
- package/dist/ai-service/ai-studio.d.ts +0 -6
- package/dist/ai-service/ai-studio.js +0 -460
- package/dist/ai-service/ai-studio.js.map +0 -1
- package/dist/ai-service/anthropic.d.ts +0 -5
- package/dist/ai-service/anthropic.js +0 -353
- package/dist/ai-service/anthropic.js.map +0 -1
- package/dist/ai-service/common-types.d.ts +0 -131
- package/dist/ai-service/common-types.js +0 -10
- package/dist/ai-service/common-types.js.map +0 -1
- package/dist/ai-service/common.d.ts +0 -23
- package/dist/ai-service/common.js +0 -59
- package/dist/ai-service/common.js.map +0 -1
- package/dist/ai-service/dall-e.d.ts +0 -7
- package/dist/ai-service/dall-e.js +0 -44
- package/dist/ai-service/dall-e.js.map +0 -1
- package/dist/ai-service/files-api.d.ts +0 -33
- package/dist/ai-service/files-api.js +0 -239
- package/dist/ai-service/files-api.js.map +0 -1
- package/dist/ai-service/github-models.d.ts +0 -13
- package/dist/ai-service/github-models.js +0 -49
- package/dist/ai-service/github-models.js.map +0 -1
- package/dist/ai-service/local-llm.d.ts +0 -6
- package/dist/ai-service/local-llm.js +0 -74
- package/dist/ai-service/local-llm.js.map +0 -1
- package/dist/ai-service/openai-responses.d.ts +0 -9
- package/dist/ai-service/openai-responses.js +0 -332
- package/dist/ai-service/openai-responses.js.map +0 -1
- package/dist/ai-service/openai.d.ts +0 -9
- package/dist/ai-service/openai.js +0 -395
- package/dist/ai-service/openai.js.map +0 -1
- package/dist/ai-service/service-configurations-types.d.ts +0 -79
- package/dist/ai-service/service-configurations-types.js +0 -6
- package/dist/ai-service/service-configurations-types.js.map +0 -1
- package/dist/ai-service/service-configurations.d.ts +0 -42
- package/dist/ai-service/service-configurations.js +0 -241
- package/dist/ai-service/service-configurations.js.map +0 -1
- package/dist/ai-service/unescape-function-call.d.ts +0 -7
- package/dist/ai-service/unescape-function-call.js +0 -59
- package/dist/ai-service/unescape-function-call.js.map +0 -1
- package/dist/ai-service/vertex-ai-claude.d.ts +0 -5
- package/dist/ai-service/vertex-ai-claude.js +0 -160
- package/dist/ai-service/vertex-ai-claude.js.map +0 -1
- package/dist/ai-service/vertex-ai-imagen.d.ts +0 -7
- package/dist/ai-service/vertex-ai-imagen.js +0 -70
- package/dist/ai-service/vertex-ai-imagen.js.map +0 -1
- package/dist/ai-service/vertex-ai.d.ts +0 -6
- package/dist/ai-service/vertex-ai.js +0 -18
- package/dist/ai-service/vertex-ai.js.map +0 -1
- package/dist/cli/cli-options.d.ts +0 -10
- package/dist/cli/cli-options.js +0 -116
- package/dist/cli/cli-options.js.map +0 -1
- package/dist/cli/cli-params.d.ts +0 -29
- package/dist/cli/cli-params.js +0 -118
- package/dist/cli/cli-params.js.map +0 -1
- package/dist/cli/service-autodetect.d.ts +0 -2
- package/dist/cli/service-autodetect.js +0 -17
- package/dist/cli/service-autodetect.js.map +0 -1
- package/dist/cli/validate-cli-params.d.ts +0 -18
- package/dist/cli/validate-cli-params.js +0 -146
- package/dist/cli/validate-cli-params.js.map +0 -1
- package/dist/files/cache-file.d.ts +0 -10
- package/dist/files/cache-file.js +0 -57
- package/dist/files/cache-file.js.map +0 -1
- package/dist/files/file-id-utils.d.ts +0 -7
- package/dist/files/file-id-utils.js +0 -25
- package/dist/files/file-id-utils.js.map +0 -1
- package/dist/files/file-utils.d.ts +0 -2
- package/dist/files/file-utils.js +0 -7
- package/dist/files/file-utils.js.map +0 -1
- package/dist/files/find-files.d.ts +0 -10
- package/dist/files/find-files.js +0 -87
- package/dist/files/find-files.js.map +0 -1
- package/dist/files/path-utils.d.ts +0 -1
- package/dist/files/path-utils.js +0 -12
- package/dist/files/path-utils.js.map +0 -1
- package/dist/files/read-files.d.ts +0 -18
- package/dist/files/read-files.js +0 -107
- package/dist/files/read-files.js.map +0 -1
- package/dist/files/search-files.d.ts +0 -53
- package/dist/files/search-files.js +0 -97
- package/dist/files/search-files.js.map +0 -1
- package/dist/files/source-code-tree.d.ts +0 -16
- package/dist/files/source-code-tree.js +0 -41
- package/dist/files/source-code-tree.js.map +0 -1
- package/dist/files/source-code-types.d.ts +0 -53
- package/dist/files/source-code-types.js +0 -2
- package/dist/files/source-code-types.js.map +0 -1
- package/dist/files/source-code-utils.d.ts +0 -31
- package/dist/files/source-code-utils.js +0 -126
- package/dist/files/source-code-utils.js.map +0 -1
- package/dist/files/summary-cache.d.ts +0 -25
- package/dist/files/summary-cache.js +0 -23
- package/dist/files/summary-cache.js.map +0 -1
- package/dist/files/temp-buffer.d.ts +0 -2
- package/dist/files/temp-buffer.js +0 -12
- package/dist/files/temp-buffer.js.map +0 -1
- package/dist/files/update-files.d.ts +0 -7
- package/dist/files/update-files.js +0 -30
- package/dist/files/update-files.js.map +0 -1
- package/dist/help-docs/genaicode-help-document.d.ts +0 -1
- package/dist/help-docs/genaicode-help-document.js +0 -287
- package/dist/help-docs/genaicode-help-document.js.map +0 -1
- package/dist/images/ensure-alpha.d.ts +0 -1
- package/dist/images/ensure-alpha.js +0 -5
- package/dist/images/ensure-alpha.js.map +0 -1
- package/dist/images/imgly-remove-background.d.ts +0 -2
- package/dist/images/imgly-remove-background.js +0 -21
- package/dist/images/imgly-remove-background.js.map +0 -1
- package/dist/images/resize-image.d.ts +0 -19
- package/dist/images/resize-image.js +0 -22
- package/dist/images/resize-image.js.map +0 -1
- package/dist/images/split-image.d.ts +0 -18
- package/dist/images/split-image.js +0 -25
- package/dist/images/split-image.js.map +0 -1
- package/dist/main/codegen-non-interactive.d.ts +0 -2
- package/dist/main/codegen-non-interactive.js +0 -20
- package/dist/main/codegen-non-interactive.js.map +0 -1
- package/dist/main/codegen-types.d.ts +0 -145
- package/dist/main/codegen-types.js +0 -2
- package/dist/main/codegen-types.js.map +0 -1
- package/dist/main/codegen-utils.d.ts +0 -8
- package/dist/main/codegen-utils.js +0 -43
- package/dist/main/codegen-utils.js.map +0 -1
- package/dist/main/codegen.d.ts +0 -5
- package/dist/main/codegen.js +0 -105
- package/dist/main/codegen.js.map +0 -1
- package/dist/main/codegen.test-utils.d.ts +0 -81
- package/dist/main/codegen.test-utils.js +0 -87
- package/dist/main/codegen.test-utils.js.map +0 -1
- package/dist/main/common/abort-controller.d.ts +0 -2
- package/dist/main/common/abort-controller.js +0 -5
- package/dist/main/common/abort-controller.js.map +0 -1
- package/dist/main/common/app-context-bus.d.ts +0 -11
- package/dist/main/common/app-context-bus.js +0 -29
- package/dist/main/common/app-context-bus.js.map +0 -1
- package/dist/main/common/console-types.d.ts +0 -23
- package/dist/main/common/console-types.js +0 -8
- package/dist/main/common/console-types.js.map +0 -1
- package/dist/main/common/content-bus-types.d.ts +0 -60
- package/dist/main/common/content-bus-types.js +0 -12
- package/dist/main/common/content-bus-types.js.map +0 -1
- package/dist/main/common/content-bus.d.ts +0 -16
- package/dist/main/common/content-bus.js +0 -102
- package/dist/main/common/content-bus.js.map +0 -1
- package/dist/main/common/cost-collector.d.ts +0 -12
- package/dist/main/common/cost-collector.js +0 -90
- package/dist/main/common/cost-collector.js.map +0 -1
- package/dist/main/common/user-actions.d.ts +0 -36
- package/dist/main/common/user-actions.js +0 -59
- package/dist/main/common/user-actions.js.map +0 -1
- package/dist/main/config-lib.d.ts +0 -13
- package/dist/main/config-lib.js +0 -90
- package/dist/main/config-lib.js.map +0 -1
- package/dist/main/config-schema.d.ts +0 -15
- package/dist/main/config-schema.js +0 -320
- package/dist/main/config-schema.js.map +0 -1
- package/dist/main/config-types.d.ts +0 -96
- package/dist/main/config-types.js +0 -4
- package/dist/main/config-types.js.map +0 -1
- package/dist/main/config.d.ts +0 -14
- package/dist/main/config.js +0 -110
- package/dist/main/config.js.map +0 -1
- package/dist/main/generate-content-functions.d.ts +0 -3
- package/dist/main/generate-content-functions.js +0 -19
- package/dist/main/generate-content-functions.js.map +0 -1
- package/dist/main/interactive/codegen-interactive.d.ts +0 -2
- package/dist/main/interactive/codegen-interactive.js +0 -57
- package/dist/main/interactive/codegen-interactive.js.map +0 -1
- package/dist/main/interactive/codegen-worker.d.ts +0 -2
- package/dist/main/interactive/codegen-worker.js +0 -55
- package/dist/main/interactive/codegen-worker.js.map +0 -1
- package/dist/main/interactive/common.d.ts +0 -5
- package/dist/main/interactive/common.js +0 -49
- package/dist/main/interactive/common.js.map +0 -1
- package/dist/main/interactive/configure.d.ts +0 -2
- package/dist/main/interactive/configure.js +0 -95
- package/dist/main/interactive/configure.js.map +0 -1
- package/dist/main/interactive/error-handling.d.ts +0 -1
- package/dist/main/interactive/error-handling.js +0 -43
- package/dist/main/interactive/error-handling.js.map +0 -1
- package/dist/main/interactive/help.d.ts +0 -1
- package/dist/main/interactive/help.js +0 -20
- package/dist/main/interactive/help.js.map +0 -1
- package/dist/main/interactive/select-ai-service.d.ts +0 -2
- package/dist/main/interactive/select-ai-service.js +0 -27
- package/dist/main/interactive/select-ai-service.js.map +0 -1
- package/dist/main/interactive/task-file.d.ts +0 -2
- package/dist/main/interactive/task-file.js +0 -35
- package/dist/main/interactive/task-file.js.map +0 -1
- package/dist/main/interactive/text-prompt.d.ts +0 -2
- package/dist/main/interactive/text-prompt.js +0 -18
- package/dist/main/interactive/text-prompt.js.map +0 -1
- package/dist/main/interactive/user-action-handlers.d.ts +0 -1
- package/dist/main/interactive/user-action-handlers.js +0 -20
- package/dist/main/interactive/user-action-handlers.js.map +0 -1
- package/dist/main/interactive/user-interrupt.d.ts +0 -1
- package/dist/main/interactive/user-interrupt.js +0 -36
- package/dist/main/interactive/user-interrupt.js.map +0 -1
- package/dist/main/knowledge/knowledge-store.d.ts +0 -6
- package/dist/main/knowledge/knowledge-store.js +0 -128
- package/dist/main/knowledge/knowledge-store.js.map +0 -1
- package/dist/main/knowledge/types.d.ts +0 -20
- package/dist/main/knowledge/types.js +0 -2
- package/dist/main/knowledge/types.js.map +0 -1
- package/dist/main/plugin-loader.d.ts +0 -36
- package/dist/main/plugin-loader.js +0 -245
- package/dist/main/plugin-loader.js.map +0 -1
- package/dist/main/ui/backend/api-handlers.d.ts +0 -6
- package/dist/main/ui/backend/api-handlers.js +0 -5
- package/dist/main/ui/backend/api-handlers.js.map +0 -1
- package/dist/main/ui/backend/api-utils.d.ts +0 -2
- package/dist/main/ui/backend/api-utils.js +0 -18
- package/dist/main/ui/backend/api-utils.js.map +0 -1
- package/dist/main/ui/backend/api.d.ts +0 -3
- package/dist/main/ui/backend/api.js +0 -25
- package/dist/main/ui/backend/api.js.map +0 -1
- package/dist/main/ui/backend/endpoints/compress-context-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/compress-context-endpoint.js +0 -18
- package/dist/main/ui/backend/endpoints/compress-context-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/config-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/config-endpoint.js +0 -51
- package/dist/main/ui/backend/endpoints/config-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/console-logs-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/console-logs-endpoint.js +0 -19
- package/dist/main/ui/backend/endpoints/console-logs-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/content-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/content-endpoint.js +0 -14
- package/dist/main/ui/backend/endpoints/content-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/context-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/context-endpoint.js +0 -169
- package/dist/main/ui/backend/endpoints/context-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/edit-message-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/edit-message-endpoint.js +0 -37
- package/dist/main/ui/backend/endpoints/edit-message-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/execute-codegen-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/execute-codegen-endpoint.js +0 -44
- package/dist/main/ui/backend/endpoints/execute-codegen-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/execution-status-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/execution-status-endpoint.js +0 -37
- package/dist/main/ui/backend/endpoints/execution-status-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/generate-content-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/generate-content-endpoint.js +0 -29
- package/dist/main/ui/backend/endpoints/generate-content-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/index.d.ts +0 -13
- package/dist/main/ui/backend/endpoints/index.js +0 -14
- package/dist/main/ui/backend/endpoints/index.js.map +0 -1
- package/dist/main/ui/backend/endpoints/interrupt-execution-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/interrupt-execution-endpoint.js +0 -28
- package/dist/main/ui/backend/endpoints/interrupt-execution-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/iteration-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/iteration-endpoint.js +0 -16
- package/dist/main/ui/backend/endpoints/iteration-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/question-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/question-endpoint.js +0 -72
- package/dist/main/ui/backend/endpoints/question-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/service-configuration-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/service-configuration-endpoint.js +0 -54
- package/dist/main/ui/backend/endpoints/service-configuration-endpoint.js.map +0 -1
- package/dist/main/ui/backend/endpoints/usage-endpoint.d.ts +0 -1
- package/dist/main/ui/backend/endpoints/usage-endpoint.js +0 -15
- package/dist/main/ui/backend/endpoints/usage-endpoint.js.map +0 -1
- package/dist/main/ui/backend/server.d.ts +0 -8
- package/dist/main/ui/backend/server.js +0 -84
- package/dist/main/ui/backend/server.js.map +0 -1
- package/dist/main/ui/backend/service.d.ts +0 -159
- package/dist/main/ui/backend/service.js +0 -626
- package/dist/main/ui/backend/service.js.map +0 -1
- package/dist/main/ui/codegen-ui.d.ts +0 -6
- package/dist/main/ui/codegen-ui.js +0 -22
- package/dist/main/ui/codegen-ui.js.map +0 -1
- package/dist/main/ui/common/api-types.d.ts +0 -170
- package/dist/main/ui/common/api-types.js +0 -13
- package/dist/main/ui/common/api-types.js.map +0 -1
- package/dist/main/ui/frontend/assets/favicon-DvroFOpS.png +0 -0
- package/dist/main/ui/frontend/assets/index-5QDg_0vR.css +0 -1
- package/dist/main/ui/frontend/assets/index-C_k1AhO2.js +0 -3445
- package/dist/main/ui/frontend/assets/logo-BGHkG1-J.png +0 -0
- package/dist/main/ui/frontend/assets/logo-dark-KAsU1C78.png +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-cyrillic-400-normal-oElOGqNf.woff2 +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-cyrillic-ext-400-normal-COIQET2s.woff2 +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-greek-400-normal-DUIT0YPZ.woff2 +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-latin-400-normal-BKfmdmKK.woff +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-latin-400-normal-xj9lRvVs.woff2 +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-latin-ext-400-normal-B18ub5-k.woff +0 -0
- package/dist/main/ui/frontend/assets/press-start-2p-latin-ext-400-normal-DDIa4im3.woff2 +0 -0
- package/dist/main/ui/frontend/assets/wolf-bark-Bl17CX4O.mp3 +0 -0
- package/dist/main/ui/frontend/index.html +0 -16
- package/dist/main/ui/user-action-handlers.d.ts +0 -2
- package/dist/main/ui/user-action-handlers.js +0 -34
- package/dist/main/ui/user-action-handlers.js.map +0 -1
- package/dist/operations/create-directory/create-directory-def.d.ts +0 -9
- package/dist/operations/create-directory/create-directory-def.js +0 -22
- package/dist/operations/create-directory/create-directory-def.js.map +0 -1
- package/dist/operations/create-directory/create-directory-executor.d.ts +0 -6
- package/dist/operations/create-directory/create-directory-executor.js +0 -22
- package/dist/operations/create-directory/create-directory-executor.js.map +0 -1
- package/dist/operations/create-file/create-file-def.d.ts +0 -10
- package/dist/operations/create-file/create-file-def.js +0 -29
- package/dist/operations/create-file/create-file-def.js.map +0 -1
- package/dist/operations/create-file/create-file-executor.d.ts +0 -6
- package/dist/operations/create-file/create-file-executor.js +0 -27
- package/dist/operations/create-file/create-file-executor.js.map +0 -1
- package/dist/operations/delete-file/delete-file-def.d.ts +0 -9
- package/dist/operations/delete-file/delete-file-def.js +0 -22
- package/dist/operations/delete-file/delete-file-def.js.map +0 -1
- package/dist/operations/delete-file/delete-file-executor.d.ts +0 -6
- package/dist/operations/delete-file/delete-file-executor.js +0 -23
- package/dist/operations/delete-file/delete-file-executor.js.map +0 -1
- package/dist/operations/download-file/download-file-def.d.ts +0 -10
- package/dist/operations/download-file/download-file-def.js +0 -26
- package/dist/operations/download-file/download-file-def.js.map +0 -1
- package/dist/operations/download-file/download-file-executor.d.ts +0 -6
- package/dist/operations/download-file/download-file-executor.js +0 -44
- package/dist/operations/download-file/download-file-executor.js.map +0 -1
- package/dist/operations/imgly-remove-background/imgly-remove-background-def.d.ts +0 -10
- package/dist/operations/imgly-remove-background/imgly-remove-background-def.js +0 -26
- package/dist/operations/imgly-remove-background/imgly-remove-background-def.js.map +0 -1
- package/dist/operations/imgly-remove-background/imgly-remove-background-executor.d.ts +0 -6
- package/dist/operations/imgly-remove-background/imgly-remove-background-executor.js +0 -40
- package/dist/operations/imgly-remove-background/imgly-remove-background-executor.js.map +0 -1
- package/dist/operations/move-file/move-file-def.d.ts +0 -10
- package/dist/operations/move-file/move-file-def.js +0 -26
- package/dist/operations/move-file/move-file-def.js.map +0 -1
- package/dist/operations/move-file/move-file-executor.d.ts +0 -6
- package/dist/operations/move-file/move-file-executor.js +0 -29
- package/dist/operations/move-file/move-file-executor.js.map +0 -1
- package/dist/operations/operations-index.d.ts +0 -3
- package/dist/operations/operations-index.js +0 -33
- package/dist/operations/operations-index.js.map +0 -1
- package/dist/operations/patch-file/patch-file-def.d.ts +0 -10
- package/dist/operations/patch-file/patch-file-def.js +0 -40
- package/dist/operations/patch-file/patch-file-def.js.map +0 -1
- package/dist/operations/patch-file/patch-file-executor.d.ts +0 -5
- package/dist/operations/patch-file/patch-file-executor.js +0 -26
- package/dist/operations/patch-file/patch-file-executor.js.map +0 -1
- package/dist/operations/resize-image/resize-image-def.d.ts +0 -13
- package/dist/operations/resize-image/resize-image-def.js +0 -37
- package/dist/operations/resize-image/resize-image-def.js.map +0 -1
- package/dist/operations/resize-image/resize-image-executor.d.ts +0 -5
- package/dist/operations/resize-image/resize-image-executor.js +0 -30
- package/dist/operations/resize-image/resize-image-executor.js.map +0 -1
- package/dist/operations/split-image/split-image-def.d.ts +0 -18
- package/dist/operations/split-image/split-image-def.js +0 -46
- package/dist/operations/split-image/split-image-def.js.map +0 -1
- package/dist/operations/split-image/split-image-executor.d.ts +0 -6
- package/dist/operations/split-image/split-image-executor.js +0 -51
- package/dist/operations/split-image/split-image-executor.js.map +0 -1
- package/dist/operations/update-file/update-file-def.d.ts +0 -10
- package/dist/operations/update-file/update-file-def.js +0 -27
- package/dist/operations/update-file/update-file-def.js.map +0 -1
- package/dist/operations/update-file/update-file-executor.d.ts +0 -5
- package/dist/operations/update-file/update-file-executor.js +0 -22
- package/dist/operations/update-file/update-file-executor.js.map +0 -1
- package/dist/project-profiles/detection.d.ts +0 -40
- package/dist/project-profiles/detection.js +0 -131
- package/dist/project-profiles/detection.js.map +0 -1
- package/dist/project-profiles/index.d.ts +0 -35
- package/dist/project-profiles/index.js +0 -72
- package/dist/project-profiles/index.js.map +0 -1
- package/dist/project-profiles/profiles/golang.d.ts +0 -65
- package/dist/project-profiles/profiles/golang.js +0 -208
- package/dist/project-profiles/profiles/golang.js.map +0 -1
- package/dist/project-profiles/profiles/java-maven.d.ts +0 -80
- package/dist/project-profiles/profiles/java-maven.js +0 -165
- package/dist/project-profiles/profiles/java-maven.js.map +0 -1
- package/dist/project-profiles/profiles/javascript-npm.d.ts +0 -40
- package/dist/project-profiles/profiles/javascript-npm.js +0 -118
- package/dist/project-profiles/profiles/javascript-npm.js.map +0 -1
- package/dist/project-profiles/profiles/javascript-react.d.ts +0 -46
- package/dist/project-profiles/profiles/javascript-react.js +0 -147
- package/dist/project-profiles/profiles/javascript-react.js.map +0 -1
- package/dist/project-profiles/profiles/python-django.d.ts +0 -58
- package/dist/project-profiles/profiles/python-django.js +0 -200
- package/dist/project-profiles/profiles/python-django.js.map +0 -1
- package/dist/project-profiles/types.d.ts +0 -122
- package/dist/project-profiles/types.js +0 -77
- package/dist/project-profiles/types.js.map +0 -1
- package/dist/prompt/ai-service-fallback.d.ts +0 -4
- package/dist/prompt/ai-service-fallback.js +0 -47
- package/dist/prompt/ai-service-fallback.js.map +0 -1
- package/dist/prompt/context-utils.d.ts +0 -7
- package/dist/prompt/context-utils.js +0 -33
- package/dist/prompt/context-utils.js.map +0 -1
- package/dist/prompt/dynamic-function-generator.d.ts +0 -2
- package/dist/prompt/dynamic-function-generator.js +0 -58
- package/dist/prompt/dynamic-function-generator.js.map +0 -1
- package/dist/prompt/function-calling-validate.d.ts +0 -4
- package/dist/prompt/function-calling-validate.js +0 -109
- package/dist/prompt/function-calling-validate.js.map +0 -1
- package/dist/prompt/function-calling.d.ts +0 -5
- package/dist/prompt/function-calling.js +0 -88
- package/dist/prompt/function-calling.js.map +0 -1
- package/dist/prompt/function-defs/analysis-result.d.ts +0 -7
- package/dist/prompt/function-defs/analysis-result.js +0 -24
- package/dist/prompt/function-defs/analysis-result.js.map +0 -1
- package/dist/prompt/function-defs/ask-question.d.ts +0 -20
- package/dist/prompt/function-defs/ask-question.js +0 -373
- package/dist/prompt/function-defs/ask-question.js.map +0 -1
- package/dist/prompt/function-defs/code-execution.d.ts +0 -7
- package/dist/prompt/function-defs/code-execution.js +0 -27
- package/dist/prompt/function-defs/code-execution.js.map +0 -1
- package/dist/prompt/function-defs/codegen-planning.d.ts +0 -8
- package/dist/prompt/function-defs/codegen-planning.js +0 -60
- package/dist/prompt/function-defs/codegen-planning.js.map +0 -1
- package/dist/prompt/function-defs/codegen-summary.d.ts +0 -5
- package/dist/prompt/function-defs/codegen-summary.js +0 -103
- package/dist/prompt/function-defs/codegen-summary.js.map +0 -1
- package/dist/prompt/function-defs/compound-action-list.d.ts +0 -7
- package/dist/prompt/function-defs/compound-action-list.js +0 -38
- package/dist/prompt/function-defs/compound-action-list.js.map +0 -1
- package/dist/prompt/function-defs/compound-action.d.ts +0 -2
- package/dist/prompt/function-defs/compound-action.js +0 -47
- package/dist/prompt/function-defs/compound-action.js.map +0 -1
- package/dist/prompt/function-defs/container-task-commands.d.ts +0 -10
- package/dist/prompt/function-defs/container-task-commands.js +0 -185
- package/dist/prompt/function-defs/container-task-commands.js.map +0 -1
- package/dist/prompt/function-defs/context-compression.d.ts +0 -47
- package/dist/prompt/function-defs/context-compression.js +0 -49
- package/dist/prompt/function-defs/context-compression.js.map +0 -1
- package/dist/prompt/function-defs/conversation-graph.d.ts +0 -33
- package/dist/prompt/function-defs/conversation-graph.js +0 -110
- package/dist/prompt/function-defs/conversation-graph.js.map +0 -1
- package/dist/prompt/function-defs/conversation-summary.d.ts +0 -2
- package/dist/prompt/function-defs/conversation-summary.js +0 -15
- package/dist/prompt/function-defs/conversation-summary.js.map +0 -1
- package/dist/prompt/function-defs/explanation.d.ts +0 -5
- package/dist/prompt/function-defs/explanation.js +0 -18
- package/dist/prompt/function-defs/explanation.js.map +0 -1
- package/dist/prompt/function-defs/explore-external-directories.d.ts +0 -16
- package/dist/prompt/function-defs/explore-external-directories.js +0 -48
- package/dist/prompt/function-defs/explore-external-directories.js.map +0 -1
- package/dist/prompt/function-defs/extract-file-fragments.d.ts +0 -27
- package/dist/prompt/function-defs/extract-file-fragments.js +0 -36
- package/dist/prompt/function-defs/extract-file-fragments.js.map +0 -1
- package/dist/prompt/function-defs/genaicode-help.d.ts +0 -6
- package/dist/prompt/function-defs/genaicode-help.js +0 -23
- package/dist/prompt/function-defs/genaicode-help.js.map +0 -1
- package/dist/prompt/function-defs/generate-image.d.ts +0 -5
- package/dist/prompt/function-defs/generate-image.js +0 -42
- package/dist/prompt/function-defs/generate-image.js.map +0 -1
- package/dist/prompt/function-defs/get-image-assets.d.ts +0 -5
- package/dist/prompt/function-defs/get-image-assets.js +0 -21
- package/dist/prompt/function-defs/get-image-assets.js.map +0 -1
- package/dist/prompt/function-defs/get-source-code.d.ts +0 -5
- package/dist/prompt/function-defs/get-source-code.js +0 -49
- package/dist/prompt/function-defs/get-source-code.js.map +0 -1
- package/dist/prompt/function-defs/iterate.d.ts +0 -20
- package/dist/prompt/function-defs/iterate.js +0 -373
- package/dist/prompt/function-defs/iterate.js.map +0 -1
- package/dist/prompt/function-defs/optimize-context.d.ts +0 -5
- package/dist/prompt/function-defs/optimize-context.js +0 -74
- package/dist/prompt/function-defs/optimize-context.js.map +0 -1
- package/dist/prompt/function-defs/perform-analysis.d.ts +0 -8
- package/dist/prompt/function-defs/perform-analysis.js +0 -28
- package/dist/prompt/function-defs/perform-analysis.js.map +0 -1
- package/dist/prompt/function-defs/pull-console-logs.d.ts +0 -2
- package/dist/prompt/function-defs/pull-console-logs.js +0 -29
- package/dist/prompt/function-defs/pull-console-logs.js.map +0 -1
- package/dist/prompt/function-defs/read-external-files.d.ts +0 -9
- package/dist/prompt/function-defs/read-external-files.js +0 -30
- package/dist/prompt/function-defs/read-external-files.js.map +0 -1
- package/dist/prompt/function-defs/read-history.d.ts +0 -2
- package/dist/prompt/function-defs/read-history.js +0 -14
- package/dist/prompt/function-defs/read-history.js.map +0 -1
- package/dist/prompt/function-defs/reasoning-inference.d.ts +0 -3
- package/dist/prompt/function-defs/reasoning-inference.js +0 -39
- package/dist/prompt/function-defs/reasoning-inference.js.map +0 -1
- package/dist/prompt/function-defs/run-bash-command.d.ts +0 -2
- package/dist/prompt/function-defs/run-bash-command.js +0 -29
- package/dist/prompt/function-defs/run-bash-command.js.map +0 -1
- package/dist/prompt/function-defs/run-container-task.d.ts +0 -11
- package/dist/prompt/function-defs/run-container-task.js +0 -41
- package/dist/prompt/function-defs/run-container-task.js.map +0 -1
- package/dist/prompt/function-defs/run-project-command.d.ts +0 -2
- package/dist/prompt/function-defs/run-project-command.js +0 -40
- package/dist/prompt/function-defs/run-project-command.js.map +0 -1
- package/dist/prompt/function-defs/set-summaries.d.ts +0 -5
- package/dist/prompt/function-defs/set-summaries.js +0 -59
- package/dist/prompt/function-defs/set-summaries.js.map +0 -1
- package/dist/prompt/function-defs/structured-question.d.ts +0 -2
- package/dist/prompt/function-defs/structured-question.js +0 -64
- package/dist/prompt/function-defs/structured-question.js.map +0 -1
- package/dist/prompt/function-defs/update-history.d.ts +0 -5
- package/dist/prompt/function-defs/update-history.js +0 -22
- package/dist/prompt/function-defs/update-history.js.map +0 -1
- package/dist/prompt/function-defs/web-search.d.ts +0 -9
- package/dist/prompt/function-defs/web-search.js +0 -16
- package/dist/prompt/function-defs/web-search.js.map +0 -1
- package/dist/prompt/limits.d.ts +0 -3
- package/dist/prompt/limits.js +0 -21
- package/dist/prompt/limits.js.map +0 -1
- package/dist/prompt/prompt-codegen.d.ts +0 -9
- package/dist/prompt/prompt-codegen.js +0 -45
- package/dist/prompt/prompt-codegen.js.map +0 -1
- package/dist/prompt/prompt-service.d.ts +0 -8
- package/dist/prompt/prompt-service.js +0 -147
- package/dist/prompt/prompt-service.js.map +0 -1
- package/dist/prompt/prompt-service.test-utils.d.ts +0 -66
- package/dist/prompt/prompt-service.test-utils.js +0 -171
- package/dist/prompt/prompt-service.test-utils.js.map +0 -1
- package/dist/prompt/source-code-optimize.d.ts +0 -2
- package/dist/prompt/source-code-optimize.js +0 -27
- package/dist/prompt/source-code-optimize.js.map +0 -1
- package/dist/prompt/static-prompts.d.ts +0 -17
- package/dist/prompt/static-prompts.js +0 -23
- package/dist/prompt/static-prompts.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/ask-question-handler.d.ts +0 -3
- package/dist/prompt/steps/step-ask-question/ask-question-handler.js +0 -13
- package/dist/prompt/steps/step-ask-question/ask-question-handler.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/command-execution-loop.d.ts +0 -7
- package/dist/prompt/steps/step-ask-question/handlers/container-task/command-execution-loop.js +0 -301
- package/dist/prompt/steps/step-ask-question/handlers/container-task/command-execution-loop.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/check-context.d.ts +0 -12
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/check-context.js +0 -41
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/check-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/complete-task.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/complete-task.js +0 -49
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/complete-task.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-from-container.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-from-container.js +0 -190
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-from-container.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-to-container.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-to-container.js +0 -139
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/copy-to-container.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/edit-file.d.ts +0 -10
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/edit-file.js +0 -93
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/edit-file.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/fail-task.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/fail-task.js +0 -72
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/fail-task.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/gain-knowledge.d.ts +0 -10
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/gain-knowledge.js +0 -125
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/gain-knowledge.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/interrupt-controller.d.ts +0 -19
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/interrupt-controller.js +0 -33
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/interrupt-controller.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/query-knowledge.d.ts +0 -8
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/query-knowledge.js +0 -85
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/query-knowledge.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/request-secret.d.ts +0 -6
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/request-secret.js +0 -122
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/request-secret.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/run-command.d.ts +0 -7
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/run-command.js +0 -146
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/run-command.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/send-message.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/send-message.js +0 -56
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/send-message.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/set-execution-plan.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/set-execution-plan.js +0 -56
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/set-execution-plan.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/update-execution-plan.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/update-execution-plan.js +0 -39
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/update-execution-plan.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/view-file.d.ts +0 -10
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/view-file.js +0 -95
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/view-file.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/web-search.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/web-search.js +0 -96
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/web-search.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/wrap-context.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/wrap-context.js +0 -123
- package/dist/prompt/steps/step-ask-question/handlers/container-task/commands/wrap-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-command-handlers.d.ts +0 -34
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-command-handlers.js +0 -332
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-command-handlers.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-registry.d.ts +0 -11
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-registry.js +0 -50
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-registry.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-types.d.ts +0 -28
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-types.js +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-commands-types.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-orchestrator.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-orchestrator.js +0 -202
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-orchestrator.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-types.d.ts +0 -52
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-types.js +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/container-task/container-task-types.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-check.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-check.js +0 -15
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-check.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-utils.d.ts +0 -50
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-utils.js +0 -358
- package/dist/prompt/steps/step-ask-question/handlers/container-task/utils/docker-utils.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.d.ts +0 -47
- package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.js +0 -114
- package/dist/prompt/steps/step-ask-question/handlers/file-request-utils.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.js +0 -177
- package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-compound-action.d.ts +0 -20
- package/dist/prompt/steps/step-ask-question/handlers/handle-compound-action.js +0 -305
- package/dist/prompt/steps/step-ask-question/handlers/handle-compound-action.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.js +0 -40
- package/dist/prompt/steps/step-ask-question/handlers/handle-confirm-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.js +0 -35
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-compression.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.js +0 -34
- package/dist/prompt/steps/step-ask-question/handlers/handle-context-optimization.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.d.ts +0 -11
- package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.js +0 -503
- package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js +0 -159
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js +0 -30
- package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.js +0 -280
- package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.d.ts +0 -8
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js +0 -105
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js +0 -110
- package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-lint.d.ts +0 -6
- package/dist/prompt/steps/step-ask-question/handlers/handle-lint.js +0 -60
- package/dist/prompt/steps/step-ask-question/handlers/handle-lint.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.d.ts +0 -6
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js +0 -110
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-project-command.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-project-command.js +0 -282
- package/dist/prompt/steps/step-ask-question/handlers/handle-project-command.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.d.ts +0 -9
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js +0 -94
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-console-logs.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-console-logs.js +0 -174
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-console-logs.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.d.ts +0 -9
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js +0 -104
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.js +0 -149
- package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.d.ts +0 -7
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js +0 -119
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.js +0 -100
- package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.d.ts +0 -8
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.js +0 -145
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.d.ts +0 -8
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.js +0 -197
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.d.ts +0 -3
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.js +0 -251
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.js +0 -83
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-bash-command.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-bash-command.js +0 -185
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-bash-command.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-container-task.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-container-task.js +0 -7
- package/dist/prompt/steps/step-ask-question/handlers/handle-run-container-task.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js +0 -96
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js +0 -21
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-structured-question.d.ts +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-structured-question.js +0 -72
- package/dist/prompt/steps/step-ask-question/handlers/handle-structured-question.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js +0 -161
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-web-search.d.ts +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-web-search.js +0 -85
- package/dist/prompt/steps/step-ask-question/handlers/handle-web-search.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.d.ts +0 -3
- package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js +0 -5
- 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-types.d.ts +0 -257
- package/dist/prompt/steps/step-ask-question/step-ask-question-types.js +0 -2
- package/dist/prompt/steps/step-ask-question/step-ask-question-types.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question.d.ts +0 -37
- package/dist/prompt/steps/step-ask-question/step-ask-question.js +0 -132
- package/dist/prompt/steps/step-ask-question/step-ask-question.js.map +0 -1
- package/dist/prompt/steps/step-auto-context-refresh.d.ts +0 -6
- package/dist/prompt/steps/step-auto-context-refresh.js +0 -98
- package/dist/prompt/steps/step-auto-context-refresh.js.map +0 -1
- package/dist/prompt/steps/step-codegen-planning.d.ts +0 -11
- package/dist/prompt/steps/step-codegen-planning.js +0 -147
- package/dist/prompt/steps/step-codegen-planning.js.map +0 -1
- package/dist/prompt/steps/step-context-compression.d.ts +0 -8
- package/dist/prompt/steps/step-context-compression.js +0 -231
- package/dist/prompt/steps/step-context-compression.js.map +0 -1
- package/dist/prompt/steps/step-context-optimization.d.ts +0 -8
- package/dist/prompt/steps/step-context-optimization.js +0 -308
- package/dist/prompt/steps/step-context-optimization.js.map +0 -1
- package/dist/prompt/steps/step-ensure-context.d.ts +0 -8
- package/dist/prompt/steps/step-ensure-context.js +0 -114
- package/dist/prompt/steps/step-ensure-context.js.map +0 -1
- package/dist/prompt/steps/step-generate-codegen-summary-prompt.d.ts +0 -2
- package/dist/prompt/steps/step-generate-codegen-summary-prompt.js +0 -133
- package/dist/prompt/steps/step-generate-codegen-summary-prompt.js.map +0 -1
- package/dist/prompt/steps/step-generate-codegen-summary.d.ts +0 -14
- package/dist/prompt/steps/step-generate-codegen-summary.js +0 -68
- package/dist/prompt/steps/step-generate-codegen-summary.js.map +0 -1
- package/dist/prompt/steps/step-generate-image.d.ts +0 -10
- package/dist/prompt/steps/step-generate-image.js +0 -32
- package/dist/prompt/steps/step-generate-image.js.map +0 -1
- package/dist/prompt/steps/step-generate-summary.d.ts +0 -10
- package/dist/prompt/steps/step-generate-summary.js +0 -63
- package/dist/prompt/steps/step-generate-summary.js.map +0 -1
- package/dist/prompt/steps/step-history-update.d.ts +0 -6
- package/dist/prompt/steps/step-history-update.js +0 -69
- package/dist/prompt/steps/step-history-update.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/command-execution-loop.d.ts +0 -7
- package/dist/prompt/steps/step-iterate/handlers/container-task/command-execution-loop.js +0 -301
- package/dist/prompt/steps/step-iterate/handlers/container-task/command-execution-loop.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/complete-task.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/complete-task.js +0 -49
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/complete-task.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-from-container.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-from-container.js +0 -190
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-from-container.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-to-container.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-to-container.js +0 -139
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/copy-to-container.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/edit-file.d.ts +0 -10
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/edit-file.js +0 -93
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/edit-file.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/fail-task.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/fail-task.js +0 -72
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/fail-task.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/gain-knowledge.d.ts +0 -10
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/gain-knowledge.js +0 -125
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/gain-knowledge.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/interrupt-controller.d.ts +0 -19
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/interrupt-controller.js +0 -33
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/interrupt-controller.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/query-knowledge.d.ts +0 -8
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/query-knowledge.js +0 -85
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/query-knowledge.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/request-secret.d.ts +0 -6
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/request-secret.js +0 -122
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/request-secret.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/run-command.d.ts +0 -7
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/run-command.js +0 -146
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/run-command.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/send-message.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/send-message.js +0 -56
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/send-message.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/set-execution-plan.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/set-execution-plan.js +0 -56
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/set-execution-plan.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/update-execution-plan.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/update-execution-plan.js +0 -39
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/update-execution-plan.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/view-file.d.ts +0 -10
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/view-file.js +0 -95
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/view-file.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/web-search.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/web-search.js +0 -96
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/web-search.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/wrap-context.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/wrap-context.js +0 -123
- package/dist/prompt/steps/step-iterate/handlers/container-task/commands/wrap-context.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-registry.d.ts +0 -11
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-registry.js +0 -50
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-registry.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-types.d.ts +0 -28
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-types.js +0 -2
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-commands-types.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-task-orchestrator.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-task-orchestrator.js +0 -202
- package/dist/prompt/steps/step-iterate/handlers/container-task/container-task-orchestrator.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-check.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-check.js +0 -15
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-check.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-utils.d.ts +0 -50
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-utils.js +0 -358
- package/dist/prompt/steps/step-iterate/handlers/container-task/utils/docker-utils.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/file-request-utils.d.ts +0 -47
- package/dist/prompt/steps/step-iterate/handlers/file-request-utils.js +0 -114
- package/dist/prompt/steps/step-iterate/handlers/file-request-utils.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-code-execution.d.ts +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-code-execution.js +0 -133
- package/dist/prompt/steps/step-iterate/handlers/handle-code-execution.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-code-generation.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/handlers/handle-code-generation.js +0 -177
- package/dist/prompt/steps/step-iterate/handlers/handle-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-compound-action.d.ts +0 -20
- package/dist/prompt/steps/step-iterate/handlers/handle-compound-action.js +0 -305
- package/dist/prompt/steps/step-iterate/handlers/handle-compound-action.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-confirm-code-generation.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-confirm-code-generation.js +0 -40
- package/dist/prompt/steps/step-iterate/handlers/handle-confirm-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-context-compression.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-context-compression.js +0 -35
- package/dist/prompt/steps/step-iterate/handlers/handle-context-compression.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-context-optimization.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-context-optimization.js +0 -34
- package/dist/prompt/steps/step-iterate/handlers/handle-context-optimization.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-conversation-graph.d.ts +0 -11
- package/dist/prompt/steps/step-iterate/handlers/handle-conversation-graph.js +0 -503
- package/dist/prompt/steps/step-iterate/handlers/handle-conversation-graph.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-create-file.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-create-file.js +0 -159
- package/dist/prompt/steps/step-iterate/handlers/handle-create-file.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-end-conversation.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-end-conversation.js +0 -30
- package/dist/prompt/steps/step-iterate/handlers/handle-end-conversation.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-explore-external-directories.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-explore-external-directories.js +0 -280
- package/dist/prompt/steps/step-iterate/handlers/handle-explore-external-directories.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-genaicode-help.d.ts +0 -8
- package/dist/prompt/steps/step-iterate/handlers/handle-genaicode-help.js +0 -105
- package/dist/prompt/steps/step-iterate/handlers/handle-genaicode-help.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-generate-image.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-generate-image.js +0 -110
- package/dist/prompt/steps/step-iterate/handlers/handle-generate-image.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-perform-analysis.d.ts +0 -6
- package/dist/prompt/steps/step-iterate/handlers/handle-perform-analysis.js +0 -110
- package/dist/prompt/steps/step-iterate/handlers/handle-perform-analysis.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-project-command.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-project-command.js +0 -280
- package/dist/prompt/steps/step-iterate/handlers/handle-project-command.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-app-context.d.ts +0 -9
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-app-context.js +0 -94
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-app-context.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-console-logs.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-console-logs.js +0 -174
- package/dist/prompt/steps/step-iterate/handlers/handle-pull-console-logs.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-push-app-context.d.ts +0 -9
- package/dist/prompt/steps/step-iterate/handlers/handle-push-app-context.js +0 -104
- package/dist/prompt/steps/step-iterate/handlers/handle-push-app-context.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-read-external-files.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-read-external-files.js +0 -149
- package/dist/prompt/steps/step-iterate/handlers/handle-read-external-files.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-reasoning-inference.d.ts +0 -7
- package/dist/prompt/steps/step-iterate/handlers/handle-reasoning-inference.js +0 -119
- package/dist/prompt/steps/step-iterate/handlers/handle-reasoning-inference.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-remove-files-from-context.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-remove-files-from-context.js +0 -100
- package/dist/prompt/steps/step-iterate/handlers/handle-remove-files-from-context.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-content.d.ts +0 -8
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-content.js +0 -146
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-content.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-fragments.d.ts +0 -8
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-fragments.js +0 -197
- package/dist/prompt/steps/step-iterate/handlers/handle-request-files-fragments.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-request-git-context.d.ts +0 -3
- package/dist/prompt/steps/step-iterate/handlers/handle-request-git-context.js +0 -251
- package/dist/prompt/steps/step-iterate/handlers/handle-request-git-context.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-request-permissions.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-request-permissions.js +0 -83
- package/dist/prompt/steps/step-iterate/handlers/handle-request-permissions.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-run-bash-command.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-run-bash-command.js +0 -185
- package/dist/prompt/steps/step-iterate/handlers/handle-run-bash-command.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-run-container-task.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-run-container-task.js +0 -7
- package/dist/prompt/steps/step-iterate/handlers/handle-run-container-task.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-search-code.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-search-code.js +0 -96
- package/dist/prompt/steps/step-iterate/handlers/handle-search-code.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-send-message.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-send-message.js +0 -21
- package/dist/prompt/steps/step-iterate/handlers/handle-send-message.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-structured-question.d.ts +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-structured-question.js +0 -72
- package/dist/prompt/steps/step-iterate/handlers/handle-structured-question.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-update-file.d.ts +0 -2
- package/dist/prompt/steps/step-iterate/handlers/handle-update-file.js +0 -161
- package/dist/prompt/steps/step-iterate/handlers/handle-update-file.js.map +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-web-search.d.ts +0 -1
- package/dist/prompt/steps/step-iterate/handlers/handle-web-search.js +0 -85
- package/dist/prompt/steps/step-iterate/handlers/handle-web-search.js.map +0 -1
- package/dist/prompt/steps/step-iterate/iterate-handler.d.ts +0 -4
- package/dist/prompt/steps/step-iterate/iterate-handler.js +0 -14
- package/dist/prompt/steps/step-iterate/iterate-handler.js.map +0 -1
- package/dist/prompt/steps/step-iterate/step-iterate-handlers.d.ts +0 -3
- package/dist/prompt/steps/step-iterate/step-iterate-handlers.js +0 -5
- package/dist/prompt/steps/step-iterate/step-iterate-handlers.js.map +0 -1
- package/dist/prompt/steps/step-iterate/step-iterate-types.d.ts +0 -255
- package/dist/prompt/steps/step-iterate/step-iterate-types.js +0 -2
- package/dist/prompt/steps/step-iterate/step-iterate-types.js.map +0 -1
- package/dist/prompt/steps/step-iterate/step-iterate.d.ts +0 -37
- package/dist/prompt/steps/step-iterate/step-iterate.js +0 -132
- package/dist/prompt/steps/step-iterate/step-iterate.js.map +0 -1
- package/dist/prompt/steps/step-process-file-updates.d.ts +0 -12
- package/dist/prompt/steps/step-process-file-updates.js +0 -148
- package/dist/prompt/steps/step-process-file-updates.js.map +0 -1
- package/dist/prompt/steps/step-summarization.d.ts +0 -10
- package/dist/prompt/steps/step-summarization.js +0 -167
- package/dist/prompt/steps/step-summarization.js.map +0 -1
- package/dist/prompt/steps/step-validate-recover.d.ts +0 -2
- package/dist/prompt/steps/step-validate-recover.js +0 -71
- package/dist/prompt/steps/step-validate-recover.js.map +0 -1
- package/dist/prompt/steps/step-verify-patch.d.ts +0 -10
- package/dist/prompt/steps/step-verify-patch.js +0 -52
- package/dist/prompt/steps/step-verify-patch.js.map +0 -1
- package/dist/prompt/steps/steps-types.d.ts +0 -4
- package/dist/prompt/steps/steps-types.js +0 -6
- package/dist/prompt/steps/steps-types.js.map +0 -1
- package/dist/prompt/steps/steps-utils.d.ts +0 -7
- package/dist/prompt/steps/steps-utils.js +0 -11
- package/dist/prompt/steps/steps-utils.js.map +0 -1
- package/dist/prompt/systemprompt.d.ts +0 -4
- package/dist/prompt/systemprompt.js +0 -113
- package/dist/prompt/systemprompt.js.map +0 -1
- package/dist/prompt/token-estimator.d.ts +0 -8
- package/dist/prompt/token-estimator.js +0 -31
- package/dist/prompt/token-estimator.js.map +0 -1
- package/dist/prompt-debug/current-prompt-plugin.d.ts +0 -3
- package/dist/prompt-debug/current-prompt-plugin.js +0 -10
- package/dist/prompt-debug/current-prompt-plugin.js.map +0 -1
- package/dist/utils/docker-utils.d.ts +0 -37
- package/dist/utils/docker-utils.js +0 -258
- package/dist/utils/docker-utils.js.map +0 -1
- package/dist/vite-genaicode/code-transformer.d.ts +0 -5
- package/dist/vite-genaicode/code-transformer.js +0 -83
- package/dist/vite-genaicode/code-transformer.js.map +0 -1
- package/dist/vite-genaicode/console-interceptor.d.ts +0 -53
- package/dist/vite-genaicode/console-interceptor.js +0 -117
- package/dist/vite-genaicode/console-interceptor.js.map +0 -1
- package/dist/vite-genaicode/constants.d.ts +0 -3
- package/dist/vite-genaicode/constants.js +0 -4
- package/dist/vite-genaicode/constants.js.map +0 -1
- package/dist/vite-genaicode/dynamic-function-generator.d.ts +0 -2
- package/dist/vite-genaicode/dynamic-function-generator.js +0 -47
- package/dist/vite-genaicode/dynamic-function-generator.js.map +0 -1
- package/dist/vite-genaicode/html-injector.d.ts +0 -6
- package/dist/vite-genaicode/html-injector.js +0 -14
- package/dist/vite-genaicode/html-injector.js.map +0 -1
- package/dist/vite-genaicode/server-manager.d.ts +0 -26
- package/dist/vite-genaicode/server-manager.js +0 -91
- package/dist/vite-genaicode/server-manager.js.map +0 -1
- package/dist/vite-genaicode/vite-genaicode-context.d.ts +0 -31
- package/dist/vite-genaicode/vite-genaicode-context.js +0 -120
- package/dist/vite-genaicode/vite-genaicode-context.js.map +0 -1
- package/dist/vite-genaicode/vite-genaicode-frontend.d.ts +0 -1
- package/dist/vite-genaicode/vite-genaicode-frontend.js +0 -329
- package/dist/vite-genaicode/vite-genaicode-frontend.js.map +0 -1
- package/dist/vite-genaicode/vite-genaicode-plugin.d.ts +0 -21
- package/dist/vite-genaicode/vite-genaicode-plugin.js +0 -87
- package/dist/vite-genaicode/vite-genaicode-plugin.js.map +0 -1
- package/dist/vite-genaicode/vite-genaicode-types.d.ts +0 -28
- package/dist/vite-genaicode/vite-genaicode-types.js +0 -11
- package/dist/vite-genaicode/vite-genaicode-types.js.map +0 -1
- package/media/logo-dark.png +0 -0
- package/media/logo.png +0 -0
|
@@ -1,308 +0,0 @@
|
|
|
1
|
-
import { ModelType } from '../../ai-service/common-types.js';
|
|
2
|
-
import { putSystemMessage } from '../../main/common/content-bus.js';
|
|
3
|
-
import { getSourceCode } from '../../files/read-files.js';
|
|
4
|
-
import { getFunctionDefs } from '../function-calling.js';
|
|
5
|
-
import { StepResult } from './steps-types.js';
|
|
6
|
-
import { estimateTokenCount } from '../token-estimator.js';
|
|
7
|
-
import { getSourceCodeResponse } from './steps-utils.js';
|
|
8
|
-
import { importantContext } from '../../main/config.js';
|
|
9
|
-
import { getSummary, popularDependencies } from '../../files/summary-cache.js';
|
|
10
|
-
import { generateFileId } from '../../files/file-id-utils.js';
|
|
11
|
-
export const OPTIMIZATION_PROMPT = `You need to analyze the provided source code files and determine their relevance to the user's prompt. You will then call the \`optimizeContext\` function with the results.
|
|
12
|
-
|
|
13
|
-
**Crucially, only include files in the \`optimizedContext\` array of the \`optimizeContext\` function call if their calculated relevance score is 0.5 or greater.**
|
|
14
|
-
|
|
15
|
-
Here are the detailed steps:
|
|
16
|
-
|
|
17
|
-
1. **Relevance Assessment (Scores from 0.0 to 1.0):**
|
|
18
|
-
- Evaluate the relevance of each file to the user's prompt based on the following scale:
|
|
19
|
-
- 0.0 – 0.3: Not Relevant
|
|
20
|
-
- 0.3 – 0.7: Somewhat Relevant
|
|
21
|
-
- 0.7 – 0.9: Moderately Relevant
|
|
22
|
-
- 0.9 – 1.0: Highly Relevant
|
|
23
|
-
- Consider:
|
|
24
|
-
- Directly implements the core logic required to address the prompt's features.
|
|
25
|
-
- Role in dependency chains of relevant files.
|
|
26
|
-
- Keyword matches with the prompt.
|
|
27
|
-
- Importance as a dependency.
|
|
28
|
-
|
|
29
|
-
2. **Dependency Consideration:**
|
|
30
|
-
- Understand how files depend on each other.
|
|
31
|
-
- Prioritize files that are directly relevant or are dependencies of highly relevant files.
|
|
32
|
-
- When evaluating a file, consider its position within dependency chains, but **do not include a file in the \`optimizedContext\` if its individual relevance score is below 0.5, even if it's part of a dependency chain of a relevant file.**
|
|
33
|
-
|
|
34
|
-
3. **Token Awareness:**
|
|
35
|
-
- Be mindful of token usage, but **relevance (specifically a score of 0.5 or higher) is the primary criterion for inclusion in \`optimizedContext\`.**
|
|
36
|
-
|
|
37
|
-
4. **Function Call - \`optimizeContext\`:**
|
|
38
|
-
- Call the \`optimizeContext\` function with the following arguments:
|
|
39
|
-
- \`"userPrompt"\`: The original user prompt.
|
|
40
|
-
- \`"reasoning"\`: A detailed, step-by-step explanation of the thought process used to determine the optimized context.
|
|
41
|
-
- \`"optimizedContext"\`: **An array containing ONLY files with a relevance score of 0.5 or higher.** Each object in the array should have:
|
|
42
|
-
- \`"reasoning"\`: Specific reasoning for why *this particular file* is relevant and has a score of 0.5 or higher.
|
|
43
|
-
- \`"filePath"\`: Absolute file path.
|
|
44
|
-
- \`"relevance"\`: The calculated relevance score (0.5 to 1.0).
|
|
45
|
-
|
|
46
|
-
**Important Guidelines:**
|
|
47
|
-
|
|
48
|
-
- **Strict Filtering:** **Only files with a relevance score of 0.5 or more should be included in the \`optimizedContext\` array.**
|
|
49
|
-
- **No Guessing:** Only use files provided in the \`getSourceCode\` response.
|
|
50
|
-
- **Evaluate Individually and in Chains:** Consider both individual relevance and dependencies, but the 0.5 threshold is paramount for inclusion.
|
|
51
|
-
- **Proper JSON:** Ensure the \`optimizeContext\` call is valid JSON.
|
|
52
|
-
- **Full Paths:** Use absolute file paths.
|
|
53
|
-
- **Focus on 0.5+:** The \`optimizedContext\` array should be exclusively populated with files meeting the relevance criteria.
|
|
54
|
-
- **Handling Codebase-Wide Operations:**
|
|
55
|
-
- If the user prompt indicates a codebase-wide operation, choose one of the following \`optimizeContext\` strategies:
|
|
56
|
-
- **Empty Context:** For operations applying to all files simultaneously, call \`optimizeContext\` with an empty \`optimizedContext\` and explain in the \`reasoning\`.
|
|
57
|
-
- **Main Entry Points:** For operations starting with key files, identify main entry points and call \`optimizeContext\` with these files (relevance=1.0), explaining in the \`reasoning\`.
|
|
58
|
-
- **Data Flow Consideration**: Consider the entire lifecycle of the data involved in the user's request, from the user interface to the database and back. Include files involved in handling, storing, and transmitting this data.
|
|
59
|
-
- **Intent and Contribution Analysis:** For each file, evaluate its purpose and how it contributes to fulfilling the user's prompt. Consider the flow of logic and data. Which files are essential for the requested outcome, not just tangentially related?
|
|
60
|
-
- **Functional Web Analysis:** Think of the codebase as a web of interconnected functionalities. Identify the key functional areas involved in the user's prompt and trace the connections between files within these areas.
|
|
61
|
-
- **Core Responsibility Assessment:** Identify the files that are primarily responsible for managing the lifecycle, data, or logic of the entities involved in the \`userPrompt\`. These files are likely to be highly relevant.
|
|
62
|
-
- **Data Flow Mapping:** Trace the flow of data related to the user's request. Identify the files involved in creating, storing, transforming, and retrieving this data.
|
|
63
|
-
|
|
64
|
-
Now, analyze the source code and call the \`optimizeContext\` function accordingly.`;
|
|
65
|
-
export const OPTIMIZATION_TRIGGER_PROMPT = 'Thank you for describing the task, I have noticed you have provided a very large context for your question. The amount of source code is very big in particular. Can we do something about it?';
|
|
66
|
-
export const CONTEXT_OPTIMIZATION_TEMPERATURE = 0.2;
|
|
67
|
-
const MAX_TOTAL_TOKENS = 10000;
|
|
68
|
-
export async function executeStepContextOptimization(generateContentFn, prompt, options) {
|
|
69
|
-
const fullSourceCode = getSourceCode({ forceAll: true }, options);
|
|
70
|
-
const tokensBefore = estimateTokenCount(JSON.stringify(fullSourceCode));
|
|
71
|
-
const sourceCodeResponse = getSourceCodeResponse(prompt);
|
|
72
|
-
if (!sourceCodeResponse || !sourceCodeResponse.content) {
|
|
73
|
-
putSystemMessage('Could not find source code response, something is wrong, but lets continue anyway.');
|
|
74
|
-
return StepResult.CONTINUE;
|
|
75
|
-
}
|
|
76
|
-
if (tokensBefore < MAX_TOTAL_TOKENS) {
|
|
77
|
-
putSystemMessage('Context optimization is not needed, because the code base is small.');
|
|
78
|
-
sourceCodeResponse.content = JSON.stringify(fullSourceCode);
|
|
79
|
-
return StepResult.CONTINUE;
|
|
80
|
-
}
|
|
81
|
-
const sourceCode = JSON.parse(sourceCodeResponse.content);
|
|
82
|
-
try {
|
|
83
|
-
putSystemMessage('Context optimization is starting for large codebase');
|
|
84
|
-
const optimizationPrompt = [
|
|
85
|
-
...prompt,
|
|
86
|
-
{
|
|
87
|
-
type: 'assistant',
|
|
88
|
-
text: OPTIMIZATION_TRIGGER_PROMPT,
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
type: 'user',
|
|
92
|
-
text: OPTIMIZATION_PROMPT,
|
|
93
|
-
},
|
|
94
|
-
];
|
|
95
|
-
const request = [
|
|
96
|
-
optimizationPrompt,
|
|
97
|
-
{
|
|
98
|
-
functionDefs: getFunctionDefs(),
|
|
99
|
-
requiredFunctionName: 'optimizeContext',
|
|
100
|
-
temperature: CONTEXT_OPTIMIZATION_TEMPERATURE,
|
|
101
|
-
modelType: ModelType.LITE,
|
|
102
|
-
expectedResponseType: { text: false, functionCall: true, media: false },
|
|
103
|
-
},
|
|
104
|
-
options,
|
|
105
|
-
];
|
|
106
|
-
const result = (await generateContentFn(...request))
|
|
107
|
-
.filter((item) => item.type === 'functionCall')
|
|
108
|
-
.map((item) => item.functionCall);
|
|
109
|
-
const [optimizedContext, irrelevantFiles] = parseOptimizationResult(fullSourceCode, result);
|
|
110
|
-
if (!optimizedContext) {
|
|
111
|
-
putSystemMessage(`Warning: Context optimization failed. We need to abort.`);
|
|
112
|
-
return StepResult.BREAK;
|
|
113
|
-
}
|
|
114
|
-
if (optimizedContext.length === 0) {
|
|
115
|
-
putSystemMessage('Context optimization did not generate changes to current context.');
|
|
116
|
-
return StepResult.CONTINUE;
|
|
117
|
-
}
|
|
118
|
-
const [optimizedSourceCode, contentTokenCount, summaryTokenCount] = optimizeSourceCode(sourceCode, fullSourceCode, Array.from(optimizedContext), irrelevantFiles);
|
|
119
|
-
const tokensAfter = estimateTokenCount(JSON.stringify(optimizedSourceCode));
|
|
120
|
-
const percentageReduced = ((tokensBefore - tokensAfter) / tokensBefore) * 100;
|
|
121
|
-
// Clear previous getSourceCode responses
|
|
122
|
-
clearPreviousSourceCodeResponses(prompt, irrelevantFiles);
|
|
123
|
-
prompt.push({
|
|
124
|
-
type: 'assistant',
|
|
125
|
-
functionCalls: [
|
|
126
|
-
{
|
|
127
|
-
name: 'requestFilesContent',
|
|
128
|
-
args: {
|
|
129
|
-
filePaths: Object.keys(optimizedSourceCode),
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
{
|
|
133
|
-
name: 'getSourceCode',
|
|
134
|
-
args: {
|
|
135
|
-
filePaths: Object.keys(optimizedSourceCode),
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
],
|
|
139
|
-
}, {
|
|
140
|
-
type: 'user',
|
|
141
|
-
functionResponses: [
|
|
142
|
-
{
|
|
143
|
-
name: 'requestFilesContent',
|
|
144
|
-
content: JSON.stringify({ filePaths: Object.keys(optimizedSourceCode) }),
|
|
145
|
-
},
|
|
146
|
-
{
|
|
147
|
-
name: 'getSourceCode',
|
|
148
|
-
content: JSON.stringify(optimizedSourceCode),
|
|
149
|
-
},
|
|
150
|
-
],
|
|
151
|
-
cache: true,
|
|
152
|
-
});
|
|
153
|
-
putSystemMessage('Context optimization completed successfully.', {
|
|
154
|
-
tokensBefore,
|
|
155
|
-
tokensAfter,
|
|
156
|
-
contentTokenCount,
|
|
157
|
-
summaryTokenCount,
|
|
158
|
-
percentageReduced: percentageReduced.toFixed(2) + '%',
|
|
159
|
-
optimizedContext,
|
|
160
|
-
});
|
|
161
|
-
return StepResult.CONTINUE;
|
|
162
|
-
}
|
|
163
|
-
catch (error) {
|
|
164
|
-
putSystemMessage('Error: Context optimization failed. This is unexpected.');
|
|
165
|
-
return StepResult.BREAK;
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
function parseOptimizationResult(fullSourceCode, calls) {
|
|
169
|
-
const optimizeCall = calls.find((call) => call.name === 'optimizeContext');
|
|
170
|
-
if (!optimizeCall || !optimizeCall.args || !optimizeCall.args.optimizedContext) {
|
|
171
|
-
return [[], new Set()];
|
|
172
|
-
}
|
|
173
|
-
let totalTokens = 0;
|
|
174
|
-
const result = [];
|
|
175
|
-
const relevantFiles = new Set();
|
|
176
|
-
const irrelevantFiles = new Set();
|
|
177
|
-
// First pass: collect initially relevant files and track irrelevant ones
|
|
178
|
-
for (const item of optimizeCall.args.optimizedContext) {
|
|
179
|
-
if (item.relevance >= 0.5) {
|
|
180
|
-
relevantFiles.add(item.filePath);
|
|
181
|
-
}
|
|
182
|
-
else {
|
|
183
|
-
irrelevantFiles.add(item.filePath);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
// Add files which are in full source and are not in the optimized context
|
|
187
|
-
for (const filePath in fullSourceCode) {
|
|
188
|
-
if (!relevantFiles.has(filePath) && !irrelevantFiles.has(filePath)) {
|
|
189
|
-
irrelevantFiles.add(filePath);
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
// Second pass: calculate final relevance including dependency weights
|
|
193
|
-
for (const item of optimizeCall.args.optimizedContext.sort((a, b) => a.relevance > b.relevance ? -1 : 1)) {
|
|
194
|
-
const { filePath, relevance } = item;
|
|
195
|
-
if (relevance < 0.5) {
|
|
196
|
-
break;
|
|
197
|
-
}
|
|
198
|
-
if (importantContext.files?.includes(filePath)) {
|
|
199
|
-
// Preserving important files
|
|
200
|
-
continue;
|
|
201
|
-
}
|
|
202
|
-
const content = (fullSourceCode[filePath] && 'content' in fullSourceCode[filePath]
|
|
203
|
-
? fullSourceCode[filePath]?.content
|
|
204
|
-
: undefined) ?? '';
|
|
205
|
-
totalTokens += estimateTokenCount(content);
|
|
206
|
-
result.push([item.filePath, relevance]);
|
|
207
|
-
// Break if we exceed token limit and the file isn't highly relevant
|
|
208
|
-
if (totalTokens > MAX_TOTAL_TOKENS && relevance < 0.7) {
|
|
209
|
-
break;
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
// Add popular dependencies if they are not already included
|
|
213
|
-
const resultFilePaths = new Set(result.map(([filePath]) => filePath));
|
|
214
|
-
for (const popularDep of popularDependencies) {
|
|
215
|
-
if (!resultFilePaths.has(popularDep)) {
|
|
216
|
-
const content = (fullSourceCode[popularDep] && 'content' in fullSourceCode[popularDep]
|
|
217
|
-
? fullSourceCode[popularDep]?.content
|
|
218
|
-
: undefined) ?? '';
|
|
219
|
-
const popularDepTokens = estimateTokenCount(content);
|
|
220
|
-
if (totalTokens + popularDepTokens <= MAX_TOTAL_TOKENS) {
|
|
221
|
-
totalTokens += popularDepTokens;
|
|
222
|
-
result.push([popularDep, 0.8]);
|
|
223
|
-
irrelevantFiles.delete(popularDep); // Ensure it's not marked as irrelevant
|
|
224
|
-
}
|
|
225
|
-
else {
|
|
226
|
-
putSystemMessage(`Skipping popular dependency ${popularDep} due to token limit.`);
|
|
227
|
-
break; // Stop adding if we run out of tokens
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
|
-
return [result, irrelevantFiles];
|
|
232
|
-
}
|
|
233
|
-
function optimizeSourceCode(sourceCode, fullSourceCode, optimizedContext, irrelevantFiles) {
|
|
234
|
-
const optimizedSourceCode = {};
|
|
235
|
-
let contentTokenCount = 0;
|
|
236
|
-
let summaryTokenCount = 0;
|
|
237
|
-
// Create a set of all required files (including dependencies)
|
|
238
|
-
const requiredFiles = new Set();
|
|
239
|
-
for (const [path] of optimizedContext) {
|
|
240
|
-
requiredFiles.add(path);
|
|
241
|
-
}
|
|
242
|
-
for (const [path] of Object.entries(fullSourceCode)) {
|
|
243
|
-
const isRequired = requiredFiles.has(path);
|
|
244
|
-
const isIrrelevant = irrelevantFiles.has(path);
|
|
245
|
-
const summary = getSummary(path);
|
|
246
|
-
const content = (fullSourceCode[path] && 'content' in fullSourceCode[path] ? fullSourceCode[path]?.content : undefined) ?? null;
|
|
247
|
-
const localDeps = fullSourceCode[path] && 'localDeps' in fullSourceCode[path] ? fullSourceCode[path]?.localDeps : undefined;
|
|
248
|
-
const externalDeps = fullSourceCode[path] && 'externalDeps' in fullSourceCode[path] ? fullSourceCode[path]?.externalDeps : undefined;
|
|
249
|
-
if (isRequired &&
|
|
250
|
-
content &&
|
|
251
|
-
!(sourceCode[path] && 'content' in sourceCode[path] && sourceCode[path].content !== null)) {
|
|
252
|
-
contentTokenCount += estimateTokenCount(content);
|
|
253
|
-
optimizedSourceCode[path] = {
|
|
254
|
-
fileId: generateFileId(path),
|
|
255
|
-
content,
|
|
256
|
-
...(localDeps && !isIrrelevant && { localDeps }),
|
|
257
|
-
...(externalDeps && !isIrrelevant && { externalDeps }),
|
|
258
|
-
};
|
|
259
|
-
}
|
|
260
|
-
else if (summary && !isIrrelevant) {
|
|
261
|
-
summaryTokenCount += estimateTokenCount(summary.summary);
|
|
262
|
-
optimizedSourceCode[path] = {
|
|
263
|
-
fileId: generateFileId(path),
|
|
264
|
-
...summary,
|
|
265
|
-
...(localDeps && !isIrrelevant && { localDeps }),
|
|
266
|
-
...(externalDeps && !isIrrelevant && { externalDeps }),
|
|
267
|
-
};
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
return [optimizedSourceCode, contentTokenCount, summaryTokenCount];
|
|
271
|
-
}
|
|
272
|
-
/**
|
|
273
|
-
* Helper function to clear content from previous getSourceCode responses while preserving the conversation structure
|
|
274
|
-
*/
|
|
275
|
-
function clearPreviousSourceCodeResponses(prompt, irrelevantFiles) {
|
|
276
|
-
for (const item of prompt) {
|
|
277
|
-
if (item.type === 'user' && item.functionResponses) {
|
|
278
|
-
for (const response of item.functionResponses) {
|
|
279
|
-
if (response.name === 'getSourceCode' && response.content) {
|
|
280
|
-
// Zero out the contents but keep the structure
|
|
281
|
-
const sourceCode = JSON.parse(response.content);
|
|
282
|
-
for (const path in sourceCode) {
|
|
283
|
-
if (importantContext.files?.includes(path)) {
|
|
284
|
-
continue; // Preserve important files
|
|
285
|
-
}
|
|
286
|
-
if ('content' in sourceCode[path]) {
|
|
287
|
-
sourceCode[path].content = null;
|
|
288
|
-
}
|
|
289
|
-
else {
|
|
290
|
-
// Zero out content for irrelevant files
|
|
291
|
-
const file = sourceCode[path];
|
|
292
|
-
file.content = null;
|
|
293
|
-
}
|
|
294
|
-
if (irrelevantFiles.has(path) && sourceCode[path]) {
|
|
295
|
-
// Remove summary and dependencies for irrelevant files
|
|
296
|
-
if ('summary' in sourceCode[path]) {
|
|
297
|
-
delete sourceCode[path].summary;
|
|
298
|
-
}
|
|
299
|
-
delete sourceCode[path].dependencies;
|
|
300
|
-
}
|
|
301
|
-
}
|
|
302
|
-
response.content = JSON.stringify(sourceCode);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
}
|
|
306
|
-
}
|
|
307
|
-
}
|
|
308
|
-
//# sourceMappingURL=step-context-optimization.js.map
|
|
@@ -1 +0,0 @@
|
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AK,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC;oBAChD,KAAK,MAAM,IAAI,IAAI,UAAU,EAAE,CAAC;wBAC9B,IAAI,gBAAgB,CAAC,KAAK,EAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;4BAC3C,SAAS,CAAC,2BAA2B;wBACvC,CAAC;wBACD,IAAI,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;4BAClC,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,GAAG,IAAI,CAAC;wBAClC,CAAC;6BAAM,CAAC;4BACN,wCAAwC;4BACxC,MAAM,IAAI,GAAG,UAAU,CAAC,IAAI,CAAgB,CAAC;4BAC7C,IAAI,CAAC,OAAO,GAAG,IAAI,CAAC;wBACtB,CAAC;wBAED,IAAI,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;4BAClD,uDAAuD;4BACvD,IAAI,SAAS,IAAI,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC;gCAClC,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC;4BAClC,CAAC;4BACD,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,YAAY,CAAC;wBACvC,CAAC;oBACH,CAAC;oBACD,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,CAAC;gBAChD,CAAC;YACH,CAAC;QACH,CAAC;IACH,CAAC;AACH,CAAC"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { FunctionCall, PromptItem } from '../../ai-service/common-types.js';
|
|
2
|
-
import { CodegenOptions } from '../../main/codegen-types.js';
|
|
3
|
-
import { StepResult } from './steps-types.js';
|
|
4
|
-
/**
|
|
5
|
-
* Executes the context completeness check step.
|
|
6
|
-
* Ensures all necessary files are included in the conversation context.
|
|
7
|
-
*/
|
|
8
|
-
export declare function executeStepEnsureContext(prompt: PromptItem[], functionCall: FunctionCall, options: CodegenOptions): Promise<StepResult>;
|
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { importantContext } from '../../main/config.js';
|
|
2
|
-
import { getSourceCode } from '../../files/read-files.js';
|
|
3
|
-
import { putSystemMessage } from '../../main/common/content-bus.js';
|
|
4
|
-
import { StepResult } from './steps-types.js';
|
|
5
|
-
/**
|
|
6
|
-
* Executes the context completeness check step.
|
|
7
|
-
* Ensures all necessary files are included in the conversation context.
|
|
8
|
-
*/
|
|
9
|
-
export async function executeStepEnsureContext(prompt, functionCall, options) {
|
|
10
|
-
try {
|
|
11
|
-
// Extract all required paths
|
|
12
|
-
const requiredPaths = extractRequiredPaths(functionCall);
|
|
13
|
-
if (!requiredPaths || requiredPaths.length === 0) {
|
|
14
|
-
putSystemMessage('No paths to ensure in context.');
|
|
15
|
-
return StepResult.CONTINUE;
|
|
16
|
-
}
|
|
17
|
-
// Get paths that are already in context
|
|
18
|
-
const existingPaths = getExistingContextPaths(prompt);
|
|
19
|
-
// Find paths that are missing from context
|
|
20
|
-
const missingPaths = requiredPaths.filter((path) => !existingPaths.has(path));
|
|
21
|
-
if (missingPaths.length === 0) {
|
|
22
|
-
putSystemMessage('All required paths are already in context.');
|
|
23
|
-
return StepResult.CONTINUE;
|
|
24
|
-
}
|
|
25
|
-
// Get source code for missing paths
|
|
26
|
-
putSystemMessage(`Ensuring context completeness. Adding ${missingPaths.length} missing files.`, { missingPaths });
|
|
27
|
-
const sourceCode = getSourceCode({ filterPaths: missingPaths, forceAll: true, ignoreImportantFiles: true }, options);
|
|
28
|
-
// Append getSourceCode function call/response to the prompt
|
|
29
|
-
prompt.push({
|
|
30
|
-
type: 'assistant',
|
|
31
|
-
functionCalls: [
|
|
32
|
-
{
|
|
33
|
-
name: 'getSourceCode',
|
|
34
|
-
args: {
|
|
35
|
-
filePaths: missingPaths,
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
],
|
|
39
|
-
}, {
|
|
40
|
-
type: 'user',
|
|
41
|
-
functionResponses: [
|
|
42
|
-
{
|
|
43
|
-
name: 'getSourceCode',
|
|
44
|
-
content: JSON.stringify(sourceCode),
|
|
45
|
-
},
|
|
46
|
-
],
|
|
47
|
-
});
|
|
48
|
-
return StepResult.CONTINUE;
|
|
49
|
-
}
|
|
50
|
-
catch (error) {
|
|
51
|
-
putSystemMessage('Error: Context completeness check failed. This is unexpected.');
|
|
52
|
-
console.error('Context completeness check error:', error);
|
|
53
|
-
return StepResult.BREAK;
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Extract all required file paths from function call using flexible extraction strategies
|
|
58
|
-
*/
|
|
59
|
-
function extractRequiredPaths(functionCall) {
|
|
60
|
-
const paths = [];
|
|
61
|
-
// Extract paths from function call arguments
|
|
62
|
-
if (functionCall.args) {
|
|
63
|
-
// Handle codegenSummary specific structure (backward compatibility)
|
|
64
|
-
if (functionCall.name === 'codegenSummary') {
|
|
65
|
-
if (Array.isArray(functionCall.args.fileUpdates)) {
|
|
66
|
-
paths.push(...functionCall.args.fileUpdates
|
|
67
|
-
.filter((update) => typeof update === 'object' && update !== null)
|
|
68
|
-
.map((update) => update.filePath));
|
|
69
|
-
}
|
|
70
|
-
if (Array.isArray(functionCall.args.contextPaths)) {
|
|
71
|
-
paths.push(...functionCall.args.contextPaths.filter((path) => typeof path === 'string'));
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
else if (functionCall.name === 'codegenPlanning') {
|
|
75
|
-
if (Array.isArray(functionCall.args.affectedFiles)) {
|
|
76
|
-
paths.push(...functionCall.args.affectedFiles.map((file) => [file.filePath, ...(file.dependencies ?? [])]).flat());
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
else if (Array.isArray(functionCall.args.filePaths)) {
|
|
80
|
-
paths.push(...functionCall.args.filePaths.filter((path) => typeof path === 'string'));
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
// Add important context paths
|
|
84
|
-
const importantPaths = importantContext.files ?? [];
|
|
85
|
-
paths.push(...importantPaths);
|
|
86
|
-
// Deduplicate and filter out empty/invalid paths
|
|
87
|
-
return Array.from(new Set(paths)).filter((path) => typeof path === 'string' && path.length > 0);
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Get paths that are already present in the conversation context
|
|
91
|
-
*/
|
|
92
|
-
function getExistingContextPaths(prompt) {
|
|
93
|
-
const existingPaths = new Set();
|
|
94
|
-
for (const item of prompt) {
|
|
95
|
-
if (!item.functionResponses)
|
|
96
|
-
continue;
|
|
97
|
-
const sourceCodeResponse = item.functionResponses.find((response) => response.name === 'getSourceCode');
|
|
98
|
-
if (!sourceCodeResponse?.content)
|
|
99
|
-
continue;
|
|
100
|
-
try {
|
|
101
|
-
const sourceCode = JSON.parse(sourceCodeResponse.content);
|
|
102
|
-
for (const [fullPath, fileInfo] of Object.entries(sourceCode)) {
|
|
103
|
-
if (fileInfo && typeof fileInfo === 'object' && 'content' in fileInfo && fileInfo.content !== null) {
|
|
104
|
-
existingPaths.add(fullPath);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
catch (error) {
|
|
109
|
-
console.warn('Failed to parse getSourceCode response:', error);
|
|
110
|
-
}
|
|
111
|
-
}
|
|
112
|
-
return existingPaths;
|
|
113
|
-
}
|
|
114
|
-
//# sourceMappingURL=step-ensure-context.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"step-ensure-context.js","sourceRoot":"","sources":["../../../src/prompt/steps/step-ensure-context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C;;;GAGG;AACH,MAAM,CAAC,KAAK,UAAU,wBAAwB,C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CAAC,kBAAkB,EAAE,OAAO;YAAE,SAAS;QAE3C,IAAI,CAAC;YACH,MAAM,UAAU,GAAG,IAAI,CAAC,KAAK,CAAC,kBAAkB,CAAC,OAAO,CAAC,CAAC;YAC1D,KAAK,MAAM,CAAC,QAAQ,EAAE,QAAQ,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC;gBAC9D,IAAI,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IAAI,SAAS,IAAI,QAAQ,IAAI,QAAQ,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;oBACnG,aAAa,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;gBAC9B,CAAC;YACH,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,OAAO,CAAC,IAAI,CAAC,yCAAyC,EAAE,KAAK,CAAC,CAAC;QACjE,CAAC;IACH,CAAC;IAED,OAAO,aAAa,CAAC;AACvB,CAAC"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
export declare const PROMPT_CODEGEN_SUMMARY_ASSISTANT = "I will now generate a summary of the proposed updates. Do you have any guidance or preferences for the summary?";
|
|
2
|
-
export declare const PROMPT_CODEGEN_SUMMARY = "# Guidelines for Code Generation Summary\n\n## Guidelines for Determining Update Tool\n\n## updateFile\n- **Use when**:\n - Making significant, structural changes to a file that require a complete rewrite or substantial modifications across multiple parts of the file.\n - Adding or removing large sections of code, or when the modifications are not easily expressed as a patch.\n - The file is of reasonable size and does not approach token limits.\n - The changes require a complete understanding of the file's context, and it's simpler to replace the entire content.\n\n- **Do not use when**:\n - The changes are small and localized, and can be accurately described with a patch.\n - The file is very large, and replacing the entire content would be inefficient or exceed token limits.\n - The changes are simple line additions, deletions, or minor edits.\n - The file has complex formatting that might be disturbed by a complete rewrite.\n\n## patchFile\n- **Use when**:\n - Making very small, targeted, line-specific edits.\n - Modifying a few lines in the file, adding or deleting code, or fixing minor errors.\n - Working with large files where replacing the entire file would be inefficient.\n - The changes are easily expressed as a patch with line numbers.\n - There is no need to understand the entire file content.\n\n- **Do not use when**:\n - The changes involve significant structural modifications or large content replacements.\n - The required patch would be too complex or unreadable.\n - The edits involve substantial changes that may affect other parts of the file.\n - There are large blocks of code that need to be moved or changed.\n\n## createFile\n- **Use when**:\n - Adding an entirely new file to the project, including new configuration files, code modules, or assets.\n - Creating a new file that has no existing counterpart in the project.\n - Implementing new features or components that require dedicated files.\n - Creating a file in a new directory.\n\n- **Do not use when**:\n - Modifying the contents of an existing file (use `updateFile` or `patchFile`).\n - Renaming an existing file (use `moveFile`).\n - Moving a file to a different location (use `moveFile`).\n\n## deleteFile\n- **Use when**:\n - Removing a file that is no longer needed or is obsolete.\n - Cleaning up unused code or configuration files.\n - Removing a file before moving it to another location or replacing it with a new one.\n\n- **Do not use when**:\n - Temporarily disabling code (use comments or conditional compilation instead).\n - Making changes to the file content (use `updateFile` or `patchFile`).\n - Moving the file to a new location (use `moveFile`).\n\n## moveFile\n- **Use when**:\n - Changing the location of a file within the project, while preserving its content.\n - Refactoring the project structure by moving files to different directories.\n - Renaming the file or its directory.\n\n- **Do not use when**:\n - Modifying the contents of the file (use `updateFile` or `patchFile`).\n - Creating a new file with similar content (use `createFile`).\n - Deleting the file (use `deleteFile`).\n\n## createDirectory\n- **Use when**:\n - Creating a new directory in the project structure.\n - Organizing files into logical groups.\n - Preparing a location for new files to be created.\n\n- **Do not use when**:\n - Modifying file contents (use `updateFile` or `patchFile`).\n - Moving files (use `moveFile`).\n - Deleting files or directories (use `deleteFile`).\n\n## downloadFile\n- **Use when**:\n - Downloading a file from a remote source to the project.\n - Fetching external resources required by the application.\n - Integrating external data or assets.\n\n- **Do not use when**:\n - Modifying existing files in the project (use `updateFile` or `patchFile`).\n - Creating new files (use `createFile`).\n - Moving files within the project (use `moveFile`).\n\n## splitImage\n- **Use when**:\n - Dividing an image into smaller parts or regions.\n - Extracting specific portions of an image for further analysis or processing.\n - Preparing image assets for different display contexts.\n\n- **Do not use when**:\n - The task does not involve image manipulation.\n - Modifying files or code.\n - The image does not need to be divided.\n\n## resizeImage\n- **Use when**:\n - Adjusting the dimensions of an image.\n - Optimizing image sizes for different platforms or resolutions.\n - Preparing images for display in various UI components.\n\n- **Do not use when**:\n - The task does not involve image manipulation.\n - Modifying files or code.\n - The image dimensions do not need to be changed.\n\n## imglyRemoveBackground\n- **Use when**:\n - Removing the background from an image.\n - Isolating the main subject of an image.\n - Preparing images for use in creative contexts.\n\n- **Do not use when**:\n - The task does not involve image manipulation.\n - Modifying files or code.\n - The image background does not need to be removed.\n\n## General Principles\n\n- **Choose the most precise tool**: Select the tool that best matches the required action (e.g., `patchFile` for small edits, `updateFile` for large changes).\n- **Minimize changes**: Avoid unnecessary modifications and use the tool that makes the smallest changes necessary.\n- **Preserve structure**: Maintain the existing code structure and formatting whenever possible, especially when using `patchFile`.\n- **Consider file size**: Use `patchFile` for large files and `updateFile` for smaller files to avoid token limits.\n- **Prioritize clarity**: Choose the tool that results in clear, maintainable code changes, and avoid complex patches when simpler options exist.\n- **Context awareness**: When making changes, ensure that the context is sufficient to understand the file and the changes.\n- **Ensure the directory structure**: When creating a new file, ensure the parent directory exists. If not create it first using `createDirectory`, and then create the file.\n\n";
|
|
@@ -1,133 +0,0 @@
|
|
|
1
|
-
export const PROMPT_CODEGEN_SUMMARY_ASSISTANT = 'I will now generate a summary of the proposed updates. Do you have any guidance or preferences for the summary?';
|
|
2
|
-
export const PROMPT_CODEGEN_SUMMARY = `# Guidelines for Code Generation Summary
|
|
3
|
-
|
|
4
|
-
## Guidelines for Determining Update Tool
|
|
5
|
-
|
|
6
|
-
## updateFile
|
|
7
|
-
- **Use when**:
|
|
8
|
-
- Making significant, structural changes to a file that require a complete rewrite or substantial modifications across multiple parts of the file.
|
|
9
|
-
- Adding or removing large sections of code, or when the modifications are not easily expressed as a patch.
|
|
10
|
-
- The file is of reasonable size and does not approach token limits.
|
|
11
|
-
- The changes require a complete understanding of the file's context, and it's simpler to replace the entire content.
|
|
12
|
-
|
|
13
|
-
- **Do not use when**:
|
|
14
|
-
- The changes are small and localized, and can be accurately described with a patch.
|
|
15
|
-
- The file is very large, and replacing the entire content would be inefficient or exceed token limits.
|
|
16
|
-
- The changes are simple line additions, deletions, or minor edits.
|
|
17
|
-
- The file has complex formatting that might be disturbed by a complete rewrite.
|
|
18
|
-
|
|
19
|
-
## patchFile
|
|
20
|
-
- **Use when**:
|
|
21
|
-
- Making very small, targeted, line-specific edits.
|
|
22
|
-
- Modifying a few lines in the file, adding or deleting code, or fixing minor errors.
|
|
23
|
-
- Working with large files where replacing the entire file would be inefficient.
|
|
24
|
-
- The changes are easily expressed as a patch with line numbers.
|
|
25
|
-
- There is no need to understand the entire file content.
|
|
26
|
-
|
|
27
|
-
- **Do not use when**:
|
|
28
|
-
- The changes involve significant structural modifications or large content replacements.
|
|
29
|
-
- The required patch would be too complex or unreadable.
|
|
30
|
-
- The edits involve substantial changes that may affect other parts of the file.
|
|
31
|
-
- There are large blocks of code that need to be moved or changed.
|
|
32
|
-
|
|
33
|
-
## createFile
|
|
34
|
-
- **Use when**:
|
|
35
|
-
- Adding an entirely new file to the project, including new configuration files, code modules, or assets.
|
|
36
|
-
- Creating a new file that has no existing counterpart in the project.
|
|
37
|
-
- Implementing new features or components that require dedicated files.
|
|
38
|
-
- Creating a file in a new directory.
|
|
39
|
-
|
|
40
|
-
- **Do not use when**:
|
|
41
|
-
- Modifying the contents of an existing file (use \`updateFile\` or \`patchFile\`).
|
|
42
|
-
- Renaming an existing file (use \`moveFile\`).
|
|
43
|
-
- Moving a file to a different location (use \`moveFile\`).
|
|
44
|
-
|
|
45
|
-
## deleteFile
|
|
46
|
-
- **Use when**:
|
|
47
|
-
- Removing a file that is no longer needed or is obsolete.
|
|
48
|
-
- Cleaning up unused code or configuration files.
|
|
49
|
-
- Removing a file before moving it to another location or replacing it with a new one.
|
|
50
|
-
|
|
51
|
-
- **Do not use when**:
|
|
52
|
-
- Temporarily disabling code (use comments or conditional compilation instead).
|
|
53
|
-
- Making changes to the file content (use \`updateFile\` or \`patchFile\`).
|
|
54
|
-
- Moving the file to a new location (use \`moveFile\`).
|
|
55
|
-
|
|
56
|
-
## moveFile
|
|
57
|
-
- **Use when**:
|
|
58
|
-
- Changing the location of a file within the project, while preserving its content.
|
|
59
|
-
- Refactoring the project structure by moving files to different directories.
|
|
60
|
-
- Renaming the file or its directory.
|
|
61
|
-
|
|
62
|
-
- **Do not use when**:
|
|
63
|
-
- Modifying the contents of the file (use \`updateFile\` or \`patchFile\`).
|
|
64
|
-
- Creating a new file with similar content (use \`createFile\`).
|
|
65
|
-
- Deleting the file (use \`deleteFile\`).
|
|
66
|
-
|
|
67
|
-
## createDirectory
|
|
68
|
-
- **Use when**:
|
|
69
|
-
- Creating a new directory in the project structure.
|
|
70
|
-
- Organizing files into logical groups.
|
|
71
|
-
- Preparing a location for new files to be created.
|
|
72
|
-
|
|
73
|
-
- **Do not use when**:
|
|
74
|
-
- Modifying file contents (use \`updateFile\` or \`patchFile\`).
|
|
75
|
-
- Moving files (use \`moveFile\`).
|
|
76
|
-
- Deleting files or directories (use \`deleteFile\`).
|
|
77
|
-
|
|
78
|
-
## downloadFile
|
|
79
|
-
- **Use when**:
|
|
80
|
-
- Downloading a file from a remote source to the project.
|
|
81
|
-
- Fetching external resources required by the application.
|
|
82
|
-
- Integrating external data or assets.
|
|
83
|
-
|
|
84
|
-
- **Do not use when**:
|
|
85
|
-
- Modifying existing files in the project (use \`updateFile\` or \`patchFile\`).
|
|
86
|
-
- Creating new files (use \`createFile\`).
|
|
87
|
-
- Moving files within the project (use \`moveFile\`).
|
|
88
|
-
|
|
89
|
-
## splitImage
|
|
90
|
-
- **Use when**:
|
|
91
|
-
- Dividing an image into smaller parts or regions.
|
|
92
|
-
- Extracting specific portions of an image for further analysis or processing.
|
|
93
|
-
- Preparing image assets for different display contexts.
|
|
94
|
-
|
|
95
|
-
- **Do not use when**:
|
|
96
|
-
- The task does not involve image manipulation.
|
|
97
|
-
- Modifying files or code.
|
|
98
|
-
- The image does not need to be divided.
|
|
99
|
-
|
|
100
|
-
## resizeImage
|
|
101
|
-
- **Use when**:
|
|
102
|
-
- Adjusting the dimensions of an image.
|
|
103
|
-
- Optimizing image sizes for different platforms or resolutions.
|
|
104
|
-
- Preparing images for display in various UI components.
|
|
105
|
-
|
|
106
|
-
- **Do not use when**:
|
|
107
|
-
- The task does not involve image manipulation.
|
|
108
|
-
- Modifying files or code.
|
|
109
|
-
- The image dimensions do not need to be changed.
|
|
110
|
-
|
|
111
|
-
## imglyRemoveBackground
|
|
112
|
-
- **Use when**:
|
|
113
|
-
- Removing the background from an image.
|
|
114
|
-
- Isolating the main subject of an image.
|
|
115
|
-
- Preparing images for use in creative contexts.
|
|
116
|
-
|
|
117
|
-
- **Do not use when**:
|
|
118
|
-
- The task does not involve image manipulation.
|
|
119
|
-
- Modifying files or code.
|
|
120
|
-
- The image background does not need to be removed.
|
|
121
|
-
|
|
122
|
-
## General Principles
|
|
123
|
-
|
|
124
|
-
- **Choose the most precise tool**: Select the tool that best matches the required action (e.g., \`patchFile\` for small edits, \`updateFile\` for large changes).
|
|
125
|
-
- **Minimize changes**: Avoid unnecessary modifications and use the tool that makes the smallest changes necessary.
|
|
126
|
-
- **Preserve structure**: Maintain the existing code structure and formatting whenever possible, especially when using \`patchFile\`.
|
|
127
|
-
- **Consider file size**: Use \`patchFile\` for large files and \`updateFile\` for smaller files to avoid token limits.
|
|
128
|
-
- **Prioritize clarity**: Choose the tool that results in clear, maintainable code changes, and avoid complex patches when simpler options exist.
|
|
129
|
-
- **Context awareness**: When making changes, ensure that the context is sufficient to understand the file and the changes.
|
|
130
|
-
- **Ensure the directory structure**: When creating a new file, ensure the parent directory exists. If not create it first using \`createDirectory\`, and then create the file.
|
|
131
|
-
|
|
132
|
-
`;
|
|
133
|
-
//# sourceMappingURL=step-generate-codegen-summary-prompt.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"step-generate-codegen-summary-prompt.js","sourceRoot":"","sources":["../../../src/prompt/steps/step-generate-codegen-summary-prompt.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,gCAAgC,GAC3C,iHAAiH,CAAC;AAEpH,MAAM,CAAC,MAAM,sBAAsB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkIrC,CAAC"}
|
|
@@ -1,14 +0,0 @@
|
|
|
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';
|
|
5
|
-
import { CodegenOptions, CodegenSummaryArgs } from '../../main/codegen-types.js';
|
|
6
|
-
/**
|
|
7
|
-
* Generates and validates the codegen summary.
|
|
8
|
-
* This is the first part of the original executeStepCodegenSummary function.
|
|
9
|
-
* It handles generating the initial summary, validating it, and ensuring context is available.
|
|
10
|
-
*/
|
|
11
|
-
export declare function generateCodegenSummary(generateContentFn: GenerateContentFunction, prompt: PromptItem[], functionDefs: FunctionDef[], options: CodegenOptions): Promise<{
|
|
12
|
-
codegenSummaryRequest: FunctionCall<CodegenSummaryArgs>;
|
|
13
|
-
baseResult: FunctionCall[];
|
|
14
|
-
}>;
|