genaicode 0.2.1 → 0.4.1
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 +11 -0
- package/bin/genaicode-dev.js +2 -1
- package/bin/genaicode.cjs +4 -4
- package/dist/ai-service/ai-studio.js +65 -10
- package/dist/ai-service/ai-studio.js.map +1 -1
- package/dist/ai-service/anthropic.js +22 -8
- package/dist/ai-service/anthropic.js.map +1 -1
- package/dist/ai-service/chat-gpt.js +22 -10
- package/dist/ai-service/chat-gpt.js.map +1 -1
- package/dist/ai-service/common.d.ts +20 -7
- package/dist/ai-service/common.js +9 -6
- package/dist/ai-service/common.js.map +1 -1
- package/dist/ai-service/common.test.js +3 -3
- package/dist/ai-service/common.test.js.map +1 -1
- package/dist/ai-service/unescape-function-call.d.ts +7 -0
- package/dist/ai-service/unescape-function-call.js +59 -0
- package/dist/ai-service/unescape-function-call.js.map +1 -0
- package/dist/ai-service/unescape-function-call.test.js +18 -0
- package/dist/ai-service/unescape-function-call.test.js.map +1 -0
- package/dist/ai-service/vertex-ai-claude.js +11 -4
- package/dist/ai-service/vertex-ai-claude.js.map +1 -1
- package/dist/ai-service/vertex-ai.d.ts +1 -1
- package/dist/ai-service/vertex-ai.js +73 -14
- package/dist/ai-service/vertex-ai.js.map +1 -1
- package/dist/cli/cli-options.js +8 -0
- package/dist/cli/cli-options.js.map +1 -1
- package/dist/cli/cli-params.d.ts +6 -0
- package/dist/cli/cli-params.js +25 -4
- package/dist/cli/cli-params.js.map +1 -1
- package/dist/cli/validate-cli-params.js +11 -1
- package/dist/cli/validate-cli-params.js.map +1 -1
- package/dist/files/cache-file.d.ts +3 -0
- package/dist/files/cache-file.js +36 -0
- package/dist/files/cache-file.js.map +1 -0
- package/dist/files/find-files.d.ts +1 -0
- package/dist/files/find-files.js +7 -2
- package/dist/files/find-files.js.map +1 -1
- package/dist/files/read-files.d.ts +6 -3
- package/dist/files/read-files.js +7 -5
- package/dist/files/read-files.js.map +1 -1
- package/dist/files/read-files.test.js +2 -1
- package/dist/files/read-files.test.js.map +1 -1
- package/dist/files/update-files.js +1 -4
- package/dist/files/update-files.js.map +1 -1
- package/dist/main/codegen-types.d.ts +15 -0
- package/dist/main/codegen.d.ts +2 -2
- package/dist/main/codegen.js +91 -52
- package/dist/main/codegen.js.map +1 -1
- package/dist/main/codegen.test.d.ts +1 -0
- package/dist/main/codegen.test.js +24 -8
- package/dist/main/codegen.test.js.map +1 -1
- package/dist/main/common/content-bus-types.d.ts +16 -0
- package/dist/main/common/content-bus-types.js +7 -0
- package/dist/main/common/content-bus-types.js.map +1 -0
- package/dist/main/common/content-bus.d.ts +9 -0
- package/dist/main/common/content-bus.js +25 -0
- package/dist/main/common/content-bus.js.map +1 -0
- package/dist/main/common/cost-collector.d.ts +11 -0
- package/dist/main/common/cost-collector.js +90 -0
- package/dist/main/common/cost-collector.js.map +1 -0
- package/dist/main/common/user-actions.d.ts +7 -0
- package/dist/main/common/user-actions.js +15 -0
- package/dist/main/common/user-actions.js.map +1 -0
- package/dist/main/config-lib.d.ts +19 -0
- package/dist/main/config-lib.js.map +1 -1
- package/dist/main/config.d.ts +2 -1
- package/dist/main/config.js +3 -0
- package/dist/main/config.js.map +1 -1
- package/dist/main/interactive/codegen-interactive.js +8 -2
- package/dist/main/interactive/codegen-interactive.js.map +1 -1
- package/dist/main/interactive/codegen-interactive.test.d.ts +1 -0
- package/dist/main/interactive/codegen-interactive.test.js +2 -0
- package/dist/main/interactive/codegen-interactive.test.js.map +1 -1
- package/dist/main/interactive/codegen-worker.d.ts +1 -1
- package/dist/main/interactive/codegen-worker.js +10 -4
- package/dist/main/interactive/codegen-worker.js.map +1 -1
- package/dist/main/interactive/task-file.js +9 -2
- package/dist/main/interactive/task-file.js.map +1 -1
- package/dist/main/interactive/user-action-handlers.d.ts +1 -0
- package/dist/main/interactive/user-action-handlers.js +13 -0
- package/dist/main/interactive/user-action-handlers.js.map +1 -0
- package/dist/main/interactive/user-interrupt.js +1 -1
- package/dist/main/interactive/user-interrupt.js.map +1 -1
- package/dist/main/ui/backend/api-utils.d.ts +2 -0
- package/dist/main/ui/backend/api-utils.js +18 -0
- package/dist/main/ui/backend/api-utils.js.map +1 -0
- package/dist/main/ui/backend/api.d.ts +2 -0
- package/dist/main/ui/backend/api.js +186 -0
- package/dist/main/ui/backend/api.js.map +1 -0
- package/dist/main/ui/backend/server.d.ts +2 -0
- package/dist/main/ui/backend/server.js +85 -0
- package/dist/main/ui/backend/server.js.map +1 -0
- package/dist/main/ui/backend/service.d.ts +48 -0
- package/dist/main/ui/backend/service.js +161 -0
- package/dist/main/ui/backend/service.js.map +1 -0
- package/dist/main/ui/codegen-ui.d.ts +2 -0
- package/dist/main/ui/codegen-ui.js +13 -0
- package/dist/main/ui/codegen-ui.js.map +1 -0
- package/dist/main/ui/frontend/assets/index-Bj9ZkmiD.js +638 -0
- package/dist/main/ui/frontend/assets/index-S_ocA1xG.css +1 -0
- 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/index.html +16 -0
- package/dist/main/ui/user-action-handlers.d.ts +2 -0
- package/dist/main/ui/user-action-handlers.js +9 -0
- package/dist/main/ui/user-action-handlers.js.map +1 -0
- package/dist/prompt/ai-service-fallback.d.ts +3 -0
- package/dist/prompt/ai-service-fallback.js +84 -0
- package/dist/prompt/ai-service-fallback.js.map +1 -0
- package/dist/prompt/function-calling-validate.js +70 -4
- package/dist/prompt/function-calling-validate.js.map +1 -1
- package/dist/prompt/function-calling.js +11 -1
- package/dist/prompt/function-calling.js.map +1 -1
- package/dist/prompt/function-defs/ask-question-reflect.d.ts +20 -0
- package/dist/prompt/function-defs/ask-question-reflect.js +21 -0
- package/dist/prompt/function-defs/ask-question-reflect.js.map +1 -0
- package/dist/prompt/function-defs/ask-question.d.ts +31 -20
- package/dist/prompt/function-defs/ask-question.js +51 -21
- package/dist/prompt/function-defs/ask-question.js.map +1 -1
- package/dist/prompt/function-defs/codegen-summary.d.ts +23 -21
- package/dist/prompt/function-defs/codegen-summary.js +28 -28
- package/dist/prompt/function-defs/codegen-summary.js.map +1 -1
- package/dist/prompt/function-defs/create-file.d.ts +4 -4
- package/dist/prompt/function-defs/create-file.js +4 -4
- package/dist/prompt/function-defs/create-file.js.map +1 -1
- package/dist/prompt/function-defs/delete-file.d.ts +4 -4
- package/dist/prompt/function-defs/delete-file.js +4 -4
- package/dist/prompt/function-defs/delete-file.js.map +1 -1
- package/dist/prompt/function-defs/generate-image.d.ts +4 -4
- package/dist/prompt/function-defs/generate-image.js +4 -4
- package/dist/prompt/function-defs/generate-image.js.map +1 -1
- package/dist/prompt/function-defs/get-source-code.d.ts +1 -1
- package/dist/prompt/function-defs/get-source-code.js +2 -1
- package/dist/prompt/function-defs/get-source-code.js.map +1 -1
- package/dist/prompt/function-defs/move-file.d.ts +4 -4
- package/dist/prompt/function-defs/move-file.js +4 -4
- package/dist/prompt/function-defs/move-file.js.map +1 -1
- package/dist/prompt/function-defs/optimize-context.d.ts +46 -0
- package/dist/prompt/function-defs/optimize-context.js +47 -0
- package/dist/prompt/function-defs/optimize-context.js.map +1 -0
- package/dist/prompt/function-defs/patch-file.d.ts +4 -4
- package/dist/prompt/function-defs/patch-file.js +4 -4
- package/dist/prompt/function-defs/patch-file.js.map +1 -1
- package/dist/prompt/function-defs/read-history.d.ts +13 -0
- package/dist/prompt/function-defs/read-history.js +14 -0
- package/dist/prompt/function-defs/read-history.js.map +1 -0
- package/dist/prompt/function-defs/set-summaries.d.ts +31 -0
- package/dist/prompt/function-defs/set-summaries.js +32 -0
- package/dist/prompt/function-defs/set-summaries.js.map +1 -0
- package/dist/prompt/function-defs/update-file.d.ts +4 -4
- package/dist/prompt/function-defs/update-file.js +4 -4
- package/dist/prompt/function-defs/update-file.js.map +1 -1
- package/dist/prompt/function-defs/update-history.d.ts +21 -0
- package/dist/prompt/function-defs/update-history.js +22 -0
- package/dist/prompt/function-defs/update-history.js.map +1 -0
- package/dist/prompt/limits.d.ts +3 -3
- package/dist/prompt/limits.js +10 -8
- package/dist/prompt/limits.js.map +1 -1
- package/dist/prompt/limits.test.js +6 -6
- package/dist/prompt/limits.test.js.map +1 -1
- package/dist/prompt/prompt-codegen.js +52 -25
- package/dist/prompt/prompt-codegen.js.map +1 -1
- package/dist/prompt/prompt-codegen.test.js +2 -2
- package/dist/prompt/prompt-codegen.test.js.map +1 -1
- package/dist/prompt/prompt-service-ask-question.test.d.ts +1 -0
- package/dist/prompt/prompt-service-ask-question.test.js +86 -13
- package/dist/prompt/prompt-service-ask-question.test.js.map +1 -1
- package/dist/prompt/prompt-service.d.ts +3 -10
- package/dist/prompt/prompt-service.js +66 -23
- package/dist/prompt/prompt-service.js.map +1 -1
- package/dist/prompt/prompt-service.test.d.ts +1 -0
- package/dist/prompt/prompt-service.test.js +73 -48
- package/dist/prompt/prompt-service.test.js.map +1 -1
- package/dist/prompt/steps/step-ask-question-handlers.d.ts +10 -0
- package/dist/prompt/steps/step-ask-question-handlers.js +265 -0
- package/dist/prompt/steps/step-ask-question-handlers.js.map +1 -0
- package/dist/prompt/steps/step-ask-question-reflect.d.ts +4 -0
- package/dist/prompt/steps/step-ask-question-reflect.js +40 -0
- package/dist/prompt/steps/step-ask-question-reflect.js.map +1 -0
- package/dist/prompt/steps/step-ask-question-types.d.ts +60 -0
- package/dist/prompt/steps/step-ask-question-types.js +2 -0
- package/dist/prompt/steps/step-ask-question-types.js.map +1 -0
- package/dist/prompt/steps/step-ask-question.d.ts +3 -3
- package/dist/prompt/steps/step-ask-question.js +69 -69
- package/dist/prompt/steps/step-ask-question.js.map +1 -1
- package/dist/prompt/steps/step-context-optimization.d.ts +4 -0
- package/dist/prompt/steps/step-context-optimization.js +193 -0
- package/dist/prompt/steps/step-context-optimization.js.map +1 -0
- package/dist/prompt/steps/step-history-update.d.ts +5 -0
- package/dist/prompt/steps/step-history-update.js +54 -0
- package/dist/prompt/steps/step-history-update.js.map +1 -0
- package/dist/prompt/steps/step-summarization.d.ts +8 -0
- package/dist/prompt/steps/step-summarization.js +75 -0
- package/dist/prompt/steps/step-summarization.js.map +1 -0
- package/dist/prompt/steps/step-validate-recover.d.ts +2 -13
- package/dist/prompt/steps/step-validate-recover.js +3 -3
- package/dist/prompt/steps/step-validate-recover.js.map +1 -1
- package/dist/prompt/steps/step-verify-patch.d.ts +1 -2
- package/dist/prompt/steps/step-verify-patch.js +3 -10
- package/dist/prompt/steps/step-verify-patch.js.map +1 -1
- package/dist/prompt/steps/steps-types.d.ts +16 -0
- package/dist/prompt/steps/steps-utils.d.ts +7 -0
- package/dist/prompt/steps/steps-utils.js +11 -0
- package/dist/prompt/steps/steps-utils.js.map +1 -0
- package/dist/prompt/systemprompt.d.ts +1 -1
- package/dist/prompt/systemprompt.js +194 -32
- package/dist/prompt/systemprompt.js.map +1 -1
- package/dist/prompt/systemprompt.test.js +5 -8
- package/dist/prompt/systemprompt.test.js.map +1 -1
- package/dist/prompt/token-estimator.d.ts +8 -0
- package/dist/prompt/token-estimator.js +31 -0
- package/dist/prompt/token-estimator.js.map +1 -0
- package/package.json +28 -4
- package/dist/main/codegen-interactive-utils.d.ts +0 -8
- package/dist/main/codegen-interactive-utils.js +0 -148
- package/dist/main/codegen-interactive-utils.js.map +0 -1
- package/dist/main/codegen-interactive.d.ts +0 -2
- package/dist/main/codegen-interactive.js +0 -68
- package/dist/main/codegen-interactive.js.map +0 -1
- package/dist/main/interactive/worker-script.js +0 -24
- package/dist/main/interactive/worker-script.js.map +0 -1
- package/dist/main/interactive/worker.d.ts +0 -2
- package/dist/main/interactive/worker.js +0 -55
- package/dist/main/interactive/worker.js.map +0 -1
- /package/dist/{main/interactive/worker-script.d.ts → ai-service/unescape-function-call.test.d.ts} +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{font-family:"Press Start 2P";font-style:normal;font-display:swap;font-weight:400;src:url(/assets/press-start-2p-cyrillic-ext-400-normal-COIQET2s.woff2) format("woff2"),url(data:font/woff;base64,d09GRgABAAAAAAy4AAwAAAAAIggAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHU1VCAAABHAAAACcAAAAouPy46k9TLzIAAAFEAAAASQAAAGBn+pnZY21hcAAAAZAAAAEDAAABbE73dwFnYXNwAAAClAAAAAgAAAAIAAAAEGdseWYAAAKcAAAGpgAAF4j6A0EraGVhZAAACUQAAAA1AAAANgh1R95oaGVhAAAJfAAAABoAAAAkBKcD7GhtdHgAAAmYAAAAJAAAALgLOwLubG9jYQAACbwAAAC0AAAAtP8pBR5tYXhwAAAKcAAAABwAAAAgAG4AXm5hbWUAAAqMAAABBQAAAkovcUtlcG9zdAAAC5QAAAEjAAADgWtC4K942mNgZGBg4GJQA0ImFzefEAahnMSSPAY+BhBgARH//4NIAFpJBVUAeNpjYGF+wTiBgZWBgamLKYKBgcEbQjPGMRgxHgLygVIwwMTIgAScI4NcGQ4wMChsYX4B4gPNKVNgYJgPVvkOLKbAwAwAPREMygAAAHjafIqBBkJBAMB2tSMICEQcij4pAAUUEP1IAEQQBEGCIAEUAYh4FAgCQuDKE4A3bDCgBtSB1s+hrGEA9ElIA2iSHDlx5sKVG/cePXu18OkndmIvbXOG/zl07NS5S9fuPHjy4s27r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dEaI9HvFqTpWBVlk+bv1n4AAAAeNpsytOBAwAUALCX8mzbZs+2jWrQrlcM0HwnEhEREbVK5KKZcoREYyUlpaRlZLVo1aZdh05duvXo1affgEFDho0YNWbchElTps2YNWfegkVLlq1YtWbdhk1btu3YlbNn34FDR46dOHXm3IVLV67duHXn3oNHT569ePXm3YdPX779+PXnX15BMfWZf3/P1lWalwlogT5MIAZiAAi2ZF/0kS/Y/Zf08BrSIFgh0FVa4gx7YglHYmHjw8kdzouxV1MxT26+4Wp8qNsXb67wXExsfLj5hm9iYeND3XcxsbAx+npPutMyV9gzazgyKzsHF084b2b/q+bFwy9cnYO6/TFxh+dmZufgof03s7JzUPfdzKzsHP626M4s1J/C/5yuVX5pVsypAA==) format("woff");unicode-range:U+0460-052F,U+1C80-1C88,U+20B4,U+2DE0-2DFF,U+A640-A69F,U+FE2E-FE2F}@font-face{font-family:"Press Start 2P";font-style:normal;font-display:swap;font-weight:400;src:url(/assets/press-start-2p-cyrillic-400-normal-oElOGqNf.woff2) format("woff2"),url(data:font/woff;base64,d09GRgABAAAAAA3MAA0AAAAAJNwAAQABAAAAAAAAAAAAAAAAAAAAAAAAAABHREVGAAABMAAAABQAAAAUAA8AbEdTVUIAAAFEAAAAJwAAACi4/LjqT1MvMgAAAWwAAABJAAAAYGf6mjtjbWFwAAABuAAAANAAAAEwa2IDFmdhc3AAAAKIAAAACAAAAAgAAAAQZ2x5ZgAAApAAAAdqAAAYtCQw2fRoZWFkAAAJ/AAAADUAAAA2CHVH3mhoZWEAAAo0AAAAGgAAACQEpwRTaG10eAAAClAAAAAnAAABqJZBBW5sb2NhAAAKeAAAANYAAADWRR8/TW1heHAAAAtQAAAAHAAAACAAfwBebmFtZQAAC2wAAAEFAAACSi9xS2Vwb3N0AAAMdAAAAVYAAAQtpri5sAABAAAADAAAAAAAAAABAGkAAQADeNpjYGRgYOBiUANCJhc3nxAGoZzEkjwGPgYQYAER//+DSABaSQVVAHjaY2BhfsE4gYGVgYGpiymCgYH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/AkaCSwJRwlqCZMJvgnUCeoKAAobCjIKSwpmCoAKnAq5CtcK+QsbCzYLVQtwC44LsgvPC/EMEgxIDFoAAHjaY2BkYGDIYrBg4GFQYWAH8RAAyGMEABWHAN542o2QA24EUBBAX+3GqH82qG27QW27axvH6bEa9QQ9QydTrjdf749ngFpsVFBWWQe8ldWjTBntfKBMOc28oyz3Eq8oU8kAMZSpopUblKmmhwmUaRYCBxFZAeYYlhXmmRBO+UeEhwgLexjCL1K76PfZYocDQlgJyzomwiMhucdEOsgRVuxE8aj0DCshjeHHh2GcIUZ0/UUw/MUwGsVkRPnzmmedS9FuCpVYQ8avUN51/ARIav92HKicEUblNpyIxIopXLlq/biw8qzSVaJEcOj8xIMenoVfSLJCSqdiZZwZhpQi9DKAIY5TvXQShHWKMblfMGypV0Roj0e8WpOlYFWWT5u/WfgAAAB42mJgYgCD/1sZjBiwAQCD8pCgAAAAALCJa9u2bdu2venW/2vOEw8EBHMrJCQsIiomT74ChYoUK1GqTLkKlapUq1GrTr0GjZo0a9GqTbsOnbp069GrT78Bg4YMGzFqzLgJk6ZMmzFrzrwFi5YsW7FqzboNm7Zs27Frz74Dh44cO3HqzLkLl65cu3Hrzr0Hj548e/HqzbsPn758+/HrL3xyfXQUy6T/szTJhwkEMQwF0ZYk23IgO/Zf0nH8WdJjGCtu6JgwS8Nh0guGNEOXXrFhxyHt0JPe9MKNBy8+mQwdE2Zply4Y2LBixyHt0RsnLmkDJwYWmQ5dsWHHJdPFJy3JZTJ/OibMMnB8v2DIMPx+xYYdh4xDT3rTCzcevPhkMXRMmGVcumBgw4odh4xHb5y4ZAycGFhkOXTFhh2XLBefjCSX/03u9TfOxOTSktTk/NwkALFV9RoAAA==) format("woff");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:"Press Start 2P";font-style:normal;font-display:swap;font-weight:400;src:url(/assets/press-start-2p-greek-400-normal-DUIT0YPZ.woff2) format("woff2"),url(data:font/woff;base64,d09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GFgB/EQAMhjBAAS5ADFeNqNkANuBFAQQF/txqh/Nqhtu0Ftu2sbx+mxGvUEPUMnU643X++PZ4BabFRQVlkHvJXVo0wZ7XygTDnNvKMs9xKvKFPJADGUqaKVG5SppocJlGkWAgcRWQHmGJYV5pkQTvlHhIcIC3sYwi9Su+j32WKHA0JYCcs6JsIjIbnHRDrIEVbsRPGo9AwrIY3hx4dhnCFGdP1FMPzFMBrFZET585pnnUvRbgqVWEPGr1DedfwESGr/dhyonBFG5TaciMSKKVy5av24sPKs0lWiRHDo/MSDHp6FX0iyQkqnYmWcGYaUIvQygCGOU710EoR1ijG5XzBsqVdEaI9HvFqTpWBVlk+bv1n4AAAAeNpiYGIAg/9bGYwYsIFAAIPykOAAEAAAbLJd23Zt28YX+9k254TgYL8ioRy6oS/i0JFjJ06dOXfh0pVrN27duffg0ZNnL169effh05dvP379+RcVE5eQlJKWkZWTV1BUUlYJW1U1dQ1NLW0dXT19A0MjYxNTM3MLSytrG7sqyEK5YRgGw3eGMW/vMabDMTNvh2rrSxRyqPj0M211WL+Fn27Zw/vdHT9O8hDYiaiBX0KawmQ3w43tw53J87zCRGbsR7nouXK/hcpi11KZt5DnMHEHaasD5L5LHrrkCycfU2yXMiNPSF9CyV8xSIG+QXfy3ZaiTyHSU/U+VWjbHB/OmP61zGQ15zoaMaU6GmNaNXR+V9+Kdy945jEVgQvS4R0UpaiwWnRBf5qDgW1p2EDD8o5IapgUDnWkUbWzNqioUWODmhhUO/TJKcm6ZICT0s5Dy1Baz+kWrwx0raC7DjpXwG31KsmlnnMa/4nQG3bZF9bd9RgXu02WtaZ2GdJb0YzpZk0Yb1n4WxZuEjv//vE0ZLIWiUBwJ+fc+OcbbX4BhZvZfQAA) format("woff");unicode-range:U+0370-0377,U+037A-037F,U+0384-038A,U+038C,U+038E-03A1,U+03A3-03FF}@font-face{font-family:"Press Start 2P";font-style:normal;font-display:swap;font-weight:400;src:url(/assets/press-start-2p-latin-ext-400-normal-DDIa4im3.woff2) format("woff2"),url(/assets/press-start-2p-latin-ext-400-normal-B18ub5-k.woff) format("woff");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:"Press Start 2P";font-style:normal;font-display:swap;font-weight:400;src:url(/assets/press-start-2p-latin-400-normal-xj9lRvVs.woff2) format("woff2"),url(/assets/press-start-2p-latin-400-normal-BKfmdmKK.woff) format("woff");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
<!doctype html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
6
|
+
<meta name="description" content="GenAIcode - AI-powered code generation and management tool" />
|
|
7
|
+
<meta name="keywords" content="GenAIcode, AI, code generation, programming" />
|
|
8
|
+
<title>GenAIcode - AI-Powered Code Generation</title>
|
|
9
|
+
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-Bj9ZkmiD.js"></script>
|
|
11
|
+
<link rel="stylesheet" crossorigin href="/assets/index-S_ocA1xG.css">
|
|
12
|
+
</head>
|
|
13
|
+
<body data-security-token="__SECURITY_TOKEN__">
|
|
14
|
+
<div id="root"></div>
|
|
15
|
+
</body>
|
|
16
|
+
</html>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { registerConfirmHandler, registerInputHandler } from '../common/user-actions.js';
|
|
2
|
+
export function registerUserActionHandlers(service) {
|
|
3
|
+
registerInputHandler((_, message) => service.askQuestion(message, false));
|
|
4
|
+
registerConfirmHandler(async (message) => {
|
|
5
|
+
const response = await service.askQuestion(message, true);
|
|
6
|
+
return response.toLowerCase() === 'yes';
|
|
7
|
+
});
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=user-action-handlers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"user-action-handlers.js","sourceRoot":"","sources":["../../../src/main/ui/user-action-handlers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAGzF,MAAM,UAAU,0BAA0B,CAAC,OAAgB;IACzD,oBAAoB,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;IAC1E,sBAAsB,CAAC,KAAK,EAAE,OAAe,EAAE,EAAE;QAC/C,MAAM,QAAQ,GAAG,MAAM,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,IAAI,CAAC,CAAC;QAC1D,OAAO,QAAQ,CAAC,WAAW,EAAE,KAAK,KAAK,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AiServiceType, CodegenOptions } from '../main/codegen-types.js';
|
|
2
|
+
import { GenerateContentFunction } from '../ai-service/common.js';
|
|
3
|
+
export declare function handleAiServiceFallback(generateContentFns: Record<AiServiceType, GenerateContentFunction>, currentService: AiServiceType, options: CodegenOptions, ...args: Parameters<GenerateContentFunction>): Promise<ReturnType<GenerateContentFunction>>;
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { putSystemMessage } from '../main/common/content-bus.js';
|
|
2
|
+
import { askUserForConfirmation } from '../main/common/user-actions.js';
|
|
3
|
+
import { abortController } from '../main/interactive/codegen-worker.js';
|
|
4
|
+
const AI_SERVICES_MAP = [
|
|
5
|
+
[() => process.env.ANTHROPIC_API_KEY, 'anthropic'],
|
|
6
|
+
[() => process.env.GOOGLE_CLOUD_PROJECT && process.env.GOOGLE_CLOUD_REGION, 'vertex-ai-claude'],
|
|
7
|
+
[() => process.env.OPENAI_API_KEY, 'chat-gpt'],
|
|
8
|
+
[() => process.env.GOOGLE_CLOUD_PROJECT, 'vertex-ai'],
|
|
9
|
+
[() => process.env.API_KEY, 'ai-studio'],
|
|
10
|
+
];
|
|
11
|
+
export async function handleAiServiceFallback(generateContentFns, currentService, options, ...args) {
|
|
12
|
+
let retryCount = 0;
|
|
13
|
+
const maxRetries = AI_SERVICES_MAP.length;
|
|
14
|
+
let permanentService = currentService;
|
|
15
|
+
while (retryCount < maxRetries) {
|
|
16
|
+
if (abortController?.signal.aborted) {
|
|
17
|
+
putSystemMessage(`Operation interrupted for ${permanentService}`);
|
|
18
|
+
throw new Error(`Operation interrupted`);
|
|
19
|
+
}
|
|
20
|
+
try {
|
|
21
|
+
const result = await generateContentFns[permanentService](...args);
|
|
22
|
+
options.aiService = permanentService;
|
|
23
|
+
return result;
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
if (error instanceof Error) {
|
|
27
|
+
// Check if the error is due to an interruption
|
|
28
|
+
if (error.name === 'AbortError' || error.message.includes('interrupted')) {
|
|
29
|
+
putSystemMessage(`Operation interrupted for ${permanentService}`);
|
|
30
|
+
throw error; // Re-throw the interruption error
|
|
31
|
+
}
|
|
32
|
+
if (error.message.includes('Rate limit exceeded')) {
|
|
33
|
+
putSystemMessage(`Rate limit exceeded for ${permanentService}`);
|
|
34
|
+
if (options.disableAiServiceFallback) {
|
|
35
|
+
if (options.interactive || options.ui) {
|
|
36
|
+
const nextService = getNextAiService(permanentService);
|
|
37
|
+
if (nextService) {
|
|
38
|
+
const shouldSwitch = await askUserForConfirmation(`Rate limit exceeded for ${permanentService}. Would you like to switch to ${nextService}?`, true);
|
|
39
|
+
if (shouldSwitch) {
|
|
40
|
+
putSystemMessage(`Switching to ${nextService} due to rate limiting.`);
|
|
41
|
+
permanentService = nextService;
|
|
42
|
+
retryCount++;
|
|
43
|
+
continue;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
throw new Error(`Rate limit exceeded for ${permanentService}. AI service fallback is disabled.`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
const nextService = getNextAiService(permanentService);
|
|
53
|
+
if (nextService) {
|
|
54
|
+
putSystemMessage(`Rate limit exceeded for ${permanentService}. Automatically switching to ${nextService}.`);
|
|
55
|
+
permanentService = nextService;
|
|
56
|
+
retryCount++;
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
throw new Error(`Rate limit exceeded for ${permanentService}. AI service fallback was not possible.`);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
else {
|
|
64
|
+
// For other types of errors, re-throw
|
|
65
|
+
throw error;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
// If it's not an Error instance, re-throw
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
throw new Error('All AI services have been exhausted due to rate limiting.');
|
|
75
|
+
}
|
|
76
|
+
function getNextAiService(currentService) {
|
|
77
|
+
const options = AI_SERVICES_MAP.filter(([check]) => check()).map(([, service]) => service);
|
|
78
|
+
const currentIndex = options.indexOf(currentService);
|
|
79
|
+
if (currentIndex === -1 || currentIndex === options.length - 1) {
|
|
80
|
+
return undefined;
|
|
81
|
+
}
|
|
82
|
+
return options[currentIndex + 1];
|
|
83
|
+
}
|
|
84
|
+
//# sourceMappingURL=ai-service-fallback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ai-service-fallback.js","sourceRoot":"","sources":["../../src/prompt/ai-service-fallback.ts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B,gBAAgB,gCAAgC,WAAW,GAAG,CAC1F,CAAC;4BACF,gBAAgB,GAAG,WAAW,CAAC;4BAC/B,UAAU,EAAE,CAAC;wBACf,CAAC;6BAAM,CAAC;4BACN,MAAM,IAAI,KAAK,CAAC,2BAA2B,gBAAgB,yCAAyC,CAAC,CAAC;wBACxG,CAAC;oBACH,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,sCAAsC;oBACtC,MAAM,KAAK,CAAC;gBACd,CAAC;YACH,CAAC;iBAAM,CAAC;gBACN,0CAA0C;gBAC1C,MAAM,KAAK,CAAC;YACd,CAAC;QACH,CAAC;IACH,CAAC;IACD,MAAM,IAAI,KAAK,CAAC,2DAA2D,CAAC,CAAC;AAC/E,CAAC;AAED,SAAS,gBAAgB,CAAC,cAA6B;IACrD,MAAM,OAAO,GAAG,eAAe,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,OAAO,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,CAAC;IAC3F,MAAM,YAAY,GAAG,OAAO,CAAC,OAAO,CAAC,cAAc,CAAC,CAAC;IACrD,IAAI,YAAY,KAAK,CAAC,CAAC,IAAI,YAAY,KAAK,OAAO,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC/D,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,OAAO,OAAO,CAAC,YAAY,GAAG,CAAC,CAAC,CAAC;AACnC,CAAC"}
|
|
@@ -1,21 +1,87 @@
|
|
|
1
1
|
import { Validator } from 'jsonschema';
|
|
2
|
+
import path from 'path';
|
|
2
3
|
import { functionDefs } from './function-calling.js';
|
|
4
|
+
import { rcConfig } from '../main/config.js';
|
|
3
5
|
export function validateFunctionCall(call, requiredFunctionName) {
|
|
4
6
|
const validator = new Validator();
|
|
5
7
|
const functionDef = functionDefs.find((def) => def.name === call?.name);
|
|
8
|
+
// Step 1: Check if the function name matches
|
|
6
9
|
if (!call || call.name !== requiredFunctionName) {
|
|
7
|
-
return makeError(`Function "${requiredFunctionName}" was not called.`, call);
|
|
10
|
+
return makeError(`Function "${requiredFunctionName}" was not called.`, call, '');
|
|
8
11
|
}
|
|
12
|
+
// Step 2: Check if the function is defined
|
|
9
13
|
if (!functionDef) {
|
|
10
|
-
return makeError(`Function "${call.name}" is not defined.`, call);
|
|
14
|
+
return makeError(`Function "${call.name}" is not defined.`, call, '');
|
|
11
15
|
}
|
|
16
|
+
// Step 3: Validate against the schema
|
|
12
17
|
const validationResult = validator.validate(call.args, functionDef.parameters);
|
|
13
18
|
if (validationResult.errors.length > 0) {
|
|
14
19
|
return validationResult;
|
|
15
20
|
}
|
|
21
|
+
// Step 4: Validate file paths
|
|
22
|
+
const filePathValidationError = validateFilePaths(call);
|
|
23
|
+
if (filePathValidationError) {
|
|
24
|
+
return filePathValidationError;
|
|
25
|
+
}
|
|
16
26
|
return undefined;
|
|
17
27
|
}
|
|
18
|
-
function
|
|
28
|
+
function validateFilePaths(call) {
|
|
29
|
+
const rootDir = path.normalize(rcConfig.rootDir);
|
|
30
|
+
function checkPaths(obj, parentKey = '') {
|
|
31
|
+
const errors = [];
|
|
32
|
+
if (Array.isArray(obj)) {
|
|
33
|
+
obj.forEach((item, index) => {
|
|
34
|
+
if (typeof item === 'string' && isPathProperty(parentKey)) {
|
|
35
|
+
errors.push(...validatePath(item, `${parentKey}[${index}]`));
|
|
36
|
+
}
|
|
37
|
+
else if (typeof item === 'object' && item !== null) {
|
|
38
|
+
errors.push(...checkPaths(item, `${parentKey}[${index}]`));
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
else if (typeof obj === 'object' && obj !== null) {
|
|
43
|
+
for (const [key, value] of Object.entries(obj)) {
|
|
44
|
+
const currentKey = parentKey ? `${parentKey}.${key}` : key;
|
|
45
|
+
if (typeof value === 'string' && isPathProperty(key)) {
|
|
46
|
+
errors.push(...validatePath(value, currentKey));
|
|
47
|
+
}
|
|
48
|
+
else if (Array.isArray(value) || (typeof value === 'object' && value !== null)) {
|
|
49
|
+
errors.push(...checkPaths(value, currentKey));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
return errors;
|
|
54
|
+
}
|
|
55
|
+
function validatePath(value, key) {
|
|
56
|
+
const errors = [];
|
|
57
|
+
const normalizedPath = path.normalize(value);
|
|
58
|
+
if (!path.isAbsolute(value)) {
|
|
59
|
+
errors.push(makeError(`File path "${value}" is not absolute.`, call, key).errors[0]);
|
|
60
|
+
}
|
|
61
|
+
else if (!normalizedPath.startsWith(rootDir)) {
|
|
62
|
+
errors.push(makeError(`File path "${value}" is not inside the root directory "${rootDir}".`, call, key).errors[0]);
|
|
63
|
+
}
|
|
64
|
+
return errors;
|
|
65
|
+
}
|
|
66
|
+
const errors = checkPaths(call.args);
|
|
67
|
+
if (errors.length > 0) {
|
|
68
|
+
return { errors, valid: false };
|
|
69
|
+
}
|
|
70
|
+
return undefined;
|
|
71
|
+
}
|
|
72
|
+
function isPathProperty(prop) {
|
|
73
|
+
return [
|
|
74
|
+
'filePath',
|
|
75
|
+
'source',
|
|
76
|
+
'destination',
|
|
77
|
+
'inputFilePath',
|
|
78
|
+
'outputFilePath',
|
|
79
|
+
'contextPaths',
|
|
80
|
+
'filePaths',
|
|
81
|
+
'requestFilesContent',
|
|
82
|
+
].includes(prop);
|
|
83
|
+
}
|
|
84
|
+
function makeError(message, call, propertyPath) {
|
|
19
85
|
return {
|
|
20
86
|
errors: [
|
|
21
87
|
{
|
|
@@ -25,7 +91,7 @@ function makeError(message, call) {
|
|
|
25
91
|
valid: false,
|
|
26
92
|
instance: call,
|
|
27
93
|
schema: {},
|
|
28
|
-
propertyPath
|
|
94
|
+
propertyPath,
|
|
29
95
|
disableFormat: false,
|
|
30
96
|
throwError: true,
|
|
31
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-calling-validate.js","sourceRoot":"","sources":["../../src/prompt/function-calling-validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4C,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"function-calling-validate.js","sourceRoot":"","sources":["../../src/prompt/function-calling-validate.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA4C,MAAM,YAAY,CAAC;AACjF,OAAO,IAAI,MAAM,MAAM,CAAC;AAExB,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,MAAM,UAAU,oBAAoB,CAClC,IAA8B,EAC9B,oBAA4B;IAE5B,MAAM,SAAS,GAAG,IAAI,SAAS,EAAE,CAAC;IAClC,MAAM,WAAW,GAA4B,YAAY,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,KAAK,IAAI,EAAE,IAAI,CAAC,CAAC;IAEjG,6CAA6C;IAC7C,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,IAAI,KAAK,oBAAoB,EAAE,CAAC;QAChD,OAAO,SAAS,CAAC,aAAa,oBAAoB,mBAAmB,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACnF,CAAC;IAED,2CAA2C;IAC3C,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,OAAO,SAAS,CAAC,aAAa,IAAI,CAAC,IAAI,mBAAmB,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC;IACxE,CAAC;IAED,sCAAsC;IACtC,MAAM,gBAAgB,GAAoB,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,EAAE,WAAW,CAAC,UAA+B,CAAC,CAAC;IAErH,IAAI,gBAAgB,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACvC,OAAO,gBAAgB,CAAC;IAC1B,CAAC;IAED,8BAA8B;IAC9B,MAAM,uBAAuB,GAAG,iBAA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;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,cAAc,CAAC,IAAY;IAClC,OAAO;QACL,UAAU;QACV,QAAQ;QACR,aAAa;QACb,eAAe;QACf,gBAAgB;QAChB,cAAc;QACd,WAAW;QACX,qBAAqB;KACtB,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC;AACnB,CAAC;AAED,SAAS,SAAS,CAAC,OAAe,EAAE,IAA8B,EAAE,YAAoB;IACtF,OAAO;QACL,MAAM,EAAE;YACN;gBACE,OAAO;aACsB;SAChC;QACD,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,IAAI;QACd,MAAM,EAAE,EAAY;QACpB,YAAY;QACZ,aAAa,EAAE,KAAK;QACpB,UAAU,EAAE,IAAI;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -15,6 +15,11 @@ import { imglyRemoveBackground } from './function-defs/imgly-remove-background.j
|
|
|
15
15
|
import { resizeImage } from './function-defs/resize-image.js';
|
|
16
16
|
import { splitImage } from './function-defs/split-image.js';
|
|
17
17
|
import { askQuestion } from './function-defs/ask-question.js';
|
|
18
|
+
import { optimizeContext } from './function-defs/optimize-context.js';
|
|
19
|
+
import { setSummaries } from './function-defs/set-summaries.js';
|
|
20
|
+
import { updateHistory } from './function-defs/update-history.js';
|
|
21
|
+
import { readHistory } from './function-defs/read-history.js';
|
|
22
|
+
import { askQuestionReflect } from './function-defs/ask-question-reflect.js';
|
|
18
23
|
/**
|
|
19
24
|
* Function definitions for function calling feature
|
|
20
25
|
*/
|
|
@@ -35,10 +40,15 @@ export const functionDefs = [
|
|
|
35
40
|
resizeImage,
|
|
36
41
|
splitImage,
|
|
37
42
|
askQuestion,
|
|
43
|
+
optimizeContext,
|
|
44
|
+
setSummaries,
|
|
45
|
+
updateHistory,
|
|
46
|
+
readHistory,
|
|
47
|
+
askQuestionReflect,
|
|
38
48
|
// @ts-expect-error (fix this once fun defs are converted to ts)
|
|
39
49
|
].map((fd) => {
|
|
40
50
|
if (requireExplanations && fd.parameters.properties.explanation && !fd.parameters.required.includes('explanation')) {
|
|
41
|
-
fd.parameters.required.
|
|
51
|
+
fd.parameters.required.unshift('explanation');
|
|
42
52
|
}
|
|
43
53
|
else if (!requireExplanations) {
|
|
44
54
|
delete fd.parameters.properties.explanation;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"function-calling.js","sourceRoot":"","sources":["../../src/prompt/function-calling.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,OAAO,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,qCAAqC,CAAC;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC1D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,eAAe,EAAE,MAAM,qCAAqC,CAAC;AACtE,OAAO,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAC;AAChE,OAAO,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AACnF,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;AAC9D,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAC;
|
|
1
|
+
{"version":3,"file":"function-calling.js","sourceRoot":"","sources":["../../src/prompt/function-calling.ts"],"names":[],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U;IACV,SAAS;IACT,UAAU;IACV,UAAU;IACV,WAAW;IACX,eAAe;IACf,QAAQ;IACR,aAAa;IACb,YAAY;IACZ,qBAAqB;IACrB,WAAW;IACX,UAAU;IACV,WAAW;IACX,eAAe;IACf,YAAY;IACZ,aAAa;IACb,WAAW;IACX,kBAAkB;IAClB,gEAAgE;CACjE,CAAC,GAAG,CAAC,CAAC,EAAe,EAAE,EAAE;IACxB,IAAI,mBAAmB,IAAI,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAAE,CAAC;QACnH,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;IAChD,CAAC;SAAM,IAAI,CAAC,mBAAmB,EAAE,CAAC;QAChC,OAAO,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC;IAC9C,CAAC;IAED,OAAO,EAAE,CAAC;AACZ,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export declare const askQuestionReflect: {
|
|
2
|
+
readonly name: "askQuestionReflect";
|
|
3
|
+
readonly description: "This function is used to decide whether to escalate the request to more advanced model.";
|
|
4
|
+
readonly parameters: {
|
|
5
|
+
readonly type: "object";
|
|
6
|
+
readonly properties: {
|
|
7
|
+
readonly reason: {
|
|
8
|
+
readonly type: "string";
|
|
9
|
+
readonly description: "The reason for the escalation necessity.";
|
|
10
|
+
};
|
|
11
|
+
readonly shouldEscalate: {
|
|
12
|
+
readonly type: "number";
|
|
13
|
+
readonly description: "A number that expresses the escalation necessity: 0 - no need to escalate, 100 - absolutely need to escalate to more advanced model.";
|
|
14
|
+
readonly minimum: 0;
|
|
15
|
+
readonly maximum: 100;
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly required: readonly ["reason", "shouldEscalate"];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
export const askQuestionReflect = {
|
|
2
|
+
name: 'askQuestionReflect',
|
|
3
|
+
description: 'This function is used to decide whether to escalate the request to more advanced model.',
|
|
4
|
+
parameters: {
|
|
5
|
+
type: 'object',
|
|
6
|
+
properties: {
|
|
7
|
+
reason: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
description: 'The reason for the escalation necessity.',
|
|
10
|
+
},
|
|
11
|
+
shouldEscalate: {
|
|
12
|
+
type: 'number',
|
|
13
|
+
description: 'A number that expresses the escalation necessity: 0 - no need to escalate, 100 - absolutely need to escalate to more advanced model.',
|
|
14
|
+
minimum: 0,
|
|
15
|
+
maximum: 100,
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
required: ['reason', 'shouldEscalate'],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=ask-question-reflect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ask-question-reflect.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/ask-question-reflect.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,IAAI,EAAE,oBAAoB;IAC1B,WAAW,EAAE,yFAAyF;IACtG,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0CAA0C;aACxD;YACD,cAAc,EAAE;gBACd,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,sIAAsI;gBACxI,OAAO,EAAE,CAAC;gBACV,OAAO,EAAE,GAAG;aACb;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,gBAAgB,CAAC;KACvC;CACO,CAAC"}
|
|
@@ -1,68 +1,79 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Function definition for askQuestion
|
|
3
|
+
*
|
|
4
|
+
* Use this function to ask questions, seek clarification, request file permissions, or manage the flow of the conversation.
|
|
5
|
+
* Each actionType serves a specific purpose, ensuring clarity and proper task execution.
|
|
3
6
|
*/
|
|
4
7
|
export declare const askQuestion: {
|
|
5
8
|
readonly name: "askQuestion";
|
|
6
|
-
readonly description: "
|
|
9
|
+
readonly description: "Use this function to ask a question, seek clarification, or manage the flow of the conversation. For analysis requests, use actionType \"requestAnswer\". Only proceed to code generation when explicitly instructed or after confirmation.";
|
|
7
10
|
readonly parameters: {
|
|
8
11
|
readonly type: "object";
|
|
9
12
|
readonly properties: {
|
|
10
|
-
readonly
|
|
13
|
+
readonly actionType: {
|
|
11
14
|
readonly type: "string";
|
|
12
|
-
readonly
|
|
15
|
+
readonly enum: readonly ["requestAnswer", "requestPermissions", "requestFilesContent", "removeFilesFromContext", "confirmCodeGeneration", "startCodeGeneration", "cancelCodeGeneration", "contextOptimization"];
|
|
16
|
+
readonly description: "This value instructs the program on what should happen next. Use \"requestAnswer\" for analysis requests or clarifications.,\n\n Detailed Explanation of actionTypes:\n - requestAnswer: Use for general information, clarifications, or when no specific code is needed.\n - requestPermissions: Use when additional permissions are required for actions like creating or deleting files.\n - requestFilesContent: Use specifically when needing to access or review the contents of files.\n - removeFilesFromContext: Use to remove unnecessary file contents from context, optimizing token usage.\n - confirmCodeGeneration: Use to confirm with the user before starting code generation tasks.\n - startCodeGeneration: Use only after receiving confirmation to begin code generation.\n - cancelCodeGeneration: Use if code generation should be stopped or canceled.\n - contextOptimization: Use to manage and optimize context during code generation tasks, allowing the LLM to provide guidance on what parts of the context are most relevant to keep.\n ";
|
|
13
17
|
};
|
|
14
|
-
readonly
|
|
15
|
-
readonly type: "
|
|
16
|
-
readonly description: "
|
|
18
|
+
readonly content: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "The message you want to display to the user. It can be a question if you need more information, an analysis result, or a confirmation request before proceeding with code generation.";
|
|
17
21
|
};
|
|
18
22
|
readonly promptNecessity: {
|
|
19
23
|
readonly type: "number";
|
|
20
24
|
readonly minimum: 0;
|
|
21
25
|
readonly maximum: 100;
|
|
22
|
-
readonly description: "
|
|
23
|
-
};
|
|
24
|
-
readonly stopCodegen: {
|
|
25
|
-
readonly type: "boolean";
|
|
26
|
-
readonly description: "If set to true, it will break the code generation process without error, so you should use this parameter if you want to stop the code generation process.";
|
|
26
|
+
readonly description: "Indicates how strongly you need a response from the user. A higher value means a stronger need for user input.";
|
|
27
27
|
};
|
|
28
28
|
readonly requestFilesContent: {
|
|
29
29
|
readonly type: "array";
|
|
30
|
-
readonly description:
|
|
30
|
+
readonly description: "An array of absolute file paths for which you need the content. Use this when specific files are missing and you need them to proceed with the task.";
|
|
31
31
|
readonly items: {
|
|
32
32
|
readonly type: "string";
|
|
33
33
|
};
|
|
34
34
|
};
|
|
35
|
+
readonly removeFilesFromContext: {
|
|
36
|
+
readonly type: "array";
|
|
37
|
+
readonly description: "An array of absolute file paths that should be removed from the context. Use this to optimize token usage by removing unnecessary file contents.";
|
|
38
|
+
readonly items: {
|
|
39
|
+
readonly type: "string";
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
readonly contextOptimization: {
|
|
43
|
+
readonly type: "string";
|
|
44
|
+
readonly description: "A prompt generated to guide the LLM in optimizing context by specifying which parts of the context are most relevant to keep. This helps in efficient management during code generation tasks.";
|
|
45
|
+
};
|
|
35
46
|
readonly requestPermissions: {
|
|
36
47
|
readonly type: "object";
|
|
37
|
-
readonly description: "Use this
|
|
48
|
+
readonly description: "Use this to request additional permissions needed for code generation if they are not already granted.";
|
|
38
49
|
readonly properties: {
|
|
39
50
|
readonly allowDirectoryCreate: {
|
|
40
|
-
readonly description: "Set to
|
|
51
|
+
readonly description: "Set to true to request permission for creating directories.";
|
|
41
52
|
readonly type: "boolean";
|
|
42
53
|
};
|
|
43
54
|
readonly allowFileCreate: {
|
|
44
|
-
readonly description: "Set to
|
|
55
|
+
readonly description: "Set to true to request permission for creating files.";
|
|
45
56
|
readonly type: "boolean";
|
|
46
57
|
};
|
|
47
58
|
readonly allowFileDelete: {
|
|
48
|
-
readonly description: "Set to
|
|
59
|
+
readonly description: "Set to true to request permission for deleting files.";
|
|
49
60
|
readonly type: "boolean";
|
|
50
61
|
};
|
|
51
62
|
readonly allowFileMove: {
|
|
52
|
-
readonly description: "Set to
|
|
63
|
+
readonly description: "Set to true to request permission for moving files.";
|
|
53
64
|
readonly type: "boolean";
|
|
54
65
|
};
|
|
55
66
|
readonly enableVision: {
|
|
56
|
-
readonly description: "Set to
|
|
67
|
+
readonly description: "Set to true to request permission for vision capabilities, using images as context for code generation.";
|
|
57
68
|
readonly type: "boolean";
|
|
58
69
|
};
|
|
59
70
|
readonly enableImagen: {
|
|
60
|
-
readonly description: "Set to
|
|
71
|
+
readonly description: "Set to true to request permission for generating images.";
|
|
61
72
|
readonly type: "boolean";
|
|
62
73
|
};
|
|
63
74
|
};
|
|
64
75
|
};
|
|
65
76
|
};
|
|
66
|
-
readonly required: readonly ["
|
|
77
|
+
readonly required: readonly ["actionType", "content", "promptNecessity"];
|
|
67
78
|
};
|
|
68
79
|
};
|