genaicode 0.15.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +266 -91
- 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 +36 -0
- package/dist/core/client.js +121 -0
- package/dist/core/client.js.map +1 -0
- package/dist/core/plugins.d.ts +14 -0
- package/dist/core/plugins.js +31 -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 +23 -0
- package/dist/core/result.js.map +1 -0
- package/dist/core/types.d.ts +103 -0
- package/dist/core/types.js +2 -0
- package/dist/core/types.js.map +1 -0
- package/dist/index.d.ts +7 -8
- package/dist/index.js +5 -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 +28 -0
- package/dist/providers/anthropic.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 +35 -0
- package/dist/providers/google.js.map +1 -0
- package/dist/providers/openai-converter.d.ts +16 -0
- package/dist/providers/openai-converter.js +110 -0
- package/dist/providers/openai-converter.js.map +1 -0
- package/dist/providers/openai.d.ts +13 -0
- package/dist/providers/openai.js +29 -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 +95 -0
- package/package.json +32 -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 -7
- package/dist/main/codegen.js +0 -122
- 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/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 -31
- 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 -158
- package/dist/main/ui/backend/service.js +0 -622
- 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-DAM_kJhM.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/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/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/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 -12
- package/dist/vite-genaicode/vite-genaicode-plugin.js +0 -92
- 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,114 +0,0 @@
|
|
|
1
|
-
import { getSourceFiles } from '../../../../files/find-files.js';
|
|
2
|
-
import { refreshFiles } from '../../../../files/find-files.js';
|
|
3
|
-
import { getExpandedContextPaths } from '../../../../files/source-code-utils.js';
|
|
4
|
-
import { putSystemMessage } from '../../../../main/common/content-bus.js';
|
|
5
|
-
/**
|
|
6
|
-
* Checks if a file's content is already provided in the conversation history
|
|
7
|
-
* @param filePath The path of the file to check
|
|
8
|
-
* @param prompt The conversation history
|
|
9
|
-
* @returns true if the file content is already available in the history
|
|
10
|
-
*/
|
|
11
|
-
export function isFileContentAlreadyProvided(filePath, prompt) {
|
|
12
|
-
return prompt.some((item) => {
|
|
13
|
-
if (item.type !== 'user' || !item.functionResponses) {
|
|
14
|
-
return false;
|
|
15
|
-
}
|
|
16
|
-
return item.functionResponses.some((response) => {
|
|
17
|
-
if (response.name !== 'getSourceCode' || !response.content) {
|
|
18
|
-
return false;
|
|
19
|
-
}
|
|
20
|
-
try {
|
|
21
|
-
const sourceCodeMap = JSON.parse(response.content);
|
|
22
|
-
return (sourceCodeMap[filePath] &&
|
|
23
|
-
sourceCodeMap[filePath] &&
|
|
24
|
-
'content' in sourceCodeMap[filePath] &&
|
|
25
|
-
sourceCodeMap[filePath].content !== null);
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
console.warn('Error parsing getSourceCode response:', error);
|
|
29
|
-
return false;
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Categorizes requested files into legitimate and illegitimate files
|
|
36
|
-
* @param requestedFiles Array of file paths to categorize
|
|
37
|
-
* @returns Object containing arrays of legitimate and illegitimate file paths
|
|
38
|
-
*/
|
|
39
|
-
export function categorizeLegitimateFiles(requestedFiles) {
|
|
40
|
-
const legitimateFiles = [];
|
|
41
|
-
const illegitimateFiles = [];
|
|
42
|
-
requestedFiles.forEach((filePath) => {
|
|
43
|
-
if (isFilePathLegitimate(filePath)) {
|
|
44
|
-
legitimateFiles.push(filePath);
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
illegitimateFiles.push(filePath);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
return { legitimateFiles, illegitimateFiles };
|
|
51
|
-
}
|
|
52
|
-
/**
|
|
53
|
-
* Checks if a file path is legitimate (exists in the source files)
|
|
54
|
-
* @param filePath The path of the file to check
|
|
55
|
-
* @returns true if the file path is legitimate
|
|
56
|
-
*/
|
|
57
|
-
export function isFilePathLegitimate(filePath) {
|
|
58
|
-
return getSourceFiles().includes(filePath);
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Process file requests by checking if they are already provided and categorizing them
|
|
62
|
-
* @param requestedFiles Array of file paths to process
|
|
63
|
-
* @param prompt The conversation history
|
|
64
|
-
* @param options Codegen options
|
|
65
|
-
* @returns Processed file request information
|
|
66
|
-
*/
|
|
67
|
-
export function processFileRequests(requestedFiles, prompt, options) {
|
|
68
|
-
// Expand context paths
|
|
69
|
-
requestedFiles = getExpandedContextPaths(requestedFiles, options);
|
|
70
|
-
// Check which files are already provided in the conversation history
|
|
71
|
-
const alreadyProvidedFiles = requestedFiles.filter((file) => isFileContentAlreadyProvided(file, prompt));
|
|
72
|
-
// Filter out already provided files
|
|
73
|
-
requestedFiles = requestedFiles.filter((file) => !isFileContentAlreadyProvided(file, prompt));
|
|
74
|
-
// Refresh files in case new files appeared
|
|
75
|
-
refreshFiles();
|
|
76
|
-
// Categorize files into legitimate and illegitimate
|
|
77
|
-
const { legitimateFiles, illegitimateFiles } = categorizeLegitimateFiles(requestedFiles);
|
|
78
|
-
putSystemMessage('Processing file requests', {
|
|
79
|
-
requestedFiles,
|
|
80
|
-
alreadyProvidedFiles,
|
|
81
|
-
legitimateFiles,
|
|
82
|
-
illegitimateFiles,
|
|
83
|
-
});
|
|
84
|
-
return {
|
|
85
|
-
requestedFiles,
|
|
86
|
-
alreadyProvidedFiles,
|
|
87
|
-
legitimateFiles,
|
|
88
|
-
illegitimateFiles,
|
|
89
|
-
};
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Generate a user-friendly message about file processing status
|
|
93
|
-
* @param alreadyProvidedFiles Files already provided in conversation
|
|
94
|
-
* @param requestedFiles Files that were requested
|
|
95
|
-
* @param legitimateFiles Files that are legitimate and will be processed
|
|
96
|
-
* @param illegitimateFiles Files that are not legitimate
|
|
97
|
-
* @param type Type of content being provided ('content' or 'fragments')
|
|
98
|
-
* @returns A formatted message string
|
|
99
|
-
*/
|
|
100
|
-
export function generateFilesContentPrompt(alreadyProvidedFiles, requestedFiles, legitimateFiles, illegitimateFiles, type) {
|
|
101
|
-
return ((alreadyProvidedFiles.length > 0
|
|
102
|
-
? `Some files were already provided in the conversation history:
|
|
103
|
-
${alreadyProvidedFiles.map((path) => `- ${path}`).join('\n')}
|
|
104
|
-
|
|
105
|
-
Providing ${type} for the remaining files:
|
|
106
|
-
${requestedFiles.map((path) => `- ${path}`).join('\n')}`
|
|
107
|
-
: `All requested file ${type} have been provided:
|
|
108
|
-
${legitimateFiles.map((path) => `- ${path}`).join('\n')}`) +
|
|
109
|
-
(illegitimateFiles.length > 0
|
|
110
|
-
? `\n\nSome files are not legitimate and their ${type} cannot be provided:
|
|
111
|
-
${illegitimateFiles.map((path) => `- ${path}`).join('\n')}`
|
|
112
|
-
: ''));
|
|
113
|
-
}
|
|
114
|
-
//# sourceMappingURL=file-request-utils.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"file-request-utils.js","sourceRoot":"","sources":["../../../../../src/prompt/steps/step-ask-question/handlers/file-request-utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AAEjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,UAAU,4BAA4B,CAAC,QAAgB,EAAE,MAAoB;IACjF,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE;QAC1B,IAAI,IAAI,CAAC,IAAI,KAAK,MAAM,IAAI,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC;YACpD,OAAO,KAAK,CAAC;QACf,CAAC;QAED,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE;YAC9C,IAAI,QAAQ,CAAC,IAAI,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,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC;QACtD,CAAC,iBAAiB,CAAC,MAAM,GAAG,CAAC;YAC3B,CAAC,CAAC,+CAA+C,IAAI;EACzD,iBAAiB,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE;YACrD,CAAC,CAAC,EAAE,CAAC,CACR,CAAC;AACJ,CAAC"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { ActionHandlerProps, ActionResult } from '../step-ask-question-types.js';
|
|
2
|
-
export declare const CODEGEN_SUMMARY_GENERATED_MESSAGE = "Codegen summary is generated. Would you like to proceed with the code changes?";
|
|
3
|
-
export declare const CODEGEN_SUMMARY_APPROVED = "Accept codegen summary and continue";
|
|
4
|
-
export declare function handleCodeGeneration({ generateContentFn, generateImageFn, waitIfPaused, prompt, options, }: ActionHandlerProps): Promise<ActionResult>;
|
|
@@ -1,177 +0,0 @@
|
|
|
1
|
-
import { putAssistantMessage, putSystemMessage, putUserMessage } from '../../../../main/common/content-bus.js';
|
|
2
|
-
import { askUserForConfirmation, askUserForConfirmationWithAnswer } from '../../../../main/common/user-actions.js';
|
|
3
|
-
import { getFunctionDefs } from '../../../function-calling.js';
|
|
4
|
-
import { CODEGEN_SUMMARY_PROMPT } from '../../../static-prompts.js';
|
|
5
|
-
import { executeStepCodegenPlanning } from '../../step-codegen-planning.js';
|
|
6
|
-
import { generateCodegenSummary } from '../../step-generate-codegen-summary.js';
|
|
7
|
-
import { processFileUpdates } from '../../step-process-file-updates.js';
|
|
8
|
-
import { StepResult } from '../../steps-types.js';
|
|
9
|
-
import { updateFiles } from '../../../../files/update-files.js';
|
|
10
|
-
import { executeStepContextCompression } from '../../step-context-compression.js';
|
|
11
|
-
import { registerActionHandler } from '../step-ask-question-handlers.js';
|
|
12
|
-
export const CODEGEN_SUMMARY_GENERATED_MESSAGE = 'Codegen summary is generated. Would you like to proceed with the code changes?';
|
|
13
|
-
export const CODEGEN_SUMMARY_APPROVED = 'Accept codegen summary and continue';
|
|
14
|
-
registerActionHandler('codeGeneration', handleCodeGeneration);
|
|
15
|
-
export async function handleCodeGeneration({ generateContentFn, generateImageFn, waitIfPaused, prompt, options, }) {
|
|
16
|
-
const planningResult = await executeStepCodegenPlanning(generateContentFn, prompt, options);
|
|
17
|
-
if (planningResult === StepResult.BREAK) {
|
|
18
|
-
return {
|
|
19
|
-
breakLoop: true,
|
|
20
|
-
items: [],
|
|
21
|
-
};
|
|
22
|
-
}
|
|
23
|
-
// Ask user to confirm the planning result
|
|
24
|
-
const planningConfirmation = await askUserForConfirmationWithAnswer(CODEGEN_SUMMARY_PROMPT, 'Accept plan', 'Reject plan', true, options);
|
|
25
|
-
putAssistantMessage(CODEGEN_SUMMARY_PROMPT);
|
|
26
|
-
prompt.push({
|
|
27
|
-
type: 'assistant',
|
|
28
|
-
text: CODEGEN_SUMMARY_PROMPT,
|
|
29
|
-
});
|
|
30
|
-
if (!planningConfirmation.confirmed) {
|
|
31
|
-
// User rejected the planning, return to conversation
|
|
32
|
-
if (planningConfirmation.answer) {
|
|
33
|
-
putUserMessage(planningConfirmation.answer);
|
|
34
|
-
}
|
|
35
|
-
putSystemMessage('Planning rejected. Returning to conversation.');
|
|
36
|
-
prompt.push({
|
|
37
|
-
type: 'user',
|
|
38
|
-
text: 'Planning rejected. Returning to conversation.' +
|
|
39
|
-
(planningConfirmation.answer ? `\n\n${planningConfirmation.answer}` : ''),
|
|
40
|
-
});
|
|
41
|
-
return {
|
|
42
|
-
breakLoop: false,
|
|
43
|
-
items: [],
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
if (planningConfirmation.answer) {
|
|
47
|
-
putUserMessage(planningConfirmation.answer);
|
|
48
|
-
}
|
|
49
|
-
putSystemMessage('Planning accepted. Proceeding with code generation.');
|
|
50
|
-
// Add user's planning confirmation answer to prompt history
|
|
51
|
-
prompt.push({
|
|
52
|
-
type: 'user',
|
|
53
|
-
text: 'Accept planning and continue.' + (planningConfirmation.answer ? `\n\n${planningConfirmation.answer}` : ''),
|
|
54
|
-
});
|
|
55
|
-
try {
|
|
56
|
-
// First step: Generate and validate codegen summary
|
|
57
|
-
const { codegenSummaryRequest, baseResult } = await generateCodegenSummary(generateContentFn, prompt, getFunctionDefs(), options);
|
|
58
|
-
// Ask user to confirm the codegen summary
|
|
59
|
-
const codegenSummaryConfirmation = await askUserForConfirmationWithAnswer(CODEGEN_SUMMARY_GENERATED_MESSAGE, 'Accept codegen summary', 'Reject codegen summary', true, options);
|
|
60
|
-
putAssistantMessage(CODEGEN_SUMMARY_GENERATED_MESSAGE);
|
|
61
|
-
if (codegenSummaryConfirmation.answer) {
|
|
62
|
-
putUserMessage(codegenSummaryConfirmation.answer);
|
|
63
|
-
}
|
|
64
|
-
if (!codegenSummaryConfirmation.confirmed) {
|
|
65
|
-
putSystemMessage('Codegen summary rejected. Returning to conversation.');
|
|
66
|
-
prompt.push({
|
|
67
|
-
type: 'assistant',
|
|
68
|
-
text: CODEGEN_SUMMARY_GENERATED_MESSAGE,
|
|
69
|
-
}, {
|
|
70
|
-
type: 'user',
|
|
71
|
-
text: 'Codegen summary rejected. Returning to conversation.' +
|
|
72
|
-
(codegenSummaryConfirmation.answer ? `\n\n${codegenSummaryConfirmation.answer}` : ''),
|
|
73
|
-
});
|
|
74
|
-
return {
|
|
75
|
-
breakLoop: false,
|
|
76
|
-
items: [],
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
putSystemMessage('Codegen summary accepted. Proceeding with code generation.');
|
|
80
|
-
prompt.push({
|
|
81
|
-
type: 'assistant',
|
|
82
|
-
text: CODEGEN_SUMMARY_GENERATED_MESSAGE,
|
|
83
|
-
}, {
|
|
84
|
-
type: 'user',
|
|
85
|
-
text: CODEGEN_SUMMARY_APPROVED +
|
|
86
|
-
(codegenSummaryConfirmation.answer ? `\n\n${codegenSummaryConfirmation.answer}` : ''),
|
|
87
|
-
});
|
|
88
|
-
// Second step: Process file updates
|
|
89
|
-
const updateResults = await processFileUpdates(generateContentFn, prompt, getFunctionDefs(), options, codegenSummaryRequest, waitIfPaused, generateImageFn);
|
|
90
|
-
const functionCalls = [...baseResult, ...updateResults];
|
|
91
|
-
const confirmApply = await askUserForConfirmationWithAnswer('Code changes are generated, now what?', 'Apply code changes', 'Reject code changes', true, options);
|
|
92
|
-
putAssistantMessage('Code changes are generated, now what?');
|
|
93
|
-
if (confirmApply.confirmed) {
|
|
94
|
-
if (confirmApply.answer) {
|
|
95
|
-
putUserMessage(confirmApply.answer);
|
|
96
|
-
}
|
|
97
|
-
prompt.push({
|
|
98
|
-
type: 'assistant',
|
|
99
|
-
text: 'Code changes are generated, now what?',
|
|
100
|
-
}, {
|
|
101
|
-
type: 'user',
|
|
102
|
-
text: 'Apply code changes. ' + confirmApply.answer,
|
|
103
|
-
});
|
|
104
|
-
putSystemMessage('Applying code changes...');
|
|
105
|
-
if (options.dryRun) {
|
|
106
|
-
putSystemMessage('Dry run mode, not updating files');
|
|
107
|
-
}
|
|
108
|
-
else {
|
|
109
|
-
// Apply the code changes
|
|
110
|
-
const failedOperations = await updateFiles(functionCalls.filter((call) => call.name !== 'explanation' && call.name !== 'getSourceCode' && call.name !== 'codegenSummary'), options);
|
|
111
|
-
if (failedOperations.length > 0) {
|
|
112
|
-
putSystemMessage(`Code changes applied, but some operations failed for: ${failedOperations.map((call) => call.args?.filePath).join(', ')}`);
|
|
113
|
-
}
|
|
114
|
-
else {
|
|
115
|
-
putSystemMessage('Code changes applied successfully');
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
else {
|
|
120
|
-
if (confirmApply.answer) {
|
|
121
|
-
putUserMessage(confirmApply.answer);
|
|
122
|
-
}
|
|
123
|
-
putSystemMessage('Rejecting code changes...');
|
|
124
|
-
prompt.push({
|
|
125
|
-
type: 'assistant',
|
|
126
|
-
text: 'Code changes are generated, now what?',
|
|
127
|
-
}, {
|
|
128
|
-
type: 'user',
|
|
129
|
-
text: 'Reject code changes. ' + confirmApply.answer,
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
if (!(await askUserForConfirmation('Code generation completed, do you want to continue conversation?', false, options, 'Continue conversation', 'End conversation')).confirmed) {
|
|
133
|
-
return {
|
|
134
|
-
breakLoop: true,
|
|
135
|
-
stepResult: functionCalls,
|
|
136
|
-
items: [],
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
putSystemMessage('Continuing conversation...');
|
|
140
|
-
const compressionResult = await executeStepContextCompression(generateContentFn, prompt, options);
|
|
141
|
-
prompt.push({
|
|
142
|
-
type: 'assistant',
|
|
143
|
-
text: `Code generation completed, changes ${confirmApply.confirmed ? 'were accepted and applied' : 'changes were rejected and not applied'}. Should we continue the conversation?`,
|
|
144
|
-
}, {
|
|
145
|
-
type: 'user',
|
|
146
|
-
text: 'Thank you for doing the code generation, now lets continue the conversation.',
|
|
147
|
-
});
|
|
148
|
-
return {
|
|
149
|
-
breakLoop: compressionResult !== StepResult.CONTINUE,
|
|
150
|
-
stepResult: functionCalls,
|
|
151
|
-
items: [],
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
catch (error) {
|
|
155
|
-
putSystemMessage(`Error during code generation: ${error instanceof Error ? error.message : 'Unknown error'}`);
|
|
156
|
-
const tryAgainConfirm = await askUserForConfirmation('An error occurred during code generation. Would you like to try again or continue the conversation?', false, options, 'Try again', 'Continue conversation');
|
|
157
|
-
return {
|
|
158
|
-
breakLoop: !tryAgainConfirm.confirmed,
|
|
159
|
-
items: [
|
|
160
|
-
{
|
|
161
|
-
assistant: {
|
|
162
|
-
type: 'assistant',
|
|
163
|
-
text: 'An error occurred during code generation. Would you like to try again or continue the conversation?',
|
|
164
|
-
functionCalls: [],
|
|
165
|
-
},
|
|
166
|
-
user: {
|
|
167
|
-
type: 'user',
|
|
168
|
-
text: tryAgainConfirm.confirmed
|
|
169
|
-
? 'Lets continue the conversation'
|
|
170
|
-
: 'Error occurred during code generation.',
|
|
171
|
-
},
|
|
172
|
-
},
|
|
173
|
-
],
|
|
174
|
-
};
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
//# sourceMappingURL=handle-code-generation.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"handle-code-generation.js","sourceRoot":"","sources":["../../../../../src/prompt/steps/step-ask-question/handlers/handle-code-generation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC/G,OAAO,EAAE,sBAAsB,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AACnH,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAC/D,OAAO,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AACpE,OAAO,EAAE,0BAA0B,EAAE,MAAM,gCAAgC,CAAC;AAC5E,OAAO,EAAE,sBAAsB,EAAE,MAAM,wCAAwC,CAAC;AAChF,OAAO,EAAE,kBAAkB,EAAE,MAAM,oCAAoC,CAAC;AACxE,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,6BAA6B,EAAE,MAAM,mCAAmC,CAAC;AAClF,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,MAAM,CAAC,MAAM,iCAAiC,GAC5C,gFAAgF,CAAC;AAEnF,MAAM,CAAC,MAAM,wBAAwB,GAAG,qCAAqC,CAAC;AAE9E,qBAAqB,CAAC,gBAAgB,EAAE,oBAAoB,CAAC,CAAC;AAE9D,MAAM,CAAC,KAAK,UAAU,oBAAoB,CAAC,EACzC,iBAAiB,EACjB,eAAe,EACf,YAAY,EACZ,MAAM,EACN,OAAO,GACY;IACnB,MAA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MAAM;YACZ,IAAI,EAAE,8EAA8E;SACrF,CACF,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,iBAAiB,KAAK,UAAU,CAAC,QAAQ;YACpD,UAAU,EAAE,aAAa;YACzB,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,gBAAgB,CAAC,iCAAiC,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,eAAe,EAAE,CAAC,CAAC;QAE9G,MAAM,eAAe,GAAG,MAAM,sBAAsB,CAClD,qGAAqG,EACrG,KAAK,EACL,OAAO,EACP,WAAW,EACX,uBAAuB,CACxB,CAAC;QAEF,OAAO;YACL,SAAS,EAAE,CAAC,eAAe,CAAC,SAAS;YACrC,KAAK,EAAE;gBACL;oBACE,SAAS,EAAE;wBACT,IAAI,EAAE,WAAW;wBACjB,IAAI,EAAE,qGAAqG;wBAC3G,aAAa,EAAE,EAAE;qBAClB;oBACD,IAAI,EAAE;wBACJ,IAAI,EAAE,MAAM;wBACZ,IAAI,EAAE,eAAe,CAAC,SAAS;4BAC7B,CAAC,CAAC,gCAAgC;4BAClC,CAAC,CAAC,wCAAwC;qBAC7C;iBACF;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { PromptItem, FunctionDef } from '../../../../ai-service/common-types.js';
|
|
2
|
-
import { ActionHandler } from '../step-ask-question-types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Constructs the prompt for the initial planning phase of a compound action.
|
|
5
|
-
* @param basePrompt The current conversation history.
|
|
6
|
-
* @param assistantMessage The assistant's message initiating the compound action.
|
|
7
|
-
* @param compoundActionDef The function definition for the compound action planner.
|
|
8
|
-
* @returns The prompt items for the planning phase.
|
|
9
|
-
*/
|
|
10
|
-
export declare function constructCompoundActionPlanningPrompt(basePrompt: PromptItem[], assistantMessage: string | undefined, compoundActionDef: FunctionDef): PromptItem[];
|
|
11
|
-
/**
|
|
12
|
-
* Constructs the prompt for inferring parameters for a specific action within a compound action.
|
|
13
|
-
* @param basePrompt The current conversation history (which includes prior planning and parameter inferences).
|
|
14
|
-
* @param actionId The unique ID of the current action.
|
|
15
|
-
* @param actionName The name of the current action (e.g., "createFile").
|
|
16
|
-
* @param operationDef The function definition for the current action.
|
|
17
|
-
* @returns The prompt items for the parameter inference phase.
|
|
18
|
-
*/
|
|
19
|
-
export declare function constructCompoundActionParameterInferencePrompt(basePrompt: PromptItem[], actionId: string, actionName: string, operationDef: FunctionDef): PromptItem[];
|
|
20
|
-
export declare const handleCompoundAction: ActionHandler;
|
|
@@ -1,305 +0,0 @@
|
|
|
1
|
-
import { ModelType } from '../../../../ai-service/common-types.js';
|
|
2
|
-
import { askUserForConfirmationWithAnswer } from '../../../../main/common/user-actions.js';
|
|
3
|
-
import { getOperationExecutor, getOperationDefs } from '../../../../operations/operations-index.js';
|
|
4
|
-
import { registerActionHandler } from '../step-ask-question-handlers.js';
|
|
5
|
-
import { putAssistantMessage, putSystemMessage, putUserMessage } from '../../../../main/common/content-bus.js';
|
|
6
|
-
import { getFunctionDefs } from '../../../function-calling.js';
|
|
7
|
-
import { getCompoundActionDef } from '../../../function-defs/compound-action.js';
|
|
8
|
-
import { executeStepEnsureContext } from '../../step-ensure-context.js';
|
|
9
|
-
import { StepResult } from '../../steps-types.js';
|
|
10
|
-
import { getSourceCode } from '../../../../files/read-files.js';
|
|
11
|
-
import { executeStepVerifyPatch } from '../../step-verify-patch.js';
|
|
12
|
-
/**
|
|
13
|
-
* Constructs the prompt for the initial planning phase of a compound action.
|
|
14
|
-
* @param basePrompt The current conversation history.
|
|
15
|
-
* @param assistantMessage The assistant's message initiating the compound action.
|
|
16
|
-
* @param compoundActionDef The function definition for the compound action planner.
|
|
17
|
-
* @returns The prompt items for the planning phase.
|
|
18
|
-
*/
|
|
19
|
-
export function constructCompoundActionPlanningPrompt(basePrompt, assistantMessage, compoundActionDef) {
|
|
20
|
-
return [
|
|
21
|
-
...basePrompt,
|
|
22
|
-
{
|
|
23
|
-
type: 'assistant',
|
|
24
|
-
text: assistantMessage ?? '',
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
type: 'user',
|
|
28
|
-
text: `Based on the conversation history and my last message, please identify the sequence of file operations (like ${getOperationDefs()
|
|
29
|
-
.map((op) => op.name)
|
|
30
|
-
.join(', ')}). For each operation, specify the target 'filePath' where applicable. Provide an array of actions and a concise summary message for my confirmation. Please provide information about dependency between actions. Use the "${compoundActionDef.name}" function to return this information.`,
|
|
31
|
-
},
|
|
32
|
-
];
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Constructs the prompt for inferring parameters for a specific action within a compound action.
|
|
36
|
-
* @param basePrompt The current conversation history (which includes prior planning and parameter inferences).
|
|
37
|
-
* @param actionId The unique ID of the current action.
|
|
38
|
-
* @param actionName The name of the current action (e.g., "createFile").
|
|
39
|
-
* @param operationDef The function definition for the current action.
|
|
40
|
-
* @returns The prompt items for the parameter inference phase.
|
|
41
|
-
*/
|
|
42
|
-
export function constructCompoundActionParameterInferencePrompt(basePrompt, actionId, actionName, operationDef) {
|
|
43
|
-
return [
|
|
44
|
-
...basePrompt,
|
|
45
|
-
{
|
|
46
|
-
type: 'user',
|
|
47
|
-
text: `Now, for the action "${actionId}:${actionName}", please determine the specific parameters required. Refer to its definition: ${JSON.stringify(operationDef.parameters)}. Use the "${actionName}" function to return these parameters.`,
|
|
48
|
-
},
|
|
49
|
-
];
|
|
50
|
-
}
|
|
51
|
-
export const handleCompoundAction = async ({ askQuestionCall, options, generateContentFn, prompt, }) => {
|
|
52
|
-
const compoundActionDef = getCompoundActionDef();
|
|
53
|
-
let actions = [];
|
|
54
|
-
let summary = '';
|
|
55
|
-
let initialInferenceCall;
|
|
56
|
-
// Step 1: Infer High-Level Plan (Action Types and Summary)
|
|
57
|
-
try {
|
|
58
|
-
putSystemMessage('Inferring high-level plan for compound action...');
|
|
59
|
-
const initialInferencePrompt = constructCompoundActionPlanningPrompt(prompt, askQuestionCall.args?.message, compoundActionDef);
|
|
60
|
-
const initialResult = await generateContentFn(initialInferencePrompt, {
|
|
61
|
-
modelType: ModelType.CHEAP, // Use a capable model for planning
|
|
62
|
-
functionDefs: getFunctionDefs(), // getFunctionDefs() already includes compoundActionDef
|
|
63
|
-
requiredFunctionName: compoundActionDef.name,
|
|
64
|
-
temperature: 0.2,
|
|
65
|
-
expectedResponseType: { text: false, functionCall: true, media: false },
|
|
66
|
-
}, options);
|
|
67
|
-
initialInferenceCall = initialResult.find((part) => part.type === 'functionCall')?.functionCall;
|
|
68
|
-
if (!initialInferenceCall?.args?.actions || initialInferenceCall.args.actions.length === 0) {
|
|
69
|
-
putSystemMessage('AI failed to generate a list of action types or returned an empty list. Cannot proceed.');
|
|
70
|
-
prompt.push({
|
|
71
|
-
type: 'assistant',
|
|
72
|
-
text: askQuestionCall.args?.message ?? '',
|
|
73
|
-
});
|
|
74
|
-
prompt.push({
|
|
75
|
-
type: 'user',
|
|
76
|
-
text: 'I was unable to determine the necessary actions. Could you please clarify your request or try rephrasing it?',
|
|
77
|
-
});
|
|
78
|
-
return { breakLoop: false, items: [] };
|
|
79
|
-
}
|
|
80
|
-
actions = initialInferenceCall.args.actions;
|
|
81
|
-
summary = initialInferenceCall.args.summary;
|
|
82
|
-
putSystemMessage(`Inferred actions`, { actions, summary });
|
|
83
|
-
}
|
|
84
|
-
catch (error) {
|
|
85
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
86
|
-
putSystemMessage(`Error during high-level plan inference: ${errorMessage}`);
|
|
87
|
-
prompt.push({
|
|
88
|
-
type: 'assistant',
|
|
89
|
-
text: askQuestionCall.args?.message ?? '',
|
|
90
|
-
}, {
|
|
91
|
-
type: 'user',
|
|
92
|
-
text: `I encountered an error while planning the actions: ${errorMessage}. Please clarify your request.`,
|
|
93
|
-
});
|
|
94
|
-
return { breakLoop: false, items: [] };
|
|
95
|
-
}
|
|
96
|
-
prompt.push({
|
|
97
|
-
type: 'assistant',
|
|
98
|
-
text: askQuestionCall.args?.message ?? '', // This is the original assistant message that triggered compound action
|
|
99
|
-
functionCalls: [initialInferenceCall], // The AI call for planning
|
|
100
|
-
});
|
|
101
|
-
// prompt user for confirmation of the inferred actions
|
|
102
|
-
let confirmation = await askUserForConfirmationWithAnswer('The assistant is ready to start working on the inferred actions. Do you want to proceed?', 'Yes, proceed with these actions', 'No, I want to change something', true, options);
|
|
103
|
-
if (confirmation.answer) {
|
|
104
|
-
putUserMessage(confirmation.answer);
|
|
105
|
-
}
|
|
106
|
-
if (!confirmation.confirmed) {
|
|
107
|
-
putSystemMessage('User declined the proposed actions.');
|
|
108
|
-
prompt.push({
|
|
109
|
-
type: 'user',
|
|
110
|
-
text: `Declining the proposed actions. ${confirmation.answer ?? ''}`,
|
|
111
|
-
functionResponses: [
|
|
112
|
-
{
|
|
113
|
-
name: initialInferenceCall.name,
|
|
114
|
-
call_id: initialInferenceCall.id,
|
|
115
|
-
content: '',
|
|
116
|
-
},
|
|
117
|
-
],
|
|
118
|
-
});
|
|
119
|
-
return { breakLoop: false, items: [] };
|
|
120
|
-
}
|
|
121
|
-
putSystemMessage('User confirmed the proposed actions. Proceeding with parameter inference...');
|
|
122
|
-
// Ensure context for all planned files
|
|
123
|
-
const uniqueFilePaths = Array.from(new Set(actions.map((a) => a.filePath).filter((p) => !!p)));
|
|
124
|
-
if (uniqueFilePaths.length > 0) {
|
|
125
|
-
const contextAssuranceCall = {
|
|
126
|
-
name: 'contextAssurance',
|
|
127
|
-
args: { filePaths: uniqueFilePaths },
|
|
128
|
-
};
|
|
129
|
-
const contextResult = await executeStepEnsureContext(prompt, contextAssuranceCall, options);
|
|
130
|
-
if (contextResult === StepResult.BREAK) {
|
|
131
|
-
putSystemMessage('Error: Context ensuring failed during compound action. Aborting.');
|
|
132
|
-
return { breakLoop: false, items: [] };
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
// Add initial planning call to conversation history
|
|
136
|
-
prompt.push({
|
|
137
|
-
type: 'user', // User function response for the planning call (empty content as it was a planning step)
|
|
138
|
-
text: `Accepting the proposed actions. ${confirmation.answer ?? ''}`,
|
|
139
|
-
functionResponses: [
|
|
140
|
-
{
|
|
141
|
-
name: initialInferenceCall.name,
|
|
142
|
-
call_id: initialInferenceCall.id,
|
|
143
|
-
content: '',
|
|
144
|
-
},
|
|
145
|
-
],
|
|
146
|
-
},
|
|
147
|
-
// Assistant message indicating planning is done, before parameter inference starts
|
|
148
|
-
{
|
|
149
|
-
type: 'assistant',
|
|
150
|
-
text: `I have inferred the actions and I am ready to determine their parameters.`,
|
|
151
|
-
});
|
|
152
|
-
// Step 2: Infer Parameters for Each Action
|
|
153
|
-
const detailedActions = [];
|
|
154
|
-
let parameterInferenceFailed = false;
|
|
155
|
-
const completedActionIds = new Set();
|
|
156
|
-
let actionsToInfer = [...actions]; // Create a mutable copy
|
|
157
|
-
while (actionsToInfer.length > 0) {
|
|
158
|
-
const processableActions = actionsToInfer.filter((action) => !action.dependsOn || action.dependsOn.every((dep) => completedActionIds.has(dep)));
|
|
159
|
-
if (processableActions.length === 0 && actionsToInfer.length > 0) {
|
|
160
|
-
putSystemMessage('Error: Circular dependency or unresolvable dependencies in compound actions.');
|
|
161
|
-
parameterInferenceFailed = true;
|
|
162
|
-
break;
|
|
163
|
-
}
|
|
164
|
-
if (processableActions.length === 0)
|
|
165
|
-
break; // All done or stuck
|
|
166
|
-
const results = await Promise.allSettled(processableActions.map(async (actionToProcess) => {
|
|
167
|
-
const { id: actionId, name: actionName, filePath } = actionToProcess;
|
|
168
|
-
const currentOperationDef = getOperationDefs().find((op) => op.name === actionName);
|
|
169
|
-
if (!currentOperationDef) {
|
|
170
|
-
putSystemMessage(`Error: Operation definition not found for action "${actionId}:${actionName}". Skipping this action.`);
|
|
171
|
-
parameterInferenceFailed = true;
|
|
172
|
-
return { success: false, actionId };
|
|
173
|
-
}
|
|
174
|
-
try {
|
|
175
|
-
putSystemMessage(`Inferring parameters for action: ${actionId}:${actionName}...`);
|
|
176
|
-
const paramInferencePrompt = constructCompoundActionParameterInferencePrompt(prompt, // Pass the *current* prompt history
|
|
177
|
-
actionId, actionName, currentOperationDef);
|
|
178
|
-
const paramResult = await generateContentFn(paramInferencePrompt, {
|
|
179
|
-
modelType: ModelType.DEFAULT,
|
|
180
|
-
functionDefs: getFunctionDefs(), // getFunctionDefs() includes all operation defs
|
|
181
|
-
requiredFunctionName: actionName,
|
|
182
|
-
temperature: 0.1,
|
|
183
|
-
expectedResponseType: { text: false, functionCall: true, media: false },
|
|
184
|
-
}, options);
|
|
185
|
-
let paramFunctionCall = paramResult.find((part) => part.type === 'functionCall')?.functionCall;
|
|
186
|
-
if (!paramFunctionCall?.args) {
|
|
187
|
-
putSystemMessage(`AI failed to generate parameters for action "${actionId}:${actionName}".`);
|
|
188
|
-
parameterInferenceFailed = true;
|
|
189
|
-
return { success: false, actionId };
|
|
190
|
-
}
|
|
191
|
-
if (actionName === 'patchFile') {
|
|
192
|
-
paramFunctionCall = await executeStepVerifyPatch(paramFunctionCall.args, generateContentFn, prompt, getFunctionDefs(), options.temperature, false, options);
|
|
193
|
-
if (!paramFunctionCall || !paramFunctionCall.args) {
|
|
194
|
-
putSystemMessage(`Error verifying patch for action "${actionId}:${actionName}".`);
|
|
195
|
-
parameterInferenceFailed = true;
|
|
196
|
-
return { success: false, actionId };
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
if (filePath) {
|
|
200
|
-
const fileSource = getSourceCode({ filterPaths: [filePath], forceAll: true }, options)[filePath];
|
|
201
|
-
if (fileSource && 'content' in fileSource) {
|
|
202
|
-
paramFunctionCall.args.oldContent = fileSource.content;
|
|
203
|
-
}
|
|
204
|
-
}
|
|
205
|
-
detailedActions.push({ name: actionName, args: paramFunctionCall.args });
|
|
206
|
-
putSystemMessage(`Inferred parameters for ${actionId}:${actionName}`, { ...paramFunctionCall });
|
|
207
|
-
// Add this specific parameter inference to the prompt history for subsequent inferences
|
|
208
|
-
prompt.push({
|
|
209
|
-
type: 'assistant',
|
|
210
|
-
text: `Inferring parameters for ${actionId}:${actionName}.`, // Short text for assistant turn
|
|
211
|
-
functionCalls: [paramFunctionCall],
|
|
212
|
-
}, {
|
|
213
|
-
type: 'user',
|
|
214
|
-
functionResponses: [
|
|
215
|
-
{
|
|
216
|
-
name: paramFunctionCall.name,
|
|
217
|
-
call_id: paramFunctionCall.id,
|
|
218
|
-
content: '', // Empty content for the function response
|
|
219
|
-
},
|
|
220
|
-
],
|
|
221
|
-
});
|
|
222
|
-
completedActionIds.add(actionId);
|
|
223
|
-
return { success: true, actionId };
|
|
224
|
-
}
|
|
225
|
-
catch (error) {
|
|
226
|
-
const errorMessage = error instanceof Error ? error.message : String(error);
|
|
227
|
-
putSystemMessage(`Error inferring parameters for action "${actionName}": ${errorMessage}`);
|
|
228
|
-
parameterInferenceFailed = true;
|
|
229
|
-
return { success: false, actionId };
|
|
230
|
-
}
|
|
231
|
-
}));
|
|
232
|
-
// Filter out processed actions from actionsToInfer
|
|
233
|
-
actionsToInfer = actionsToInfer.filter((action) => !processableActions.find((pa) => pa.id === action.id));
|
|
234
|
-
if (results.some((result) => result.status === 'rejected' || (result.status === 'fulfilled' && !result.value.success))) {
|
|
235
|
-
putSystemMessage('Some actions failed to infer parameters. Stopping parameter inference.');
|
|
236
|
-
parameterInferenceFailed = true;
|
|
237
|
-
break;
|
|
238
|
-
}
|
|
239
|
-
}
|
|
240
|
-
if (parameterInferenceFailed) {
|
|
241
|
-
const assistantMessage = 'I was unable to determine all the necessary parameters for the requested actions. Please review the errors and try again, perhaps with more specific instructions.';
|
|
242
|
-
putAssistantMessage(assistantMessage);
|
|
243
|
-
prompt.push({
|
|
244
|
-
type: 'assistant',
|
|
245
|
-
text: assistantMessage,
|
|
246
|
-
});
|
|
247
|
-
// No user response needed here, assistant states the failure.
|
|
248
|
-
return { breakLoop: false, items: [] };
|
|
249
|
-
}
|
|
250
|
-
// Step 3: Consolidate and Confirm with User
|
|
251
|
-
putSystemMessage('Proposed actions', { actions: detailedActions });
|
|
252
|
-
confirmation = await askUserForConfirmationWithAnswer('Code changes are generated, now what?', 'Apply code changes', 'Reject code changes', true, options);
|
|
253
|
-
if (confirmation.answer) {
|
|
254
|
-
putUserMessage(confirmation.answer);
|
|
255
|
-
}
|
|
256
|
-
if (!confirmation.confirmed) {
|
|
257
|
-
putSystemMessage('User declined code changes.');
|
|
258
|
-
prompt.push({
|
|
259
|
-
type: 'user',
|
|
260
|
-
text: `Rejecting proposed code changes. ${confirmation.answer ?? ''}`,
|
|
261
|
-
});
|
|
262
|
-
return { breakLoop: false, items: [] };
|
|
263
|
-
}
|
|
264
|
-
// Step 4: Execute Actions
|
|
265
|
-
putSystemMessage('User accepted code changes. Applying...');
|
|
266
|
-
let executionError = null;
|
|
267
|
-
let executionErrorMessage = '';
|
|
268
|
-
prompt.push({
|
|
269
|
-
type: 'user', // User confirms the plan
|
|
270
|
-
text: `Applying code changes. ${confirmation.answer ?? 'Yes'}`,
|
|
271
|
-
});
|
|
272
|
-
for (const [index, action] of detailedActions.entries()) {
|
|
273
|
-
putSystemMessage(`Executing action ${index + 1}/${detailedActions.length}: ${action.name}`);
|
|
274
|
-
const executor = getOperationExecutor(action.name);
|
|
275
|
-
if (!executor) {
|
|
276
|
-
executionErrorMessage = `Error: Operation executor not found for action "${action.name}". Skipping this action.`;
|
|
277
|
-
putSystemMessage(executionErrorMessage);
|
|
278
|
-
continue;
|
|
279
|
-
}
|
|
280
|
-
try {
|
|
281
|
-
await executor(action.args, options);
|
|
282
|
-
putSystemMessage(`Action ${action.name} completed successfully.`);
|
|
283
|
-
}
|
|
284
|
-
catch (error) {
|
|
285
|
-
executionError = error instanceof Error ? error : new Error(String(error));
|
|
286
|
-
executionErrorMessage = `Error executing action ${index + 1} (${action.name}): ${executionError.message}. Stopping batch execution.`;
|
|
287
|
-
putSystemMessage(executionErrorMessage);
|
|
288
|
-
}
|
|
289
|
-
}
|
|
290
|
-
const finalAssistantMessage = executionError
|
|
291
|
-
? `Failed to execute the batch: ${executionErrorMessage}`
|
|
292
|
-
: 'Successfully executed all actions in the batch.';
|
|
293
|
-
putAssistantMessage(finalAssistantMessage);
|
|
294
|
-
prompt.push({
|
|
295
|
-
type: 'assistant',
|
|
296
|
-
text: finalAssistantMessage,
|
|
297
|
-
});
|
|
298
|
-
// No final user "Thank you" here, as it would be a new turn.
|
|
299
|
-
return {
|
|
300
|
-
breakLoop: false,
|
|
301
|
-
items: [],
|
|
302
|
-
};
|
|
303
|
-
};
|
|
304
|
-
registerActionHandler('compoundAction', handleCompoundAction);
|
|
305
|
-
//# sourceMappingURL=handle-compound-action.js.map
|