genaicode 0.9.6 → 0.10.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/dist/ai-service/ai-studio.d.ts +1 -1
- package/dist/ai-service/ai-studio.js +114 -31
- package/dist/ai-service/ai-studio.js.map +1 -1
- package/dist/ai-service/anthropic.js +64 -28
- package/dist/ai-service/anthropic.js.map +1 -1
- package/dist/ai-service/common-types.d.ts +28 -7
- package/dist/ai-service/local-llm.d.ts +6 -0
- package/dist/ai-service/local-llm.js +77 -0
- package/dist/ai-service/local-llm.js.map +1 -0
- package/dist/ai-service/openai.d.ts +3 -13
- package/dist/ai-service/openai.js +107 -51
- package/dist/ai-service/openai.js.map +1 -1
- package/dist/ai-service/service-configurations-types.d.ts +14 -4
- package/dist/ai-service/service-configurations-types.js +0 -4
- package/dist/ai-service/service-configurations-types.js.map +1 -1
- package/dist/ai-service/service-configurations.d.ts +9 -1
- package/dist/ai-service/service-configurations.js +108 -12
- package/dist/ai-service/service-configurations.js.map +1 -1
- package/dist/ai-service/vertex-ai-claude.d.ts +1 -1
- package/dist/ai-service/vertex-ai-claude.js +80 -39
- 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 +261 -155
- package/dist/ai-service/vertex-ai.js.map +1 -1
- package/dist/cli/cli-options.js +1 -1
- package/dist/cli/cli-options.js.map +1 -1
- package/dist/cli/validate-cli-params.js +1 -1
- package/dist/cli/validate-cli-params.js.map +1 -1
- package/dist/help-docs/genaicode-help-document.d.ts +1 -1
- package/dist/help-docs/genaicode-help-document.js +1 -0
- package/dist/help-docs/genaicode-help-document.js.map +1 -1
- package/dist/main/codegen-utils.js +9 -1
- package/dist/main/codegen-utils.js.map +1 -1
- package/dist/main/codegen.js +2 -0
- package/dist/main/codegen.js.map +1 -1
- package/dist/main/common/user-actions.d.ts +2 -0
- package/dist/main/common/user-actions.js.map +1 -1
- package/dist/main/config-schema.js +16 -0
- package/dist/main/config-schema.js.map +1 -1
- package/dist/main/config-types.d.ts +16 -0
- package/dist/main/config.js +9 -1
- package/dist/main/config.js.map +1 -1
- package/dist/main/interactive/select-ai-service.js +1 -0
- package/dist/main/interactive/select-ai-service.js.map +1 -1
- package/dist/main/plugin-loader.d.ts +1 -2
- package/dist/main/plugin-loader.js.map +1 -1
- package/dist/main/ui/backend/endpoints/question-endpoint.js +34 -3
- package/dist/main/ui/backend/endpoints/question-endpoint.js.map +1 -1
- package/dist/main/ui/backend/service.d.ts +6 -5
- package/dist/main/ui/backend/service.js +54 -17
- package/dist/main/ui/backend/service.js.map +1 -1
- package/dist/main/ui/common/api-types.d.ts +1 -0
- package/dist/main/ui/frontend/assets/index-C7n3IQsE.js +1896 -0
- package/dist/main/ui/frontend/index.html +1 -1
- package/dist/project-profiles/types.d.ts +1 -1
- package/dist/project-profiles/types.js +1 -1
- package/dist/project-profiles/types.js.map +1 -1
- package/dist/prompt/function-calling.js +8 -1
- package/dist/prompt/function-calling.js.map +1 -1
- package/dist/prompt/function-defs/ask-question.d.ts +1 -0
- package/dist/prompt/function-defs/ask-question.js +38 -4
- package/dist/prompt/function-defs/ask-question.js.map +1 -1
- package/dist/prompt/function-defs/conversation-summary.d.ts +2 -0
- package/dist/prompt/function-defs/conversation-summary.js +15 -0
- package/dist/prompt/function-defs/conversation-summary.js.map +1 -0
- package/dist/prompt/function-defs/explore-external-directories.d.ts +16 -0
- package/dist/prompt/function-defs/explore-external-directories.js +48 -0
- package/dist/prompt/function-defs/explore-external-directories.js.map +1 -0
- package/dist/prompt/function-defs/read-external-files.d.ts +9 -0
- package/dist/prompt/function-defs/read-external-files.js +30 -0
- package/dist/prompt/function-defs/read-external-files.js.map +1 -0
- package/dist/prompt/limits.js +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.js +23 -18
- package/dist/prompt/steps/step-ask-question/handlers/handle-code-generation.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.js +60 -28
- package/dist/prompt/steps/step-ask-question/handlers/handle-conversation-graph.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js +76 -73
- package/dist/prompt/steps/step-ask-question/handlers/handle-create-file.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-end-conversation.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.d.ts +2 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.js +277 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-explore-external-directories.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js +13 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-genaicode-help.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js +13 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-generate-image.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-lint.d.ts +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-lint.js +54 -61
- package/dist/prompt/steps/step-ask-question/handlers/handle-lint.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js +22 -10
- package/dist/prompt/steps/step-ask-question/handlers/handle-perform-analysis.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js +13 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-pull-app-context.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js +13 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-push-app-context.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.d.ts +2 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.js +144 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-read-external-files.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js +27 -6
- package/dist/prompt/steps/step-ask-question/handlers/handle-reasoning-inference.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.js +13 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-remove-files-from-context.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.js +14 -5
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-content.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.js +26 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-files-fragments.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.d.ts +3 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.js +182 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-git-context.js.map +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.js +13 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-request-permissions.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js +14 -2
- package/dist/prompt/steps/step-ask-question/handlers/handle-search-code.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js +1 -0
- package/dist/prompt/steps/step-ask-question/handlers/handle-send-message.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js +59 -60
- package/dist/prompt/steps/step-ask-question/handlers/handle-update-file.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js +4 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question-handlers.js.map +1 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question-types.d.ts +11 -1
- package/dist/prompt/steps/step-ask-question/step-ask-question.d.ts +2 -0
- package/dist/prompt/steps/step-ask-question/step-ask-question.js +14 -7
- package/dist/prompt/steps/step-ask-question/step-ask-question.js.map +1 -1
- package/dist/prompt/steps/step-codegen-planning.js +14 -5
- package/dist/prompt/steps/step-codegen-planning.js.map +1 -1
- package/dist/prompt/steps/step-context-compression.js +14 -5
- package/dist/prompt/steps/step-context-compression.js.map +1 -1
- package/dist/prompt/steps/step-context-optimization.js +10 -5
- package/dist/prompt/steps/step-context-optimization.js.map +1 -1
- package/dist/prompt/steps/step-generate-codegen-summary.js +14 -5
- package/dist/prompt/steps/step-generate-codegen-summary.js.map +1 -1
- package/dist/prompt/steps/step-generate-summary.d.ts +6 -0
- package/dist/prompt/steps/step-generate-summary.js +36 -16
- package/dist/prompt/steps/step-generate-summary.js.map +1 -1
- package/dist/prompt/steps/step-history-update.js +14 -5
- package/dist/prompt/steps/step-history-update.js.map +1 -1
- package/dist/prompt/steps/step-process-file-updates.js +10 -5
- package/dist/prompt/steps/step-process-file-updates.js.map +1 -1
- package/dist/prompt/steps/step-summarization.js +14 -2
- package/dist/prompt/steps/step-summarization.js.map +1 -1
- package/dist/prompt/steps/step-validate-recover.d.ts +2 -4
- package/dist/prompt/steps/step-validate-recover.js +18 -9
- package/dist/prompt/steps/step-validate-recover.js.map +1 -1
- package/dist/prompt/steps/step-verify-patch.js +14 -5
- package/dist/prompt/steps/step-verify-patch.js.map +1 -1
- package/dist/prompt/systemprompt.d.ts +1 -1
- package/dist/prompt/systemprompt.js +10 -5
- package/dist/prompt/systemprompt.js.map +1 -1
- package/package.json +5 -4
- package/dist/main/ui/frontend/assets/index-DI1ngpa2.js +0 -1840
- package/dist/prompt/steps/step-ask-question/handlers/code-generation.d.ts +0 -4
- package/dist/prompt/steps/step-ask-question/handlers/code-generation.js +0 -167
- package/dist/prompt/steps/step-ask-question/handlers/code-generation.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.js +0 -34
- package/dist/prompt/steps/step-ask-question/handlers/confirm-code-generation.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/context-optimization.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/context-optimization.js +0 -32
- package/dist/prompt/steps/step-ask-question/handlers/context-optimization.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/genaicode-help-document.d.ts +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/genaicode-help-document.js +0 -251
- package/dist/prompt/steps/step-ask-question/handlers/genaicode-help-document.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/lint.d.ts +0 -6
- package/dist/prompt/steps/step-ask-question/handlers/lint.js +0 -103
- package/dist/prompt/steps/step-ask-question/handlers/lint.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.js +0 -82
- package/dist/prompt/steps/step-ask-question/handlers/remove-files-from-context.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/request-files-content.d.ts +0 -8
- package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js +0 -179
- package/dist/prompt/steps/step-ask-question/handlers/request-files-content.js.map +0 -1
- package/dist/prompt/steps/step-ask-question/handlers/request-permissions.d.ts +0 -2
- package/dist/prompt/steps/step-ask-question/handlers/request-permissions.js +0 -69
- package/dist/prompt/steps/step-ask-question/handlers/request-permissions.js.map +0 -1
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<meta name="keywords" content="GenAIcode, AI, code generation, programming" />
|
|
8
8
|
<title>GenAIcode - AI-Powered Code Generation</title>
|
|
9
9
|
<link rel="icon" href="/assets/favicon-DvroFOpS.png" type="image/png" />
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-C7n3IQsE.js"></script>
|
|
11
11
|
<link rel="stylesheet" crossorigin href="/assets/index-5QDg_0vR.css">
|
|
12
12
|
</head>
|
|
13
13
|
<body data-security-token="__SECURITY_TOKEN__">
|
|
@@ -106,7 +106,7 @@ export declare const DETECTION_WEIGHTS: {
|
|
|
106
106
|
* Default extensions for common project types
|
|
107
107
|
*/
|
|
108
108
|
export declare const DEFAULT_EXTENSIONS: {
|
|
109
|
-
readonly JS: readonly [".js", ".ts", ".jsx", ".tsx", ".mjs", ".cjs", ".json", ".md"];
|
|
109
|
+
readonly JS: readonly [".js", ".ts", ".jsx", ".tsx", ".mjs", ".mts", ".cjs", ".json", ".md", ".css", ".scss", ".html"];
|
|
110
110
|
readonly JAVA: readonly [".java", ".xml", ".properties", ".md"];
|
|
111
111
|
readonly PYTHON: readonly [".py", ".pyi", ".pyw", ".md"];
|
|
112
112
|
readonly GO: readonly [".go", ".mod", ".sum", ".md"];
|
|
@@ -60,7 +60,7 @@ export const DETECTION_WEIGHTS = {
|
|
|
60
60
|
* Default extensions for common project types
|
|
61
61
|
*/
|
|
62
62
|
export const DEFAULT_EXTENSIONS = {
|
|
63
|
-
JS: ['.js', '.ts', '.jsx', '.tsx', '.mjs', '.cjs', '.json', '.md'],
|
|
63
|
+
JS: ['.js', '.ts', '.jsx', '.tsx', '.mjs', '.mts', '.cjs', '.json', '.md', '.css', '.scss', '.html'],
|
|
64
64
|
JAVA: ['.java', '.xml', '.properties', '.md'],
|
|
65
65
|
PYTHON: ['.py', '.pyi', '.pyw', '.md'],
|
|
66
66
|
GO: ['.go', '.mod', '.sum', '.md'],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/project-profiles/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA4DH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,qCAAqC;IACrC,EAAE,EAAE;QACF,GAAG,EAAE,cAAc;QACnB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,CAAC;QACnE,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,gBAAgB;KACvB;IACD,oBAAoB;IACpB,IAAI,EAAE;QACJ,KAAK,EAAE,SAAS;QAChB,MAAM,EAAE,cAAc;QACtB,MAAM,EAAE,wBAAwB;KACjC;IACD,sBAAsB;IACtB,MAAM,EAAE;QACN,MAAM,EAAE,WAAW;QACnB,KAAK,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC;QAC5B,YAAY,EAAE,kBAAkB;QAChC,MAAM,EAAE,gBAAgB;KACzB;IACD,kBAAkB;IAClB,EAAE,EAAE;QACF,GAAG,EAAE,QAAQ;QACb,IAAI,EAAE,SAAS;KAChB;CACO,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,6BAA6B;IAC7B,IAAI,EAAE;QACJ,MAAM,EAAE,CAAC;QACT,SAAS,EAAE,CAAC;QACZ,WAAW,EAAE,CAAC;QACd,OAAO,EAAE,CAAC;KACX;IACD,iCAAiC;IACjC,SAAS,EAAE;QACT,KAAK,EAAE,CAAC;QACR,IAAI,EAAE,CAAC;QACP,MAAM,EAAE,CAAC;QACT,MAAM,EAAE,CAAC;KACV;IACD,oCAAoC;IACpC,iBAAiB,EAAE,EAAE;CACb,CAAC;AAEX;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IAChC,EAAE,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/project-profiles/types.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA4DH;;GAEG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG;IACnC,qCAAqC;IACrC,EAAE,EAAE;QACF,GAAG,EAAE,cAAc;QACnB,IAAI,EAAE,WAAW;QACjB,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,CAAC,aAAa,EAAE,aAAa,EAAE,aAAa,EAAE,aAAa,CAAC;QACnE,IAAI,EAAE,gBAAgB;QACtB,IAA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AC,MAAM,oBAAoB,GAAG;IAClC,EAAE,EAAE,CAAC,cAAc,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC;IACpE,IAAI,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC;IAChE,MAAM,EAAE,CAAC,aAAa,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC;IAC1E,EAAE,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,MAAM,CAAC;CACrB,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { getImageAssets } from './function-defs/get-image-assets.js';
|
|
|
4
4
|
import { getCodegenSummaryDef } from './function-defs/codegen-summary.js';
|
|
5
5
|
import { explanation } from './function-defs/explanation.js';
|
|
6
6
|
import { generateImage } from './function-defs/generate-image.js';
|
|
7
|
-
import { getAskQuestionDef, requestPermissions, requestFilesContent, removeFilesFromContext, contextOptimization, searchCode, lint, pullAppContext, pushAppContext, requestFilesFragments, sendMessage, } from './function-defs/ask-question.js';
|
|
7
|
+
import { getAskQuestionDef, requestPermissions, requestFilesContent, removeFilesFromContext, contextOptimization, searchCode, lint, pullAppContext, pushAppContext, requestFilesFragments, sendMessage, requestGitContextDef, } from './function-defs/ask-question.js';
|
|
8
8
|
import { optimizeContext } from './function-defs/optimize-context.js';
|
|
9
9
|
import { setSummaries } from './function-defs/set-summaries.js';
|
|
10
10
|
import { updateHistory } from './function-defs/update-history.js';
|
|
@@ -18,6 +18,9 @@ import { reasoningInference, reasoningInferenceResponse } from './function-defs/
|
|
|
18
18
|
import { compressContext } from './function-defs/context-compression.js';
|
|
19
19
|
import { extractFileFragments } from './function-defs/extract-file-fragments.js';
|
|
20
20
|
import { conversationGraph, evaluateEdge } from './function-defs/conversation-graph.js';
|
|
21
|
+
import { conversationSummaryDef } from './function-defs/conversation-summary.js';
|
|
22
|
+
import { readExternalFiles } from './function-defs/read-external-files.js';
|
|
23
|
+
import { exploreExternalDirectories } from './function-defs/explore-external-directories.js';
|
|
21
24
|
/**
|
|
22
25
|
* Function definitions for function calling feature
|
|
23
26
|
*/
|
|
@@ -53,6 +56,10 @@ export function getFunctionDefs() {
|
|
|
53
56
|
conversationGraph,
|
|
54
57
|
evaluateEdge,
|
|
55
58
|
sendMessage,
|
|
59
|
+
conversationSummaryDef,
|
|
60
|
+
readExternalFiles,
|
|
61
|
+
exploreExternalDirectories,
|
|
62
|
+
requestGitContextDef,
|
|
56
63
|
...getOperationDefs(),
|
|
57
64
|
].map((fd) => {
|
|
58
65
|
if (!disableExplanations &&
|
|
@@ -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,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAC1E,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAClE,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,UAAU,EACV,IAAI,EACJ,cAAc,EACd,cAAc,EACd,qBAAqB,EACrB,WAAW,
|
|
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,EA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;IAC7B,OAAO;QACL,aAAa;QACb,cAAc;QACd,oBAAoB,EAAE;QACtB,qBAAqB,EAAE;QACvB,WAAW;QACX,aAAa;QACb,iBAAiB,EAAE;QACnB,kBAAkB;QAClB,UAAU;QACV,IAAI;QACJ,mBAAmB;QACnB,sBAAsB;QACtB,mBAAmB;QACnB,eAAe;QACf,YAAY;QACZ,aAAa;QACb,WAAW;QACX,eAAe;QACf,cAAc;QACd,cAAc;QACd,cAAc;QACd,gBAAgB;QAChB,kBAAkB;QAClB,eAAe;QACf,0BAA0B;QAC1B,oBAAoB;QACpB,qBAAqB;QACrB,iBAAiB;QACjB,YAAY;QACZ,WAAW;QACX,sBAAsB;QACtB,iBAAiB;QACjB,0BAA0B;QAC1B,oBAAoB;QACpB,GAAG,gBAAgB,EAAE;KACtB,CAAC,GAAG,CAAC,CAAC,EAAe,EAAE,EAAE;QACxB,IACE,CAAC,mBAAmB;YACpB,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW;YACpC,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC/C,CAAC;YACD,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC;QAChD,CAAC;aAAM,IAAI,mBAAmB,EAAE,CAAC;YAC/B,OAAO,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,WAAW,CAAC;QAC9C,CAAC;QAED,OAAO,EAAE,CAAC;IACZ,CAAC,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -9,11 +9,14 @@ function getActionTypeDescription() {
|
|
|
9
9
|
Detailed Explanation of actionTypes:
|
|
10
10
|
- sendMessage: Use for general information, clarifications, or when no specific code is needed, or when there is a need to analyze something.
|
|
11
11
|
- generateImage: Use this action only if there is a need to generate an image based on the conversation, and then display it to the user.
|
|
12
|
-
- updateFile: Use to update a single file that exists already with a new content. The user will be able to see the diff and approve or reject the change. Then you will be able to continue the conversation.
|
|
12
|
+
- updateFile: Use to update a single file that exists already with a new content, **AFTER you have already obtained the file content using \`requestFilesContent\` if necessary**. This action is suitable for small changes. The user will be able to see the diff and approve or reject the change. Then you will be able to continue the conversation.
|
|
13
13
|
- createFile: Use to create a new file with the provided content. The user will be able to see the new file and approve or reject the change. Then you will be able to continue the conversation.
|
|
14
14
|
- performAnalysis: Use when there's a need to analyze complex problems or data that requires enhanced context or more expensive computation. This action supports both code and image analysis with customizable context and parameters.
|
|
15
15
|
- requestPermissions: Use **only when you lack necessary permissions** for actions like creating, deleting, or moving files, and need to request them from the user.
|
|
16
|
-
- requestFilesContent: Use specifically when needing to access or review the contents of files, and it
|
|
16
|
+
- requestFilesContent: Use specifically when needing to access or review the contents of files, and it is **not already present in the \`sourceCode\`**. Only use this action if the file content is genuinely missing after the \`getSourceCode\` function response.
|
|
17
|
+
- readExternalFiles: Use to request access to **read the content of specific files** located outside the project's root directory. User confirmation is required for the batch of external files. Only processed information (summary or extracted facts) will be returned, not the raw file content. **This function is for getting the *contents* of known external files, not for listing directory contents.**
|
|
18
|
+
- exploreExternalDirectories: Use to **list files and subdirectories within directories** located outside the project's root directory. You can specify criteria to filter the files (recursive, depth, search phrases). User confirmation is required. **This function returns a list of file paths, allowing you to explore directory structures.**
|
|
19
|
+
${rcConfig.featuresEnabled?.gitContext !== false ? '- requestGitContext: Use to request Git context information like recent commits, file changes, blame output, or file diffs for specific files/commits.' : ''}
|
|
17
20
|
- removeFilesFromContext: Use to remove unnecessary file contents from context, optimizing token usage.
|
|
18
21
|
- 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.
|
|
19
22
|
- contextCompression: Use to compress the context by removing unnecessary tokens and optimizing the context size while maintaining essential information.
|
|
@@ -41,6 +44,9 @@ export const actionTypeOptions = [
|
|
|
41
44
|
'performAnalysis',
|
|
42
45
|
'requestPermissions',
|
|
43
46
|
'requestFilesContent',
|
|
47
|
+
'readExternalFiles',
|
|
48
|
+
'exploreExternalDirectories',
|
|
49
|
+
...(rcConfig.featuresEnabled?.gitContext !== false ? ['requestGitContext'] : ''),
|
|
44
50
|
'removeFilesFromContext',
|
|
45
51
|
'contextOptimization',
|
|
46
52
|
'contextCompression',
|
|
@@ -79,7 +85,7 @@ The \`message\` property must align with the chosen \`actionType\`.
|
|
|
79
85
|
decisionMakingProcess: {
|
|
80
86
|
type: 'string',
|
|
81
87
|
description: `A detailed reasoning framework describing how you chose the action.
|
|
82
|
-
The decisionMakingProcess value
|
|
88
|
+
The decisionMakingProcess value **MUST** be provided in the following **EXACT** format:
|
|
83
89
|
|
|
84
90
|
\`\`\`
|
|
85
91
|
1. **Contextual Analysis**:
|
|
@@ -138,7 +144,7 @@ export const sendMessage = {
|
|
|
138
144
|
// requestFilesContent
|
|
139
145
|
export const requestFilesContent = {
|
|
140
146
|
name: 'requestFilesContent',
|
|
141
|
-
description: 'Use this function to request the content of files that are missing from the
|
|
147
|
+
description: 'Use this function to request the content of files that are missing from the `sourceCode`.',
|
|
142
148
|
parameters: {
|
|
143
149
|
type: 'object',
|
|
144
150
|
properties: {
|
|
@@ -356,4 +362,32 @@ export const pushAppContext = {
|
|
|
356
362
|
required: ['key', 'value'],
|
|
357
363
|
},
|
|
358
364
|
};
|
|
365
|
+
// requestGitContext
|
|
366
|
+
export const requestGitContextDef = {
|
|
367
|
+
name: 'requestGitContext',
|
|
368
|
+
description: 'Use this function to request Git context information like recent commits, file changes, blame output, or file diffs.',
|
|
369
|
+
parameters: {
|
|
370
|
+
type: 'object',
|
|
371
|
+
properties: {
|
|
372
|
+
requestType: {
|
|
373
|
+
type: 'string',
|
|
374
|
+
enum: ['commits', 'fileChanges', 'blame', 'fileDiff'],
|
|
375
|
+
description: 'The type of Git information to request.',
|
|
376
|
+
},
|
|
377
|
+
filePath: {
|
|
378
|
+
type: 'string',
|
|
379
|
+
description: "The absolute file path required for 'fileChanges', 'blame', and 'fileDiff' requests.",
|
|
380
|
+
},
|
|
381
|
+
commitHash: {
|
|
382
|
+
type: 'string',
|
|
383
|
+
description: "The specific commit hash for 'blame' and 'fileDiff' requests.",
|
|
384
|
+
},
|
|
385
|
+
count: {
|
|
386
|
+
type: 'number',
|
|
387
|
+
description: "The number of recent commits to retrieve for 'commits' requests.",
|
|
388
|
+
},
|
|
389
|
+
},
|
|
390
|
+
required: ['requestType'],
|
|
391
|
+
},
|
|
392
|
+
};
|
|
359
393
|
//# sourceMappingURL=ask-question.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ask-question.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/ask-question.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,sCAAsC,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAElH,SAAS,wBAAwB;IAC/B,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,sCAAsC,EAAE,CAAC,OAAO,EAAE,CAAC;SACtF,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,MAAM,UAAU,KAAK,WAAW,EAAE,CAAC;SACtE,IAAI,CAAC,IAAI,CAAC,CAAC;IAEd,OAAO
|
|
1
|
+
{"version":3,"file":"ask-question.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/ask-question.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,sCAAsC,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAElH,SAAS,wBAAwB;IAC/B,MAAM,kBAAkB,GAAG,KAAK,CAAC,IAAI,CAAC,sCAAsC,EAAE,CAAC,OAAO,EAAE,CAAC;SACtF,GAAG,CAAC,CAAC,CAAC,UAAU,EAAE,WAAW,CAAC,EAAE,EAAE,CAAC,MAAM,UAAU,KAAK,WAAW,EAAE,CAAC;SACtE,IAAI,CAAC,IAAI,CAAC,C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,WAAW,EAAE,yCAAyC;aACvD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sEAAsE;aACpF;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kDAAkD;aAChE;SACF;QACD,QAAQ,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC;KAC3B;CACF,CAAC;AAEF,oBAAoB;AACpB,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,sHAAsH;IACxH,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,IAAI,EAAE,CAAC,SAAS,EAAE,aAAa,EAAE,OAAO,EAAE,UAAU,CAAC;gBACrD,WAAW,EAAE,yCAAyC;aACvD;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sFAAsF;aACpG;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+DAA+D;aAC7E;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,kEAAkE;aAChF;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,CAAC;KAC1B;CACF,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export const conversationSummaryDef = {
|
|
2
|
+
name: 'conversationSummary',
|
|
3
|
+
description: 'Summarize the conversation and provide a title.',
|
|
4
|
+
parameters: {
|
|
5
|
+
type: 'object',
|
|
6
|
+
properties: {
|
|
7
|
+
title: {
|
|
8
|
+
type: 'string',
|
|
9
|
+
description: 'A short title for the conversation.',
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
required: ['title'],
|
|
13
|
+
},
|
|
14
|
+
};
|
|
15
|
+
//# sourceMappingURL=conversation-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"conversation-summary.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/conversation-summary.ts"],"names":[],"mappings":"AAEA,MAAM,CAAC,MAAM,sBAAsB,GAAgB;IACjD,IAAI,EAAE,qBAAqB;IAC3B,WAAW,EAAE,iDAAiD;IAC9D,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qCAAqC;aACnD;SACF;QACD,QAAQ,EAAE,CAAC,OAAO,CAAC;KACpB;CACF,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { FunctionDef } from '../../ai-service/common-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Function definition for exploreExternalDirectories
|
|
4
|
+
*
|
|
5
|
+
* Use this function to explore directories located outside the project's root directory.
|
|
6
|
+
* User confirmation is required.
|
|
7
|
+
*/
|
|
8
|
+
export declare const exploreExternalDirectories: FunctionDef;
|
|
9
|
+
export type ExploreExternalDirectoriesArgs = {
|
|
10
|
+
directories: string[];
|
|
11
|
+
recursive?: boolean;
|
|
12
|
+
depth: number;
|
|
13
|
+
searchPhrases?: string[];
|
|
14
|
+
maxResults?: number;
|
|
15
|
+
reason: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for exploreExternalDirectories
|
|
3
|
+
*
|
|
4
|
+
* Use this function to explore directories located outside the project's root directory.
|
|
5
|
+
* User confirmation is required.
|
|
6
|
+
*/
|
|
7
|
+
export const exploreExternalDirectories = {
|
|
8
|
+
name: 'exploreExternalDirectories',
|
|
9
|
+
description: "Use this function to explore directories located outside the project's root directory. User confirmation is required. Returns a list of file paths matching the criteria.",
|
|
10
|
+
parameters: {
|
|
11
|
+
type: 'object',
|
|
12
|
+
properties: {
|
|
13
|
+
directories: {
|
|
14
|
+
type: 'array',
|
|
15
|
+
items: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
},
|
|
18
|
+
minLength: 1,
|
|
19
|
+
description: 'An array of absolute or relative directory paths for the external directories to explore.',
|
|
20
|
+
},
|
|
21
|
+
recursive: {
|
|
22
|
+
type: 'boolean',
|
|
23
|
+
description: 'Whether to explore directories recursively (default: false).',
|
|
24
|
+
},
|
|
25
|
+
depth: {
|
|
26
|
+
type: 'number',
|
|
27
|
+
description: 'Maximum depth for directory exploration. Must be 0 if not recursive. Must be >= 0.',
|
|
28
|
+
},
|
|
29
|
+
searchPhrases: {
|
|
30
|
+
type: 'array',
|
|
31
|
+
items: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
},
|
|
34
|
+
description: 'Optional array of phrases to search for within file content (case-insensitive). Returns files containing ALL phrases.',
|
|
35
|
+
},
|
|
36
|
+
maxResults: {
|
|
37
|
+
type: 'number',
|
|
38
|
+
description: 'Maximum number of file paths to return (default: 50).',
|
|
39
|
+
},
|
|
40
|
+
reason: {
|
|
41
|
+
type: 'string',
|
|
42
|
+
description: 'The reason why exploring these external directories is needed for the current task.',
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
required: ['directories', 'reason', 'depth'], // Added depth here
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=explore-external-directories.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explore-external-directories.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/explore-external-directories.ts"],"names":[],"mappings":"AAEA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAgB;IACrD,IAAI,EAAE,4BAA4B;IAClC,WAAW,EACT,2KAA2K;IAC7K,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,WAAW,EAAE;gBACX,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;gBACD,SAAS,EAAE,CAAC;gBACZ,WAAW,EAAE,2FAA2F;aACzG;YACD,SAAS,EAAE;gBACT,IAAI,EAAE,SAAS;gBACf,WAAW,EAAE,8DAA8D;aAC5E;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,oFAAoF;aAClG;YACD,aAAa,EAAE;gBACb,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;gBACD,WAAW,EACT,uHAAuH;aAC1H;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,uDAAuD;aACrE;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,qFAAqF;aACnG;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,EAAE,QAAQ,EAAE,OAAO,CAAC,EAAE,mBAAmB;KAClE;CACF,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { FunctionDef } from '../../ai-service/common-types.js';
|
|
2
|
+
/**
|
|
3
|
+
* Function definition for readExternalFiles
|
|
4
|
+
*
|
|
5
|
+
* Use this function to request access to read files located outside the project's root directory.
|
|
6
|
+
* User confirmation is required for the batch of external files. Only processed information (summary or extracted facts)
|
|
7
|
+
* will be returned, not the raw file content.
|
|
8
|
+
*/
|
|
9
|
+
export declare const readExternalFiles: FunctionDef;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for readExternalFiles
|
|
3
|
+
*
|
|
4
|
+
* Use this function to request access to read files located outside the project's root directory.
|
|
5
|
+
* User confirmation is required for the batch of external files. Only processed information (summary or extracted facts)
|
|
6
|
+
* will be returned, not the raw file content.
|
|
7
|
+
*/
|
|
8
|
+
export const readExternalFiles = {
|
|
9
|
+
name: 'readExternalFiles',
|
|
10
|
+
description: "Use this function to request access to read files located outside the project's root directory. User confirmation is required for the batch of external files. Only processed information (summary or extracted facts) will be returned, not the raw file content.",
|
|
11
|
+
parameters: {
|
|
12
|
+
type: 'object',
|
|
13
|
+
properties: {
|
|
14
|
+
externalFilePaths: {
|
|
15
|
+
type: 'array',
|
|
16
|
+
items: {
|
|
17
|
+
type: 'string',
|
|
18
|
+
},
|
|
19
|
+
minLength: 1,
|
|
20
|
+
description: 'An array of absolute or relative file paths for the external files to read.',
|
|
21
|
+
},
|
|
22
|
+
reason: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'The reason why access to these external files is needed for the current task.',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
required: ['externalFilePaths', 'reason'],
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=read-external-files.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"read-external-files.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/read-external-files.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAgB;IAC5C,IAAI,EAAE,mBAAmB;IACzB,WAAW,EACT,oQAAoQ;IACtQ,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,iBAAiB,EAAE;gBACjB,IAAI,EAAE,OAAO;gBACb,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;gBACD,SAAS,EAAE,CAAC;gBACZ,WAAW,EAAE,6EAA6E;aAC3F;YACD,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+EAA+E;aAC7F;SACF;QACD,QAAQ,EAAE,CAAC,mBAAmB,EAAE,QAAQ,CAAC;KAC1C;CACF,CAAC"}
|
package/dist/prompt/limits.js
CHANGED
|
@@ -2,7 +2,7 @@ import assert from 'node:assert';
|
|
|
2
2
|
import { estimateTokenCount } from './token-estimator.js';
|
|
3
3
|
const SYSTEM_PROMPT_LIMIT = 3500;
|
|
4
4
|
const CODEGEN_PROMPT_LIMIT = 1600;
|
|
5
|
-
const SOURCE_CODE_LIMIT =
|
|
5
|
+
const SOURCE_CODE_LIMIT = 160000;
|
|
6
6
|
function verifyPromptLimit(promptType, prompt, limit) {
|
|
7
7
|
const tokenCount = estimateTokenCount(prompt);
|
|
8
8
|
console.log(`${promptType} prompt estimated token count: ${tokenCount}`);
|
|
@@ -57,32 +57,33 @@ export async function handleCodeGeneration({ generateContentFn, generateImageFn,
|
|
|
57
57
|
const { codegenSummaryRequest, baseResult } = await generateCodegenSummary(generateContentFn, prompt, getFunctionDefs(), options);
|
|
58
58
|
// Ask user to confirm the codegen summary
|
|
59
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
|
+
}
|
|
60
64
|
if (!codegenSummaryConfirmation.confirmed) {
|
|
61
|
-
|
|
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
|
+
});
|
|
62
74
|
return {
|
|
63
75
|
breakLoop: false,
|
|
64
|
-
items: [
|
|
65
|
-
{
|
|
66
|
-
assistant: {
|
|
67
|
-
type: 'assistant',
|
|
68
|
-
text: CODEGEN_SUMMARY_GENERATED_MESSAGE,
|
|
69
|
-
},
|
|
70
|
-
user: {
|
|
71
|
-
type: 'user',
|
|
72
|
-
text: codegenSummaryConfirmation.answer || 'Codegen summary rejected. Returning to conversation.',
|
|
73
|
-
},
|
|
74
|
-
},
|
|
75
|
-
],
|
|
76
|
+
items: [],
|
|
76
77
|
};
|
|
77
78
|
}
|
|
78
|
-
|
|
79
|
-
putUserMessage(codegenSummaryConfirmation.answer || CODEGEN_SUMMARY_APPROVED);
|
|
79
|
+
putSystemMessage('Codegen summary accepted. Proceeding with code generation.');
|
|
80
80
|
prompt.push({
|
|
81
81
|
type: 'assistant',
|
|
82
82
|
text: CODEGEN_SUMMARY_GENERATED_MESSAGE,
|
|
83
83
|
}, {
|
|
84
84
|
type: 'user',
|
|
85
|
-
text:
|
|
85
|
+
text: CODEGEN_SUMMARY_APPROVED +
|
|
86
|
+
(codegenSummaryConfirmation.answer ? `\n\n${codegenSummaryConfirmation.answer}` : ''),
|
|
86
87
|
});
|
|
87
88
|
// Second step: Process file updates
|
|
88
89
|
const updateResults = await processFileUpdates(generateContentFn, prompt, getFunctionDefs(), options, codegenSummaryRequest, waitIfPaused, generateImageFn);
|
|
@@ -90,7 +91,9 @@ export async function handleCodeGeneration({ generateContentFn, generateImageFn,
|
|
|
90
91
|
const confirmApply = await askUserForConfirmationWithAnswer('Code changes are generated, now what?', 'Apply code changes', 'Reject code changes', true, options);
|
|
91
92
|
putAssistantMessage('Code changes are generated, now what?');
|
|
92
93
|
if (confirmApply.confirmed) {
|
|
93
|
-
|
|
94
|
+
if (confirmApply.answer) {
|
|
95
|
+
putUserMessage(confirmApply.answer);
|
|
96
|
+
}
|
|
94
97
|
prompt.push({
|
|
95
98
|
type: 'assistant',
|
|
96
99
|
text: 'Code changes are generated, now what?',
|
|
@@ -109,7 +112,9 @@ export async function handleCodeGeneration({ generateContentFn, generateImageFn,
|
|
|
109
112
|
}
|
|
110
113
|
}
|
|
111
114
|
else {
|
|
112
|
-
|
|
115
|
+
if (confirmApply.answer) {
|
|
116
|
+
putUserMessage(confirmApply.answer);
|
|
117
|
+
}
|
|
113
118
|
putSystemMessage('Rejecting code changes...');
|
|
114
119
|
prompt.push({
|
|
115
120
|
type: 'assistant',
|
|
@@ -1 +1 @@
|
|
|
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,MAAM,cAAc,GAAG,MAAM,0BAA0B,CAAC,iBAAiB,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC;IAC5F,IAAI,cAAc,KAAK,UAAU,CAAC,KAAK,EAAE,CAAC;QACxC,OAAO;YACL,SAAS,EAAE,IAAI;YACf,KAAK,EAAE,EAAE;SACV,CAAC;IACJ,CAAC;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AM,sBAAsB,CACxE,iBAAiB,EACjB,MAAM,EACN,eAAe,EAAE,EACjB,OAAO,CACR,CAAC;QAEF,0CAA0C;QAC1C,MAAM,0BAA0B,GAAG,MAAM,gCAAgC,CACvE,iCAAiC,EACjC,wBAAwB,EACxB,wBAAwB,EACxB,IAAI,EACJ,OAAO,CACR,CAAC;QAEF,
|
|
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,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AC,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"}
|
|
@@ -75,22 +75,21 @@ registerActionHandler('conversationGraph', handleConversationGraph);
|
|
|
75
75
|
export async function handleConversationGraph({ askQuestionCall, prompt, options, generateContentFn, generateImageFn, waitIfPaused, }) {
|
|
76
76
|
try {
|
|
77
77
|
const userConfirmation = await askUserForConfirmationWithAnswer('The assistant wants to perform a conversation graph. Do you want to proceed?', 'Run conversation graph', 'Decline', true, options);
|
|
78
|
+
if (userConfirmation.answer) {
|
|
79
|
+
putUserMessage(userConfirmation.answer);
|
|
80
|
+
}
|
|
78
81
|
if (!userConfirmation.confirmed) {
|
|
79
82
|
putSystemMessage('Conversation graph declined.');
|
|
83
|
+
prompt.push({
|
|
84
|
+
type: 'assistant',
|
|
85
|
+
text: askQuestionCall.args?.message ?? '',
|
|
86
|
+
}, {
|
|
87
|
+
type: 'user',
|
|
88
|
+
text: 'Declined conversation graph. ' + (userConfirmation.answer ? `\n\n${userConfirmation.answer}` : ''),
|
|
89
|
+
});
|
|
80
90
|
return {
|
|
81
91
|
breakLoop: false,
|
|
82
|
-
items: [
|
|
83
|
-
{
|
|
84
|
-
assistant: {
|
|
85
|
-
type: 'assistant',
|
|
86
|
-
text: askQuestionCall.args?.message ?? '',
|
|
87
|
-
},
|
|
88
|
-
user: {
|
|
89
|
-
type: 'user',
|
|
90
|
-
text: 'Declined conversation graph. ' + userConfirmation.answer,
|
|
91
|
-
},
|
|
92
|
-
},
|
|
93
|
-
],
|
|
92
|
+
items: [],
|
|
94
93
|
};
|
|
95
94
|
}
|
|
96
95
|
putSystemMessage('Generating conversation graph...');
|
|
@@ -103,9 +102,21 @@ export async function handleConversationGraph({ askQuestionCall, prompt, options
|
|
|
103
102
|
},
|
|
104
103
|
{
|
|
105
104
|
type: 'user',
|
|
106
|
-
text: CONVERSATION_GRAPH_PROMPT,
|
|
105
|
+
text: CONVERSATION_GRAPH_PROMPT + (userConfirmation.answer ? `\n\n${userConfirmation.answer}` : ''),
|
|
106
|
+
},
|
|
107
|
+
], {
|
|
108
|
+
functionDefs: getFunctionDefs(),
|
|
109
|
+
requiredFunctionName: 'conversationGraph',
|
|
110
|
+
temperature: 0.7,
|
|
111
|
+
modelType: ModelType.DEFAULT,
|
|
112
|
+
expectedResponseType: {
|
|
113
|
+
text: false,
|
|
114
|
+
functionCall: true,
|
|
115
|
+
media: false,
|
|
107
116
|
},
|
|
108
|
-
|
|
117
|
+
}, options))
|
|
118
|
+
.filter((item) => item.type === 'functionCall')
|
|
119
|
+
.map((item) => item.functionCall);
|
|
109
120
|
prompt.push({
|
|
110
121
|
type: 'assistant',
|
|
111
122
|
text: askQuestionCall.args?.message ?? '',
|
|
@@ -129,20 +140,17 @@ export async function handleConversationGraph({ askQuestionCall, prompt, options
|
|
|
129
140
|
// Start with the first node
|
|
130
141
|
let currentNode = nodes.find((node) => node.id === entryNode);
|
|
131
142
|
if (!currentNode) {
|
|
143
|
+
putSystemMessage('Error occurred during conversation graph execution.');
|
|
144
|
+
prompt.push({
|
|
145
|
+
type: 'assistant',
|
|
146
|
+
text: askQuestionCall.args?.message ?? '',
|
|
147
|
+
}, {
|
|
148
|
+
type: 'user',
|
|
149
|
+
text: 'Error occurred during conversation graph execution.',
|
|
150
|
+
});
|
|
132
151
|
return {
|
|
133
152
|
breakLoop: false,
|
|
134
|
-
items: [
|
|
135
|
-
{
|
|
136
|
-
assistant: {
|
|
137
|
-
type: 'assistant',
|
|
138
|
-
text: askQuestionCall.args?.message ?? '',
|
|
139
|
-
},
|
|
140
|
-
user: {
|
|
141
|
-
type: 'user',
|
|
142
|
-
text: 'Error occurred during conversation graph execution.',
|
|
143
|
-
},
|
|
144
|
-
},
|
|
145
|
-
],
|
|
153
|
+
items: [],
|
|
146
154
|
};
|
|
147
155
|
}
|
|
148
156
|
// Track visited nodes to prevent cycles
|
|
@@ -154,7 +162,19 @@ export async function handleConversationGraph({ askQuestionCall, prompt, options
|
|
|
154
162
|
visitedNodes.add(currentNode.id);
|
|
155
163
|
// Execute the current node
|
|
156
164
|
putSystemMessage(`Executing node ${currentNode.id}`, currentNode);
|
|
157
|
-
const [sendMessage] = (await generateContentFn(prompt,
|
|
165
|
+
const [sendMessage] = (await generateContentFn(prompt, {
|
|
166
|
+
functionDefs: getFunctionDefs(),
|
|
167
|
+
requiredFunctionName: 'sendMessage',
|
|
168
|
+
temperature: 0.7,
|
|
169
|
+
modelType: ModelType.CHEAP,
|
|
170
|
+
expectedResponseType: {
|
|
171
|
+
text: false,
|
|
172
|
+
functionCall: true,
|
|
173
|
+
media: false,
|
|
174
|
+
},
|
|
175
|
+
}, options))
|
|
176
|
+
.filter((item) => item.type === 'functionCall')
|
|
177
|
+
.map((item) => item.functionCall);
|
|
158
178
|
if (sendMessage.args?.message) {
|
|
159
179
|
putAssistantMessage(sendMessage.args.message, sendMessage.args);
|
|
160
180
|
}
|
|
@@ -186,7 +206,19 @@ export async function handleConversationGraph({ askQuestionCall, prompt, options
|
|
|
186
206
|
type: 'user',
|
|
187
207
|
text: getEdgeEvaluationPrompt(currentNode, outgoingEdges),
|
|
188
208
|
},
|
|
189
|
-
],
|
|
209
|
+
], {
|
|
210
|
+
functionDefs: getFunctionDefs(),
|
|
211
|
+
requiredFunctionName: 'evaluateEdge',
|
|
212
|
+
temperature: 0.7,
|
|
213
|
+
modelType: ModelType.CHEAP,
|
|
214
|
+
expectedResponseType: {
|
|
215
|
+
text: false,
|
|
216
|
+
functionCall: true,
|
|
217
|
+
media: false,
|
|
218
|
+
},
|
|
219
|
+
}, options))
|
|
220
|
+
.filter((item) => item.type === 'functionCall')
|
|
221
|
+
.map((item) => item.functionCall);
|
|
190
222
|
if (!evaluateEdge.args?.shouldTerminate) {
|
|
191
223
|
putSystemMessage('Conversation graph traversal terminated.');
|
|
192
224
|
break;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-conversation-graph.js","sourceRoot":"","sources":["../../../../../src/prompt/steps/step-ask-question/handlers/handle-conversation-graph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC/G,OAAO,EAAgB,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAO/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAE3F,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDxC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,WAA6B,EAAE,aAAiC,EAAE,EAAE;IAC1G,OAAO,8DAA8D,WAAW,CAAC,EAAE;;EAEnF,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;uEAEd,CAAC;AACxE,CAAC,CAAC;AAEF,qBAAqB,CAAC,mBAAmB,EAAE,uBAAuB,CAAC,CAAC;AAEpE;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAAC,EAC5C,eAAe,EACf,MAAM,EACN,OAAO,EACP,iBAAiB,EACjB,eAAe,EACf,YAAY,GACO;IACnB,IAAI,CAAC;QACH,MAAM,gBAAgB,GAAG,MAAM,gCAAgC,CAC7D,8EAA8E,EAC9E,wBAAwB,EACxB,SAAS,EACT,IAAI,EACJ,OAAO,CACR,CAAC;QAEF,IAAI,
|
|
1
|
+
{"version":3,"file":"handle-conversation-graph.js","sourceRoot":"","sources":["../../../../../src/prompt/steps/step-ask-question/handlers/handle-conversation-graph.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAC/G,OAAO,EAAgB,SAAS,EAAE,MAAM,wCAAwC,CAAC;AACjF,OAAO,EAAE,eAAe,EAAE,MAAM,8BAA8B,CAAC;AAO/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,kCAAkC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,EAAE,gCAAgC,EAAE,MAAM,yCAAyC,CAAC;AAE3F,MAAM,CAAC,MAAM,yBAAyB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoDxC,CAAC;AAEF,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,WAA6B,EAAE,aAAiC,EAAE,EAAE;IAC1G,OAAO,8DAA8D,WAAW,CAAC,EAAE;;EAEnF,aAAa,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,KAAK,IAAI,CAAC,UAAU,KAAK,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;;uEAEd,CAA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