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,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for optimizeContext
|
|
3
|
+
*/
|
|
4
|
+
export const optimizeContext = {
|
|
5
|
+
name: 'optimizeContext',
|
|
6
|
+
description: 'This function narrows the context of code generation to a list of relevant files, including their estimated token counts and relevance scores. It helps prioritize files based on their importance to the user prompt and manages token usage.',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
userPrompt: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: "The user's original prompt.",
|
|
13
|
+
},
|
|
14
|
+
optimizedContext: {
|
|
15
|
+
type: 'array',
|
|
16
|
+
description: 'An array of objects representing relevant files, their relevance scores, and token counts.',
|
|
17
|
+
items: {
|
|
18
|
+
type: 'object',
|
|
19
|
+
properties: {
|
|
20
|
+
filePath: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: 'The absolute file path of a relevant file.',
|
|
23
|
+
},
|
|
24
|
+
relevance: {
|
|
25
|
+
type: 'number',
|
|
26
|
+
description: 'A score from 0 to 1 indicating the relevance of the file to the user prompt.',
|
|
27
|
+
minimum: 0,
|
|
28
|
+
maximum: 1,
|
|
29
|
+
},
|
|
30
|
+
tokenCount: {
|
|
31
|
+
type: 'integer',
|
|
32
|
+
description: 'The estimated token count for the file content.',
|
|
33
|
+
minimum: 0,
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
required: ['filePath', 'relevance', 'tokenCount'],
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
totalTokenCount: {
|
|
40
|
+
type: 'number',
|
|
41
|
+
description: 'The estimated token count for the entire context.',
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
required: ['userPrompt', 'optimizedContext', 'totalTokenCount'],
|
|
45
|
+
},
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=optimize-context.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"optimize-context.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/optimize-context.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,iBAAiB;IACvB,WAAW,EACT,gPAAgP;IAClP,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,6BAA6B;aAC3C;YACD,gBAAgB,EAAE;gBAChB,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,4FAA4F;gBACzG,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,QAAQ,EAAE;4BACR,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,4CAA4C;yBAC1D;wBACD,SAAS,EAAE;4BACT,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,8EAA8E;4BAC3F,OAAO,EAAE,CAAC;4BACV,OAAO,EAAE,CAAC;yBACX;wBACD,UAAU,EAAE;4BACV,IAAI,EAAE,SAAS;4BACf,WAAW,EAAE,iDAAiD;4BAC9D,OAAO,EAAE,CAAC;yBACX;qBACF;oBACD,QAAQ,EAAE,CAAC,UAAU,EAAE,WAAW,EAAE,YAAY,CAAC;iBAClD;aACF;YACD,eAAe,EAAE;gBACf,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,mDAAmD;aACjE;SACF;QACD,QAAQ,EAAE,CAAC,YAAY,EAAE,kBAAkB,EAAE,iBAAiB,CAAC;KAChE;CACO,CAAC"}
|
|
@@ -11,14 +11,14 @@ export declare const patchFile: {
|
|
|
11
11
|
readonly type: "string";
|
|
12
12
|
readonly description: "The file path to patch.";
|
|
13
13
|
};
|
|
14
|
-
readonly patch: {
|
|
15
|
-
readonly type: "string";
|
|
16
|
-
readonly description: "Modification to the file expressed in patch format. Example patch:\n\n```\nIndex: filename.js\n===================================================================\n--- filename.js\n+++ filename.js\n@@ -1,2 +1,3 @@\n line1\n+line3\n line2\n\\n```\n ";
|
|
17
|
-
};
|
|
18
14
|
readonly explanation: {
|
|
19
15
|
readonly type: "string";
|
|
20
16
|
readonly description: "The explanation of the reasoning behind the suggested code changes for this file";
|
|
21
17
|
};
|
|
18
|
+
readonly patch: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "Modification to the file expressed in patch format. Example patch:\n\n```\nIndex: filename.js\n===================================================================\n--- filename.js\n+++ filename.js\n@@ -1,2 +1,3 @@\n line1\n+line3\n line2\n\\n```\n ";
|
|
21
|
+
};
|
|
22
22
|
};
|
|
23
23
|
readonly required: readonly ["filePath", "patch"];
|
|
24
24
|
};
|
|
@@ -11,6 +11,10 @@ export const patchFile = {
|
|
|
11
11
|
type: 'string',
|
|
12
12
|
description: 'The file path to patch.',
|
|
13
13
|
},
|
|
14
|
+
explanation: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'The explanation of the reasoning behind the suggested code changes for this file',
|
|
17
|
+
},
|
|
14
18
|
patch: {
|
|
15
19
|
type: 'string',
|
|
16
20
|
description: `Modification to the file expressed in patch format. Example patch:
|
|
@@ -28,10 +32,6 @@ Index: filename.js
|
|
|
28
32
|
\`\`\`
|
|
29
33
|
`,
|
|
30
34
|
},
|
|
31
|
-
explanation: {
|
|
32
|
-
type: 'string',
|
|
33
|
-
description: 'The explanation of the reasoning behind the suggested code changes for this file',
|
|
34
|
-
},
|
|
35
35
|
},
|
|
36
36
|
required: ['filePath', 'patch'],
|
|
37
37
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"patch-file.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/patch-file.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,WAAW;IACjB,WAAW,EACT,mLAAmL;IACrL,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yBAAyB;aACvC;YACD,
|
|
1
|
+
{"version":3,"file":"patch-file.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/patch-file.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,IAAI,EAAE,WAAW;IACjB,WAAW,EACT,mLAAmL;IACrL,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yBAAyB;aACvC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kFAAkF;aAChG;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE;;;;;;;;;;;;;WAaV;aACJ;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,OAAO,CAAC;KAChC;CACO,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export const readHistory = {
|
|
2
|
+
name: 'readHistory',
|
|
3
|
+
description: 'This function reads the history from the cache and returns it as a string.',
|
|
4
|
+
parameters: {
|
|
5
|
+
type: 'object',
|
|
6
|
+
properties: {
|
|
7
|
+
dateTime: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
},
|
|
10
|
+
},
|
|
11
|
+
required: [],
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=read-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-history.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/read-history.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,4EAA4E;IACzF,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;aACf;SACF;QACD,QAAQ,EAAE,EAAE;KACb;CACF,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for setSummaries
|
|
3
|
+
*/
|
|
4
|
+
export declare const setSummaries: {
|
|
5
|
+
readonly name: "setSummaries";
|
|
6
|
+
readonly description: "Use this function to save summaries of files";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly summaries: {
|
|
11
|
+
readonly type: "array";
|
|
12
|
+
readonly description: "An array of results, each corresponding to an analyzed file, containing the absolute file path, and a brief summary.";
|
|
13
|
+
readonly items: {
|
|
14
|
+
readonly type: "object";
|
|
15
|
+
readonly properties: {
|
|
16
|
+
readonly filePath: {
|
|
17
|
+
readonly type: "string";
|
|
18
|
+
readonly description: "The absolute file path of the analyzed file.";
|
|
19
|
+
};
|
|
20
|
+
readonly summary: {
|
|
21
|
+
readonly type: "string";
|
|
22
|
+
readonly description: "A summary of the file's content, highlighting its main purpose, functionality, or details which may be useful for context optimization.";
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
readonly required: readonly ["filePath", "summary"];
|
|
26
|
+
};
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
readonly required: readonly ["summaries"];
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for setSummaries
|
|
3
|
+
*/
|
|
4
|
+
export const setSummaries = {
|
|
5
|
+
name: 'setSummaries',
|
|
6
|
+
description: 'Use this function to save summaries of files',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
summaries: {
|
|
11
|
+
type: 'array',
|
|
12
|
+
description: 'An array of results, each corresponding to an analyzed file, containing the absolute file path, and a brief summary.',
|
|
13
|
+
items: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
filePath: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
description: 'The absolute file path of the analyzed file.',
|
|
19
|
+
},
|
|
20
|
+
summary: {
|
|
21
|
+
type: 'string',
|
|
22
|
+
description: "A summary of the file's content, highlighting its main purpose, functionality, or details which may be useful for context optimization.",
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
required: ['filePath', 'summary'],
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
required: ['summaries'],
|
|
30
|
+
},
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=set-summaries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"set-summaries.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/set-summaries.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,8CAA8C;IAC3D,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,WAAW,EACT,sHAAsH;gBACxH,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,QAAQ,EAAE;4BACR,IAAI,EAAE,QAAQ;4BACd,WAAW,EAAE,8CAA8C;yBAC5D;wBACD,OAAO,EAAE;4BACP,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,yIAAyI;yBAC5I;qBACF;oBACD,QAAQ,EAAE,CAAC,UAAU,EAAE,SAAS,CAAC;iBAClC;aACF;SACF;QACD,QAAQ,EAAE,CAAC,WAAW,CAAC;KACxB;CACO,CAAC"}
|
|
@@ -11,14 +11,14 @@ export declare const updateFile: {
|
|
|
11
11
|
readonly type: "string";
|
|
12
12
|
readonly description: "The file path to update.";
|
|
13
13
|
};
|
|
14
|
-
readonly newContent: {
|
|
15
|
-
readonly type: "string";
|
|
16
|
-
readonly description: "The content to update the file with. Must not be empty.";
|
|
17
|
-
};
|
|
18
14
|
readonly explanation: {
|
|
19
15
|
readonly type: "string";
|
|
20
16
|
readonly description: "The explanation of the reasoning behind the suggested code changes for this file";
|
|
21
17
|
};
|
|
18
|
+
readonly newContent: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "The content to update the file with. Must not be empty.";
|
|
21
|
+
};
|
|
22
22
|
};
|
|
23
23
|
readonly required: readonly ["filePath", "newContent"];
|
|
24
24
|
};
|
|
@@ -11,14 +11,14 @@ export const updateFile = {
|
|
|
11
11
|
type: 'string',
|
|
12
12
|
description: 'The file path to update.',
|
|
13
13
|
},
|
|
14
|
-
newContent: {
|
|
15
|
-
type: 'string',
|
|
16
|
-
description: 'The content to update the file with. Must not be empty.',
|
|
17
|
-
},
|
|
18
14
|
explanation: {
|
|
19
15
|
type: 'string',
|
|
20
16
|
description: 'The explanation of the reasoning behind the suggested code changes for this file',
|
|
21
17
|
},
|
|
18
|
+
newContent: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'The content to update the file with. Must not be empty.',
|
|
21
|
+
},
|
|
22
22
|
},
|
|
23
23
|
required: ['filePath', 'newContent'],
|
|
24
24
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update-file.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/update-file.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,YAAY;IAClB,WAAW,EACT,kLAAkL;IACpL,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,
|
|
1
|
+
{"version":3,"file":"update-file.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/update-file.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,YAAY;IAClB,WAAW,EACT,kLAAkL;IACpL,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kFAAkF;aAChG;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yDAAyD;aACvE;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;KACrC;CACO,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for updateHistory
|
|
3
|
+
*/
|
|
4
|
+
export declare const updateHistory: {
|
|
5
|
+
readonly name: "updateHistory";
|
|
6
|
+
readonly description: "Update the history.";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly recentConversationSummary: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly description: "Summary of recent conversation";
|
|
13
|
+
};
|
|
14
|
+
readonly newHistoryContent: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly description: "The new history content, combination of recent conversation summary, and current history";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
readonly required: readonly ["recentConversationSummary", "newHistoryContent"];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for updateHistory
|
|
3
|
+
*/
|
|
4
|
+
export const updateHistory = {
|
|
5
|
+
name: 'updateHistory',
|
|
6
|
+
description: 'Update the history.',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
recentConversationSummary: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'Summary of recent conversation',
|
|
13
|
+
},
|
|
14
|
+
newHistoryContent: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'The new history content, combination of recent conversation summary, and current history',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ['recentConversationSummary', 'newHistoryContent'],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=update-history.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"update-history.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/update-history.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,qBAAqB;IAClC,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,yBAAyB,EAAE;gBACzB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gCAAgC;aAC9C;YACD,iBAAiB,EAAE;gBACjB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0FAA0F;aACxG;SACF;QACD,QAAQ,EAAE,CAAC,2BAA2B,EAAE,mBAAmB,CAAC;KAC7D;CACO,CAAC"}
|
package/dist/prompt/limits.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export declare function verifySystemPromptLimit(systemPrompt: string):
|
|
2
|
-
export declare function verifyCodegenPromptLimit(codeGenPrompt: string):
|
|
3
|
-
export declare function verifySourceCodeLimit(sourceCode: string):
|
|
1
|
+
export declare function verifySystemPromptLimit(systemPrompt: string): number;
|
|
2
|
+
export declare function verifyCodegenPromptLimit(codeGenPrompt: string): number;
|
|
3
|
+
export declare function verifySourceCodeLimit(sourceCode: string): number;
|
package/dist/prompt/limits.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
import assert from 'node:assert';
|
|
2
|
-
|
|
3
|
-
const
|
|
4
|
-
const
|
|
2
|
+
import { estimateTokenCount } from './token-estimator.js';
|
|
3
|
+
const SYSTEM_PROMPT_LIMIT = 2700;
|
|
4
|
+
const CODEGEN_PROMPT_LIMIT = 850;
|
|
5
|
+
const SOURCE_CODE_LIMIT = 100000;
|
|
5
6
|
function verifyPromptLimit(promptType, prompt, limit) {
|
|
6
|
-
const tokenCount = prompt
|
|
7
|
-
console.log(`${promptType} prompt token count: ${tokenCount}`);
|
|
7
|
+
const tokenCount = estimateTokenCount(prompt);
|
|
8
|
+
console.log(`${promptType} prompt estimated token count: ${tokenCount}`);
|
|
8
9
|
assert(tokenCount <= limit, `Token limit exceeded: ${tokenCount} > ${limit}`);
|
|
10
|
+
return tokenCount;
|
|
9
11
|
}
|
|
10
12
|
export function verifySystemPromptLimit(systemPrompt) {
|
|
11
|
-
verifyPromptLimit('system', systemPrompt, SYSTEM_PROMPT_LIMIT);
|
|
13
|
+
return verifyPromptLimit('system', systemPrompt, SYSTEM_PROMPT_LIMIT);
|
|
12
14
|
}
|
|
13
15
|
export function verifyCodegenPromptLimit(codeGenPrompt) {
|
|
14
|
-
verifyPromptLimit('codegen', codeGenPrompt, CODEGEN_PROMPT_LIMIT);
|
|
16
|
+
return verifyPromptLimit('codegen', codeGenPrompt, CODEGEN_PROMPT_LIMIT);
|
|
15
17
|
}
|
|
16
18
|
export function verifySourceCodeLimit(sourceCode) {
|
|
17
|
-
verifyPromptLimit('sourceCode', sourceCode, SOURCE_CODE_LIMIT);
|
|
19
|
+
return verifyPromptLimit('sourceCode', sourceCode, SOURCE_CODE_LIMIT);
|
|
18
20
|
}
|
|
19
21
|
//# sourceMappingURL=limits.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limits.js","sourceRoot":"","sources":["../../src/prompt/limits.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"limits.js","sourceRoot":"","sources":["../../src/prompt/limits.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE1D,MAAM,mBAAmB,GAAG,IAAI,CAAC;AACjC,MAAM,oBAAoB,GAAG,GAAG,CAAC;AACjC,MAAM,iBAAiB,GAAG,MAAM,CAAC;AAEjC,SAAS,iBAAiB,CAAC,UAAkB,EAAE,MAAc,EAAE,KAAa;IAC1E,MAAM,UAAU,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;IAC9C,OAAO,CAAC,GAAG,CAAC,GAAG,UAAU,kCAAkC,UAAU,EAAE,CAAC,CAAC;IACzE,MAAM,CAAC,UAAU,IAAI,KAAK,EAAE,yBAAyB,UAAU,MAAM,KAAK,EAAE,CAAC,CAAC;IAC9E,OAAO,UAAU,CAAC;AACpB,CAAC;AAED,MAAM,UAAU,uBAAuB,CAAC,YAAoB;IAC1D,OAAO,iBAAiB,CAAC,QAAQ,EAAE,YAAY,EAAE,mBAAmB,CAAC,CAAC;AACxE,CAAC;AAED,MAAM,UAAU,wBAAwB,CAAC,aAAqB;IAC5D,OAAO,iBAAiB,CAAC,SAAS,EAAE,aAAa,EAAE,oBAAoB,CAAC,CAAC;AAC3E,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,UAAkB;IACtD,OAAO,iBAAiB,CAAC,YAAY,EAAE,UAAU,EAAE,iBAAiB,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -7,8 +7,8 @@ describe('Prompt Limits', () => {
|
|
|
7
7
|
expect(() => verifySystemPromptLimit(validPrompt)).not.toThrow();
|
|
8
8
|
});
|
|
9
9
|
it('should throw for a prompt exceeding the limit', () => {
|
|
10
|
-
const invalidPrompt = 'A '.repeat(
|
|
11
|
-
expect(() => verifySystemPromptLimit(invalidPrompt)).toThrow('Token limit exceeded:
|
|
10
|
+
const invalidPrompt = 'A '.repeat(5000);
|
|
11
|
+
expect(() => verifySystemPromptLimit(invalidPrompt)).toThrow('Token limit exceeded: 3250 > 2700');
|
|
12
12
|
});
|
|
13
13
|
});
|
|
14
14
|
describe('verifyCodegenPromptLimit', () => {
|
|
@@ -17,8 +17,8 @@ describe('Prompt Limits', () => {
|
|
|
17
17
|
expect(() => verifyCodegenPromptLimit(validPrompt)).not.toThrow();
|
|
18
18
|
});
|
|
19
19
|
it('should throw for a prompt exceeding the limit', () => {
|
|
20
|
-
const invalidPrompt = 'B '.repeat(
|
|
21
|
-
expect(() => verifyCodegenPromptLimit(invalidPrompt)).toThrow('Token limit exceeded:
|
|
20
|
+
const invalidPrompt = 'B '.repeat(10000);
|
|
21
|
+
expect(() => verifyCodegenPromptLimit(invalidPrompt)).toThrow('Token limit exceeded: 6500 > 850');
|
|
22
22
|
});
|
|
23
23
|
});
|
|
24
24
|
describe('verifySourceCodeLimit', () => {
|
|
@@ -27,8 +27,8 @@ describe('Prompt Limits', () => {
|
|
|
27
27
|
expect(() => verifySourceCodeLimit(validSourceCode)).not.toThrow();
|
|
28
28
|
});
|
|
29
29
|
it('should throw for source code exceeding the limit', () => {
|
|
30
|
-
const invalidSourceCode = 'C '.repeat(
|
|
31
|
-
expect(() => verifySourceCodeLimit(invalidSourceCode)).toThrow('Token limit exceeded:
|
|
30
|
+
const invalidSourceCode = 'C '.repeat(400001);
|
|
31
|
+
expect(() => verifySourceCodeLimit(invalidSourceCode)).toThrow('Token limit exceeded: 260001 > 100000');
|
|
32
32
|
});
|
|
33
33
|
});
|
|
34
34
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"limits.test.js","sourceRoot":"","sources":["../../src/prompt/limits.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEvG,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACvC,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;YACxD,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;YACzC,MAAM,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACnE,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,+CAA+C,EAAE,GAAG,EAAE;YACvD,MAAM,aAAa,GAAG,IAAI,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"limits.test.js","sourceRoot":"","sources":["../../src/prompt/limits.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,uBAAuB,EAAE,wBAAwB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAEvG,QAAQ,CAAC,eAAe,EAAE,GAAG,EAAE;IAC7B,QAAQ,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACvC,EAAE,CAAC,gDAAgD,EAAE,GAAG,EAAE;YACxD,MAAM,WAAW,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,GAAG,CAAC,CAAC,CAAC;YACzC,MAAM,CAAC,GAAG,EAAE,CAAC,uBAAuB,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,EAAE,CAAC;QACnE,CAAC,CA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MAAM,CAAC,CAAC;YAC9C,MAAM,CAAC,GAAG,EAAE,CAAC,qBAAqB,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,uCAAuC,CAAC,CAAC;QAC1G,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -7,16 +7,13 @@ import { importantContext } from '../main/config.js';
|
|
|
7
7
|
/** Get codegen prompt */
|
|
8
8
|
export function getCodeGenPrompt(options) {
|
|
9
9
|
let { explicitPrompt } = options;
|
|
10
|
-
const { taskFile, considerAllFiles, allowFileCreate, allowFileDelete, allowDirectoryCreate, allowFileMove, vision, imagen, dependencyTree, verbose, askQuestion, interactive, } = options;
|
|
10
|
+
const { taskFile, considerAllFiles, allowFileCreate, allowFileDelete, allowDirectoryCreate, allowFileMove, vision, imagen, dependencyTree, verbose, askQuestion, interactive, ui, } = options;
|
|
11
11
|
assert(!explicitPrompt || !taskFile, 'Both taskFile and explicitPrompt are not allowed');
|
|
12
12
|
if (taskFile) {
|
|
13
13
|
explicitPrompt = `I want you to perform a coding task. The task is described in the ${taskFile} file. Use those instructions.`;
|
|
14
14
|
}
|
|
15
|
-
let codeGenFiles;
|
|
16
|
-
if (considerAllFiles) {
|
|
17
|
-
codeGenFiles = Object.keys(getSourceCode({ taskFile, forceAll: true }, options));
|
|
18
|
-
}
|
|
19
|
-
else {
|
|
15
|
+
let codeGenFiles = [];
|
|
16
|
+
if (!considerAllFiles) {
|
|
20
17
|
codeGenFiles = Object.entries(getSourceCode({ taskFile, forceAll: true }, options))
|
|
21
18
|
.filter(([, { content }]) => content?.match(new RegExp(`([^'^\`]+)${CODEGEN_TRIGGER}`)))
|
|
22
19
|
.map(([path]) => path);
|
|
@@ -32,29 +29,59 @@ export function getCodeGenPrompt(options) {
|
|
|
32
29
|
codeGenFiles = Array.from(dependencyTreeFiles);
|
|
33
30
|
}
|
|
34
31
|
const importantTextPrompts = importantContext.textPrompts?.map((prompt) => prompt.content).join('\n\n') || '';
|
|
35
|
-
const requestPermissionText = askQuestion && interactive ? ' (request permission via `askQuestion`)' : '';
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
32
|
+
const requestPermissionText = askQuestion && (interactive || ui) ? ' (request permission via `askQuestion`)' : '';
|
|
33
|
+
const taskPrompt = explicitPrompt
|
|
34
|
+
? 'This is your task: ' + explicitPrompt + '\n\n'
|
|
35
|
+
: codeGenFiles.length > 0
|
|
36
|
+
? `I have marked some files with the ${CODEGEN_TRIGGER} fragments:\n${codeGenFiles.join('\n')}\nYour task is to generate updates for those files according to the ${CODEGEN_TRIGGER} comments/context.`
|
|
37
|
+
: `No files are marked with the ${CODEGEN_TRIGGER} fragment, so you can consider making changes in any file${askQuestion ? ', but you should consult me by asking a question first.' : ''}.`;
|
|
38
|
+
const codeGenPrompt = `${taskPrompt}
|
|
39
|
+
|
|
40
|
+
Before proceeding with code generation, please:
|
|
41
|
+
|
|
42
|
+
1. **Analyze the task and requirements**.
|
|
43
|
+
|
|
44
|
+
2. **Use the \`askQuestion\` function** to seek clarification if needed. For analysis requests, use the 'requestAnswer' actionType.
|
|
45
|
+
|
|
46
|
+
3. **When you believe code changes are necessary**, use the 'confirmCodeGeneration' actionType to confirm with the user before proceeding.
|
|
47
|
+
|
|
48
|
+
4. **Only after confirmation**, summarize the plan of updates by calling the \`codegenSummary\` function with the appropriate arguments.
|
|
49
|
+
|
|
50
|
+
- Ensure that you include:
|
|
51
|
+
- **\`explanation\`**: A brief description of the planned changes or reasoning for no changes.
|
|
52
|
+
- **\`fileUpdates\`**: A list of proposed file updates, each with required properties:
|
|
53
|
+
- **\`path\`**: Absolute file path to be updated.
|
|
54
|
+
- **\`updateToolName\`**: The tool to be used for the update (e.g., \`createFile\`, \`updateFile\`).
|
|
55
|
+
- **\`prompt\`**: A detailed prompt summarizing the planned changes for this file.
|
|
56
|
+
- **Other Properties**: Include any other necessary properties as per the \`codegenSummary\` function definition.
|
|
57
|
+
- **\`contextPaths\`**: A list of file paths that should be used as context for the code generation requests.
|
|
58
|
+
|
|
59
|
+
5. **Context Optimization**: Utilize the \`contextOptimization\` actionType to manage and optimize the context during code generation tasks. Generate a prompt using the \`contextOptimization\` property to guide the LLM in determining which parts of the context are most relevant to keep, enhancing efficiency and focus.
|
|
60
|
+
|
|
61
|
+
6. **Check ActionType Selection**: Always verify that the correct \`actionType\` is being used, especially before requesting file content, to ensure the 'requestFilesContent' actionType is applied. This helps maintain vigilance and accuracy in task execution.
|
|
62
|
+
|
|
63
|
+
## My Requirements for Task Execution:
|
|
64
|
+
|
|
45
65
|
${importantTextPrompts ? `${importantTextPrompts}\n` : ''}
|
|
46
66
|
${considerAllFiles
|
|
47
|
-
|
|
48
|
-
|
|
67
|
+
? 'You are allowed to modify all files in the application regardless of whether they contain codegen fragments.'
|
|
68
|
+
: 'Do not modify files which do not contain the fragments.'}
|
|
49
69
|
${allowFileCreate ? 'You are allowed to create new files.' : 'Do not create new files. (request permission via `askQuestion`)'}
|
|
50
70
|
${allowFileDelete
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
${allowDirectoryCreate
|
|
71
|
+
? 'You are allowed to delete files; in such cases, add an empty string as content.'
|
|
72
|
+
: 'Do not delete files. (request permission via `askQuestion`)'}
|
|
73
|
+
${allowDirectoryCreate
|
|
74
|
+
? 'You are allowed to create new directories.'
|
|
75
|
+
: `Do not create new directories.${requestPermissionText}`}
|
|
54
76
|
${allowFileMove ? 'You are allowed to move files.' : 'Do not move files. (request permission via `askQuestion`)'}
|
|
55
77
|
${vision ? 'You are allowed to analyze image assets.' : 'Do not analyze image assets. (request permission via `askQuestion`)'}
|
|
56
|
-
${imagen
|
|
57
|
-
|
|
78
|
+
${imagen
|
|
79
|
+
? 'You are allowed to generate images.'
|
|
80
|
+
: 'You are not allowed to generate images. (request permission via `askQuestion`)'}
|
|
81
|
+
|
|
82
|
+
Remember to optimize token usage by reducing context when appropriate during askQuestion conversations. This will help avoid hitting rate limits and improve overall efficiency.
|
|
83
|
+
|
|
84
|
+
Start from generating codegen summary, this summary will be used as a context to generate updates, so make sure that it contains useful information.`;
|
|
58
85
|
if (verbose) {
|
|
59
86
|
console.log('Code gen prompt:');
|
|
60
87
|
console.log(codeGenPrompt);
|
|
@@ -78,8 +105,8 @@ Lint command stderr:
|
|
|
78
105
|
\`\`\`
|
|
79
106
|
${stderr}
|
|
80
107
|
\`\`\`
|
|
81
|
-
|
|
82
|
-
Please suggest changes to fix these lint errors.`;
|
|
108
|
+
|
|
109
|
+
Please suggest changes to fix these lint errors. Use the 'requestAnswer' actionType if you need any clarifications before proposing fixes.`;
|
|
83
110
|
if (verbose) {
|
|
84
111
|
console.log('Lint fix prompt:');
|
|
85
112
|
console.log(lintFixPrompt);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-codegen.js","sourceRoot":"","sources":["../../src/prompt/prompt-codegen.ts"],"names":[],"mappings":"AAAA,OAAO,MAAM,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,aAAa,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAYrD,yBAAyB;AACzB,MAAM,UAAU,gBAAgB,CAAC,OAAuB;IACtD,IAAI,EAAE,cAAc,EAAE,GAAG,OAAO,CAAC;IACjC,MAAM,EACJ,QAAQ,EACR,gBAAgB,EAChB,eAAe,EACf,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,MAAM,EACN,MAAM,EACN,cAAc,EACd,OAAO,EACP,WAAW,EACX,WAAW,
|
|
1
|
+
{"version":3,"file":"prompt-codegen.js","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
38
|
vi.mocked(cliParams).allowDirectoryCreate = false;
|
|
39
39
|
vi.mocked(cliParams).allowFileMove = false;
|
|
40
|
-
vi.spyOn(limits, 'verifyCodegenPromptLimit').mockImplementation(() =>
|
|
40
|
+
vi.spyOn(limits, 'verifyCodegenPromptLimit').mockImplementation(() => 0); // Return 0 instead of void
|
|
41
41
|
const prompt = getCodeGenPrompt({
|
|
42
42
|
considerAllFiles: true,
|
|
43
43
|
aiService: 'vertex-ai',
|
|
@@ -55,7 +55,7 @@ describe('getCodeGenPrompt', () => {
|
|
|
55
55
|
describe('getLintFixPrompt', () => {
|
|
56
56
|
beforeEach(() => {
|
|
57
57
|
vi.mocked(cliParams).verbosePrompt = false;
|
|
58
|
-
vi.spyOn(limits, 'verifyCodegenPromptLimit').mockImplementation(() =>
|
|
58
|
+
vi.spyOn(limits, 'verifyCodegenPromptLimit').mockImplementation(() => 0); // Return 0 instead of void
|
|
59
59
|
});
|
|
60
60
|
it('should generate a lint fix prompt with provided command, stdout, and stderr', () => {
|
|
61
61
|
const command = 'eslint --fix';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt-codegen.test.js","sourceRoot":"","sources":["../../src/prompt/prompt-codegen.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,KAAK,SAAS,MAAM,wBAAwB,CAAC;AACpD,OAAO,KAAK,SAAS,MAAM,sBAAsB,CAAC;AAClD,OAAO,KAAK,MAAM,MAAM,aAAa,CAAC;AACtC,OAAO,wBAAwB,CAAC;AAEhC,EAAE,CAAC,IAAI,CAAC,wBAAwB,EAAE,GAAG,EAAE,CAAC,CAAC;IACvC,QAAQ,EAAE,EAAE;IACZ,cAAc,EAAE,EAAE,CAAC,EAAE,EA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