genaicode 0.0.35 → 0.1.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 +3 -0
- package/bin/genaicode-dev.js +11 -0
- package/bin/genaicode.cjs +8 -1
- package/dist/ai-service/ai-studio.d.ts +5 -0
- package/dist/ai-service/ai-studio.js +135 -0
- package/dist/ai-service/ai-studio.js.map +1 -0
- package/dist/ai-service/anthropic.d.ts +5 -0
- package/dist/ai-service/anthropic.js +133 -0
- package/dist/ai-service/anthropic.js.map +1 -0
- package/dist/ai-service/chat-gpt.d.ts +5 -0
- package/dist/ai-service/chat-gpt.js +131 -0
- package/dist/ai-service/chat-gpt.js.map +1 -0
- package/dist/ai-service/common.d.ts +57 -0
- package/dist/ai-service/common.js +38 -0
- package/dist/ai-service/common.js.map +1 -0
- package/dist/ai-service/common.test.d.ts +1 -0
- package/dist/ai-service/common.test.js +85 -0
- package/dist/ai-service/common.test.js.map +1 -0
- package/dist/ai-service/dall-e.d.ts +14 -0
- package/dist/ai-service/dall-e.js +47 -0
- package/dist/ai-service/dall-e.js.map +1 -0
- package/dist/ai-service/vertex-ai-claude.d.ts +5 -0
- package/dist/ai-service/vertex-ai-claude.js +93 -0
- package/dist/ai-service/vertex-ai-claude.js.map +1 -0
- package/dist/ai-service/vertex-ai-imagen.d.ts +14 -0
- package/dist/ai-service/vertex-ai-imagen.js +74 -0
- package/dist/ai-service/vertex-ai-imagen.js.map +1 -0
- package/dist/ai-service/vertex-ai.d.ts +7 -0
- package/dist/ai-service/vertex-ai.js +147 -0
- package/dist/ai-service/vertex-ai.js.map +1 -0
- package/dist/cli/cli-options.d.ts +10 -0
- package/dist/cli/cli-options.js +124 -0
- package/dist/cli/cli-options.js.map +1 -0
- package/dist/cli/cli-options.test.d.ts +1 -0
- package/dist/cli/cli-options.test.js +34 -0
- package/dist/cli/cli-options.test.js.map +1 -0
- package/dist/cli/cli-params.d.ts +29 -0
- package/dist/cli/cli-params.js +103 -0
- package/dist/cli/cli-params.js.map +1 -0
- package/dist/cli/cli-params.test.d.ts +1 -0
- package/dist/cli/cli-params.test.js +38 -0
- package/dist/cli/cli-params.test.js.map +1 -0
- package/dist/cli/service-autodetect.d.ts +2 -0
- package/dist/cli/service-autodetect.js +17 -0
- package/dist/cli/service-autodetect.js.map +1 -0
- package/dist/cli/service-autodetect.test.d.ts +1 -0
- package/dist/cli/service-autodetect.test.js +38 -0
- package/dist/cli/service-autodetect.test.js.map +1 -0
- package/dist/cli/validate-cli-params.d.ts +18 -0
- package/dist/cli/validate-cli-params.js +128 -0
- package/dist/cli/validate-cli-params.js.map +1 -0
- package/dist/cli/validate-cli-params.test.d.ts +1 -0
- package/dist/cli/validate-cli-params.test.js +106 -0
- package/dist/cli/validate-cli-params.test.js.map +1 -0
- package/dist/files/file-utils.d.ts +2 -0
- package/dist/files/file-utils.js +7 -0
- package/dist/files/file-utils.js.map +1 -0
- package/dist/files/file-utils.test.d.ts +1 -0
- package/dist/files/file-utils.test.js +18 -0
- package/dist/files/file-utils.test.js.map +1 -0
- package/dist/files/find-files.d.ts +8 -0
- package/dist/files/find-files.js +76 -0
- package/dist/files/find-files.js.map +1 -0
- package/dist/files/read-files.d.ts +13 -0
- package/dist/files/read-files.js +61 -0
- package/dist/files/read-files.js.map +1 -0
- package/dist/files/read-files.test.d.ts +1 -0
- package/dist/files/read-files.test.js +89 -0
- package/dist/files/read-files.test.js.map +1 -0
- package/dist/files/temp-buffer.d.ts +2 -0
- package/dist/files/temp-buffer.js +12 -0
- package/dist/files/temp-buffer.js.map +1 -0
- package/dist/files/update-files.d.ts +5 -0
- package/dist/files/update-files.js +197 -0
- package/dist/files/update-files.js.map +1 -0
- package/dist/images/ensure-alpha.d.ts +1 -0
- package/dist/images/ensure-alpha.js +5 -0
- package/dist/images/ensure-alpha.js.map +1 -0
- package/dist/images/imgly-remove-background.d.ts +2 -0
- package/dist/images/imgly-remove-background.js +21 -0
- package/dist/images/imgly-remove-background.js.map +1 -0
- package/dist/images/resize-image.d.ts +19 -0
- package/dist/images/resize-image.js +22 -0
- package/dist/images/resize-image.js.map +1 -0
- package/dist/images/split-image.d.ts +18 -0
- package/dist/images/split-image.js +25 -0
- package/dist/images/split-image.js.map +1 -0
- package/dist/main/codegen.d.ts +2 -0
- package/dist/main/codegen.js +101 -0
- package/dist/main/codegen.js.map +1 -0
- package/dist/main/codegen.test.d.ts +2 -0
- package/dist/main/codegen.test.js +259 -0
- package/dist/main/codegen.test.js.map +1 -0
- package/dist/main/config-lib.d.ts +8 -0
- package/dist/main/config-lib.js +28 -0
- package/dist/main/config-lib.js.map +1 -0
- package/dist/main/config-lib.test.d.ts +1 -0
- package/dist/main/config-lib.test.js +64 -0
- package/dist/main/config-lib.test.js.map +1 -0
- package/dist/main/config.d.ts +5 -0
- package/{src → dist}/main/config.js +16 -22
- package/dist/main/config.js.map +1 -0
- package/dist/prompt/function-calling-validate.d.ts +3 -0
- package/dist/prompt/function-calling-validate.js +27 -0
- package/dist/prompt/function-calling-validate.js.map +1 -0
- package/dist/prompt/function-calling.d.ts +5 -0
- package/dist/prompt/function-calling.js +48 -0
- package/dist/prompt/function-calling.js.map +1 -0
- package/dist/prompt/function-defs/ask-question.d.ts +31 -0
- package/dist/prompt/function-defs/ask-question.js +32 -0
- package/dist/prompt/function-defs/ask-question.js.map +1 -0
- package/dist/prompt/function-defs/codegen-summary.d.ts +63 -0
- package/dist/prompt/function-defs/codegen-summary.js +80 -0
- package/dist/prompt/function-defs/codegen-summary.js.map +1 -0
- package/dist/prompt/function-defs/create-directory.d.ts +21 -0
- package/dist/prompt/function-defs/create-directory.js +22 -0
- package/dist/prompt/function-defs/create-directory.js.map +1 -0
- package/dist/prompt/function-defs/create-file.d.ts +25 -0
- package/dist/prompt/function-defs/create-file.js +26 -0
- package/dist/prompt/function-defs/create-file.js.map +1 -0
- package/dist/prompt/function-defs/delete-file.d.ts +21 -0
- package/dist/prompt/function-defs/delete-file.js +22 -0
- package/dist/prompt/function-defs/delete-file.js.map +1 -0
- package/dist/prompt/function-defs/download-file.d.ts +25 -0
- package/dist/prompt/function-defs/download-file.js +26 -0
- package/dist/prompt/function-defs/download-file.js.map +1 -0
- package/dist/prompt/function-defs/explanation.d.ts +17 -0
- package/dist/prompt/function-defs/explanation.js +18 -0
- package/dist/prompt/function-defs/explanation.js.map +1 -0
- package/dist/prompt/function-defs/generate-image.d.ts +48 -0
- package/dist/prompt/function-defs/generate-image.js +49 -0
- package/dist/prompt/function-defs/generate-image.js.map +1 -0
- package/dist/prompt/function-defs/get-image-assets.d.ts +20 -0
- package/dist/prompt/function-defs/get-image-assets.js +21 -0
- package/dist/prompt/function-defs/get-image-assets.js.map +1 -0
- package/dist/prompt/function-defs/get-source-code.d.ts +20 -0
- package/dist/prompt/function-defs/get-source-code.js +21 -0
- package/dist/prompt/function-defs/get-source-code.js.map +1 -0
- package/dist/prompt/function-defs/imgly-remove-background.d.ts +25 -0
- package/dist/prompt/function-defs/imgly-remove-background.js +26 -0
- package/dist/prompt/function-defs/imgly-remove-background.js.map +1 -0
- package/dist/prompt/function-defs/move-file.d.ts +25 -0
- package/dist/prompt/function-defs/move-file.js +26 -0
- package/dist/prompt/function-defs/move-file.js.map +1 -0
- package/dist/prompt/function-defs/patch-file.d.ts +25 -0
- package/dist/prompt/function-defs/patch-file.js +39 -0
- package/dist/prompt/function-defs/patch-file.js.map +1 -0
- package/dist/prompt/function-defs/resize-image.d.ts +36 -0
- package/dist/prompt/function-defs/resize-image.js +37 -0
- package/dist/prompt/function-defs/resize-image.js.map +1 -0
- package/dist/prompt/function-defs/split-image.d.ts +57 -0
- package/dist/prompt/function-defs/split-image.js +46 -0
- package/dist/prompt/function-defs/split-image.js.map +1 -0
- package/dist/prompt/function-defs/update-file.d.ts +25 -0
- package/dist/prompt/function-defs/update-file.js +26 -0
- package/dist/prompt/function-defs/update-file.js.map +1 -0
- package/dist/prompt/limits.d.ts +3 -0
- package/dist/prompt/limits.js +19 -0
- package/dist/prompt/limits.js.map +1 -0
- package/dist/prompt/limits.test.d.ts +1 -0
- package/dist/prompt/limits.test.js +35 -0
- package/dist/prompt/limits.test.js.map +1 -0
- package/dist/prompt/prompt-codegen.d.ts +4 -0
- package/dist/prompt/prompt-codegen.js +81 -0
- package/dist/prompt/prompt-codegen.js.map +1 -0
- package/dist/prompt/prompt-codegen.test.d.ts +1 -0
- package/dist/prompt/prompt-codegen.test.js +94 -0
- package/dist/prompt/prompt-codegen.test.js.map +1 -0
- package/dist/prompt/prompt-consts.d.ts +1 -0
- package/{src → dist}/prompt/prompt-consts.js +1 -0
- package/dist/prompt/prompt-consts.js.map +1 -0
- package/dist/prompt/prompt-service-ask-question.test.d.ts +3 -0
- package/dist/prompt/prompt-service-ask-question.test.js +146 -0
- package/dist/prompt/prompt-service-ask-question.test.js.map +1 -0
- package/dist/prompt/prompt-service.d.ts +13 -0
- package/dist/prompt/prompt-service.js +278 -0
- package/dist/prompt/prompt-service.js.map +1 -0
- package/dist/prompt/prompt-service.test.d.ts +1 -0
- package/dist/prompt/prompt-service.test.js +511 -0
- package/dist/prompt/prompt-service.test.js.map +1 -0
- package/dist/prompt/systemprompt.d.ts +2 -0
- package/dist/prompt/systemprompt.js +43 -0
- package/dist/prompt/systemprompt.js.map +1 -0
- package/dist/prompt/systemprompt.test.d.ts +2 -0
- package/dist/prompt/systemprompt.test.js +47 -0
- package/dist/prompt/systemprompt.test.js.map +1 -0
- package/package.json +15 -5
- package/bin/genaicode.js +0 -5
- package/src/ai-service/anthropic.js +0 -95
- package/src/ai-service/chat-gpt.js +0 -99
- package/src/ai-service/common.js +0 -40
- package/src/ai-service/common.test.js +0 -107
- package/src/ai-service/dall-e.js +0 -50
- package/src/ai-service/vertex-ai-claude.js +0 -99
- package/src/ai-service/vertex-ai-imagen.js +0 -78
- package/src/ai-service/vertex-ai.js +0 -156
- package/src/cli/cli-options.js +0 -120
- package/src/cli/cli-options.test.js +0 -50
- package/src/cli/cli-params.js +0 -99
- package/src/cli/cli-params.test.js +0 -43
- package/src/cli/service-autodetect.js +0 -11
- package/src/cli/service-autodetect.test.js +0 -43
- package/src/cli/validate-cli-params.js +0 -117
- package/src/cli/validate-cli-params.test.js +0 -134
- package/src/files/file-utils.js +0 -7
- package/src/files/file-utils.test.js +0 -21
- package/src/files/find-files.js +0 -86
- package/src/files/read-files.js +0 -60
- package/src/files/read-files.test.js +0 -102
- package/src/files/temp-buffer.js +0 -13
- package/src/files/update-files.js +0 -205
- package/src/images/ensure-alpha.js +0 -5
- package/src/images/imgly-remove-background.js +0 -23
- package/src/images/resize-image.js +0 -23
- package/src/images/split-image.js +0 -26
- package/src/main/codegen.js +0 -120
- package/src/main/codegen.test.js +0 -334
- package/src/main/config-lib.js +0 -33
- package/src/main/config-lib.test.js +0 -80
- package/src/prompt/function-calling-validate.js +0 -25
- package/src/prompt/function-calling.js +0 -454
- package/src/prompt/limits.js +0 -23
- package/src/prompt/limits.test.js +0 -40
- package/src/prompt/prompt-codegen.js +0 -106
- package/src/prompt/prompt-codegen.test.js +0 -116
- package/src/prompt/prompt-service.js +0 -287
- package/src/prompt/prompt-service.test.js +0 -601
- package/src/prompt/systemprompt.js +0 -32
- package/src/prompt/systemprompt.test.js +0 -63
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for codegenSummary
|
|
3
|
+
*/
|
|
4
|
+
export declare const codegenSummary: {
|
|
5
|
+
readonly name: "codegenSummary";
|
|
6
|
+
readonly description: string;
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly contextPaths: {
|
|
11
|
+
readonly type: "array";
|
|
12
|
+
readonly description: "An array of absolute paths of files that should be used to provide context for the following updates. Context files could be for example the dependencies, or files that depend on one of the files that we want to update in the next step.";
|
|
13
|
+
readonly items: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
readonly fileUpdates: {
|
|
18
|
+
readonly type: "array";
|
|
19
|
+
readonly description: "An array of proposed file updates, each update is an object with several properties.";
|
|
20
|
+
readonly items: {
|
|
21
|
+
readonly type: "object";
|
|
22
|
+
readonly description: "Proposed update of a file. The update is an object which contains properties like file path, update tool name, and few other important properties.";
|
|
23
|
+
readonly properties: {
|
|
24
|
+
readonly path: {
|
|
25
|
+
readonly type: "string";
|
|
26
|
+
readonly description: "An absolute path of the project file that will be updated";
|
|
27
|
+
};
|
|
28
|
+
readonly updateToolName: {
|
|
29
|
+
readonly type: "string";
|
|
30
|
+
readonly enum: readonly ["createFile", "updateFile", "patchFile", "deleteFile", "createDirectory", "moveFile", "generateImage", "downloadFile", "splitImage", "resizeImage", "imglyRemoveBackground"];
|
|
31
|
+
readonly description: "A name of the tool that will be used to perform the update.";
|
|
32
|
+
};
|
|
33
|
+
readonly temperature: {
|
|
34
|
+
readonly type: "number";
|
|
35
|
+
readonly description: string;
|
|
36
|
+
};
|
|
37
|
+
readonly cheap: {
|
|
38
|
+
readonly type: "boolean";
|
|
39
|
+
readonly description: string;
|
|
40
|
+
};
|
|
41
|
+
readonly prompt: {
|
|
42
|
+
readonly type: "string";
|
|
43
|
+
readonly description: "Prompt that will be passed to the model request together with the tool request. It summarizes the planned changes for this particular file, so it should be detailed enough for the model to generate necessary changes.";
|
|
44
|
+
};
|
|
45
|
+
readonly contextImageAssets: {
|
|
46
|
+
readonly type: "array";
|
|
47
|
+
readonly description: string;
|
|
48
|
+
readonly items: {
|
|
49
|
+
readonly type: "string";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
readonly required: readonly ["path", "updateToolName", ...string[]];
|
|
54
|
+
};
|
|
55
|
+
};
|
|
56
|
+
readonly explanation: {
|
|
57
|
+
readonly type: "string";
|
|
58
|
+
readonly description: "Explanation of planned changes or explanation of reasoning for no code changes";
|
|
59
|
+
};
|
|
60
|
+
};
|
|
61
|
+
readonly required: readonly ["fileUpdates", "contextPaths"];
|
|
62
|
+
};
|
|
63
|
+
};
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { temperature, cheap, vision } from '../../cli/cli-params.js';
|
|
2
|
+
/**
|
|
3
|
+
* Function definition for codegenSummary
|
|
4
|
+
*/
|
|
5
|
+
export const codegenSummary = {
|
|
6
|
+
name: 'codegenSummary',
|
|
7
|
+
description: 'This function is called with a summary of proposed updates.' +
|
|
8
|
+
'Summary is a data structure(object) which contains:\n' +
|
|
9
|
+
'- `fileUpdates`: list of proposed file updates that will be subject to subsequent code generation request\n' +
|
|
10
|
+
'- `contextPaths`: list of file paths that make sense to use as a context for code generation requests.' +
|
|
11
|
+
'- `explanation`: general explanation of planned code generation updates\n' +
|
|
12
|
+
'It is crticially important to adhere to the schema of parameters',
|
|
13
|
+
parameters: {
|
|
14
|
+
type: 'object',
|
|
15
|
+
properties: {
|
|
16
|
+
contextPaths: {
|
|
17
|
+
type: 'array',
|
|
18
|
+
description: 'An array of absolute paths of files that should be used to provide context for the following updates. Context files could be for example the dependencies, or files that depend on one of the files that we want to update in the next step.',
|
|
19
|
+
items: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
fileUpdates: {
|
|
24
|
+
type: 'array',
|
|
25
|
+
description: 'An array of proposed file updates, each update is an object with several properties.',
|
|
26
|
+
items: {
|
|
27
|
+
type: 'object',
|
|
28
|
+
description: 'Proposed update of a file. The update is an object which contains properties like file path, update tool name, and few other important properties.',
|
|
29
|
+
properties: {
|
|
30
|
+
path: { type: 'string', description: 'An absolute path of the project file that will be updated' },
|
|
31
|
+
updateToolName: {
|
|
32
|
+
type: 'string',
|
|
33
|
+
enum: [
|
|
34
|
+
'createFile',
|
|
35
|
+
'updateFile',
|
|
36
|
+
'patchFile',
|
|
37
|
+
'deleteFile',
|
|
38
|
+
'createDirectory',
|
|
39
|
+
'moveFile',
|
|
40
|
+
'generateImage',
|
|
41
|
+
'downloadFile',
|
|
42
|
+
'splitImage',
|
|
43
|
+
'resizeImage',
|
|
44
|
+
'imglyRemoveBackground',
|
|
45
|
+
],
|
|
46
|
+
description: 'A name of the tool that will be used to perform the update.',
|
|
47
|
+
},
|
|
48
|
+
temperature: {
|
|
49
|
+
type: 'number',
|
|
50
|
+
description: 'Temperature parameter that will be used for LLM request. The value is adjusted to the characteristic of the update. If there is a need for a more creative solution, the value should be lower, but stil within [0.0, 2.0] range. The default value is: ' +
|
|
51
|
+
temperature,
|
|
52
|
+
},
|
|
53
|
+
cheap: {
|
|
54
|
+
type: 'boolean',
|
|
55
|
+
description: 'true value means that the prompt will be executed with cheaper model, which work faster, but provides lower quality results, so please use it only in situation when lower quality results are acceptable for the prompt. The default value is: ' +
|
|
56
|
+
!!cheap,
|
|
57
|
+
},
|
|
58
|
+
prompt: {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Prompt that will be passed to the model request together with the tool request. It summarizes the planned changes for this particular file, so it should be detailed enough for the model to generate necessary changes.',
|
|
61
|
+
},
|
|
62
|
+
contextImageAssets: {
|
|
63
|
+
type: 'array',
|
|
64
|
+
description: 'A list of of absolute image asset paths that should be included to the context of LLM request.' +
|
|
65
|
+
'This parameter must be used if there is a need to analyze an image.',
|
|
66
|
+
items: { type: 'string' },
|
|
67
|
+
},
|
|
68
|
+
},
|
|
69
|
+
required: ['path', 'updateToolName', ...(vision ? ['contextImageAssets'] : [])],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
explanation: {
|
|
73
|
+
type: 'string',
|
|
74
|
+
description: 'Explanation of planned changes or explanation of reasoning for no code changes',
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
required: ['fileUpdates', 'contextPaths'],
|
|
78
|
+
},
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=codegen-summary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"codegen-summary.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/codegen-summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,yBAAyB,CAAC;AAErE;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,6DAA6D;QAC7D,uDAAuD;QACvD,6GAA6G;QAC7G,wGAAwG;QACxG,2EAA2E;QAC3E,kEAAkE;IACpE,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,YAAY,EAAE;gBACZ,IAAI,EAAE,OAAO;gBACb,WAAW,EACT,8OAA8O;gBAChP,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;aACF;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,sFAAsF;gBACnG,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;oBACd,WAAW,EACT,oJAAoJ;oBACtJ,UAAU,EAAE;wBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,2DAA2D,EAAE;wBAClG,cAAc,EAAE;4BACd,IAAI,EAAE,QAAQ;4BACd,IAAI,EAAE;gCACJ,YAAY;gCACZ,YAAY;gCACZ,WAAW;gCACX,YAAY;gCACZ,iBAAiB;gCACjB,UAAU;gCACV,eAAe;gCACf,cAAc;gCACd,YAAY;gCACZ,aAAa;gCACb,uBAAuB;6BACxB;4BACD,WAAW,EAAE,6DAA6D;yBAC3E;wBACD,WAAW,EAAE;4BACX,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,0PAA0P;gCAC1P,WAAW;yBACd;wBACD,KAAK,EAAE;4BACL,IAAI,EAAE,SAAS;4BACf,WAAW,EACT,kPAAkP;gCAClP,CAAC,CAAC,KAAK;yBACV;wBACD,MAAM,EAAE;4BACN,IAAI,EAAE,QAAQ;4BACd,WAAW,EACT,0NAA0N;yBAC7N;wBACD,kBAAkB,EAAE;4BAClB,IAAI,EAAE,OAAO;4BACb,WAAW,EACT,gGAAgG;gCAChG,qEAAqE;4BACvE,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;yBAC1B;qBACF;oBACD,QAAQ,EAAE,CAAC,MAAM,EAAE,gBAAgB,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;iBAChF;aACF;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gFAAgF;aAC9F;SACF;QACD,QAAQ,EAAE,CAAC,aAAa,EAAE,cAAc,CAAC;KAC1C;CACO,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for createDirectory
|
|
3
|
+
*/
|
|
4
|
+
export declare const createDirectory: {
|
|
5
|
+
readonly name: "createDirectory";
|
|
6
|
+
readonly description: "Create a new directory";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly filePath: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly description: "The directory path to create.";
|
|
13
|
+
};
|
|
14
|
+
readonly explanation: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly description: "The explanation of the reasoning behind creating this directory";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
readonly required: readonly ["filePath"];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for createDirectory
|
|
3
|
+
*/
|
|
4
|
+
export const createDirectory = {
|
|
5
|
+
name: 'createDirectory',
|
|
6
|
+
description: 'Create a new directory',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
filePath: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'The directory path to create.',
|
|
13
|
+
},
|
|
14
|
+
explanation: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'The explanation of the reasoning behind creating this directory',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ['filePath'],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=create-directory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-directory.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/create-directory.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,eAAe,GAAG;IAC7B,IAAI,EAAE,iBAAiB;IACvB,WAAW,EAAE,wBAAwB;IACrC,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+BAA+B;aAC7C;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,iEAAiE;aAC/E;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,CAAC;KACvB;CACO,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for createFile
|
|
3
|
+
*/
|
|
4
|
+
export declare const createFile: {
|
|
5
|
+
readonly name: "createFile";
|
|
6
|
+
readonly description: "Create a new file with specified content. The file will be created inside of project folder structure. This tool should not be used of creation if image files.";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly filePath: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly description: "Path of the file that will be created, it must not be empty.";
|
|
13
|
+
};
|
|
14
|
+
readonly newContent: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly description: "Content of the file that will be created, it must no be empty.";
|
|
17
|
+
};
|
|
18
|
+
readonly explanation: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "The explanation of the reasoning behind creating this file";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly required: readonly ["filePath", "newContent"];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for createFile
|
|
3
|
+
*/
|
|
4
|
+
export const createFile = {
|
|
5
|
+
name: 'createFile',
|
|
6
|
+
description: 'Create a new file with specified content. The file will be created inside of project folder structure. This tool should not be used of creation if image files.',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
filePath: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'Path of the file that will be created, it must not be empty.',
|
|
13
|
+
},
|
|
14
|
+
newContent: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'Content of the file that will be created, it must no be empty.',
|
|
17
|
+
},
|
|
18
|
+
explanation: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'The explanation of the reasoning behind creating this file',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
required: ['filePath', 'newContent'],
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=create-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"create-file.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/create-file.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,YAAY;IAClB,WAAW,EACT,iKAAiK;IACnK,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8DAA8D;aAC5E;YACD,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,gEAAgE;aAC9E;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4DAA4D;aAC1E;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC;KACrC;CACO,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for deleteFile
|
|
3
|
+
*/
|
|
4
|
+
export declare const deleteFile: {
|
|
5
|
+
readonly name: "deleteFile";
|
|
6
|
+
readonly description: "Delete a specified file from the application source code.";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly filePath: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly description: "The file path to delete.";
|
|
13
|
+
};
|
|
14
|
+
readonly explanation: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly description: "The explanation of the reasoning behind deleting this file";
|
|
17
|
+
};
|
|
18
|
+
};
|
|
19
|
+
readonly required: readonly ["filePath"];
|
|
20
|
+
};
|
|
21
|
+
};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for deleteFile
|
|
3
|
+
*/
|
|
4
|
+
export const deleteFile = {
|
|
5
|
+
name: 'deleteFile',
|
|
6
|
+
description: 'Delete a specified file from the application source code.',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
filePath: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'The file path to delete.',
|
|
13
|
+
},
|
|
14
|
+
explanation: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'The explanation of the reasoning behind deleting this file',
|
|
17
|
+
},
|
|
18
|
+
},
|
|
19
|
+
required: ['filePath'],
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=delete-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"delete-file.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/delete-file.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,IAAI,EAAE,YAAY;IAClB,WAAW,EAAE,2DAA2D;IACxE,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,4DAA4D;aAC1E;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,CAAC;KACvB;CACO,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for downloadFile
|
|
3
|
+
*/
|
|
4
|
+
export declare const downloadFile: {
|
|
5
|
+
readonly name: "downloadFile";
|
|
6
|
+
readonly description: "Download file from url, and save to file";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly filePath: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly description: "The file path to save the downloaded file.";
|
|
13
|
+
};
|
|
14
|
+
readonly downloadUrl: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly description: "The url of the file that will be used for downloading.";
|
|
17
|
+
};
|
|
18
|
+
readonly explanation: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "The reasoning behind downloading this image.";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly required: readonly ["filePath", "downloadUrl"];
|
|
24
|
+
};
|
|
25
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for downloadFile
|
|
3
|
+
*/
|
|
4
|
+
export const downloadFile = {
|
|
5
|
+
name: 'downloadFile',
|
|
6
|
+
description: 'Download file from url, and save to file',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
filePath: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'The file path to save the downloaded file.',
|
|
13
|
+
},
|
|
14
|
+
downloadUrl: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'The url of the file that will be used for downloading.',
|
|
17
|
+
},
|
|
18
|
+
explanation: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'The reasoning behind downloading this image.',
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
required: ['filePath', 'downloadUrl'],
|
|
24
|
+
},
|
|
25
|
+
};
|
|
26
|
+
//# sourceMappingURL=download-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"download-file.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/download-file.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,YAAY,GAAG;IAC1B,IAAI,EAAE,cAAc;IACpB,WAAW,EAAE,0CAA0C;IACvD,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4CAA4C;aAC1D;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,wDAAwD;aACtE;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,8CAA8C;aAC5D;SACF;QACD,QAAQ,EAAE,CAAC,UAAU,EAAE,aAAa,CAAC;KACtC;CACO,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for explanation
|
|
3
|
+
*/
|
|
4
|
+
export declare const explanation: {
|
|
5
|
+
readonly name: "explanation";
|
|
6
|
+
readonly description: "Explain the reasoning behind the suggested code changes or reasoning for lack of code changes";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly text: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly description: "The explanation text";
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
readonly required: readonly ["text"];
|
|
16
|
+
};
|
|
17
|
+
};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for explanation
|
|
3
|
+
*/
|
|
4
|
+
export const explanation = {
|
|
5
|
+
name: 'explanation',
|
|
6
|
+
description: 'Explain the reasoning behind the suggested code changes or reasoning for lack of code changes',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
text: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'The explanation text',
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
required: ['text'],
|
|
16
|
+
},
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=explanation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"explanation.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/explanation.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,+FAA+F;IAC5G,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,sBAAsB;aACpC;SACF;QACD,QAAQ,EAAE,CAAC,MAAM,CAAC;KACnB;CACO,CAAC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for generateImage
|
|
3
|
+
*/
|
|
4
|
+
export declare const generateImage: {
|
|
5
|
+
readonly name: "generateImage";
|
|
6
|
+
readonly description: "Generate an image using AI service and save it as a file.";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly prompt: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly description: "The prompt that will be used to generate the image. This prompt must be detailed, it will be used by image generation model.";
|
|
13
|
+
};
|
|
14
|
+
readonly filePath: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly description: "The file path to save the generated image.";
|
|
17
|
+
};
|
|
18
|
+
readonly contextImagePath: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "Path to a image file that will be used as a context for image generation. It is useful if there is a need to edit an image with genAI.";
|
|
21
|
+
};
|
|
22
|
+
readonly size: {
|
|
23
|
+
readonly type: "object";
|
|
24
|
+
readonly properties: {
|
|
25
|
+
readonly width: {
|
|
26
|
+
readonly type: "number";
|
|
27
|
+
readonly description: "width of the image";
|
|
28
|
+
};
|
|
29
|
+
readonly height: {
|
|
30
|
+
readonly type: "number";
|
|
31
|
+
readonly description: "height of the image";
|
|
32
|
+
};
|
|
33
|
+
};
|
|
34
|
+
readonly required: readonly ["width", "height"];
|
|
35
|
+
readonly description: "The size of the image to generate.";
|
|
36
|
+
};
|
|
37
|
+
readonly cheap: {
|
|
38
|
+
readonly type: "boolean";
|
|
39
|
+
readonly description: "true value means that the prompt will be executed with cheaper model, which work faster, but provides lower quality results, so please use it only in situation when lower quality results are acceptable for the prompt.";
|
|
40
|
+
};
|
|
41
|
+
readonly explanation: {
|
|
42
|
+
readonly type: "string";
|
|
43
|
+
readonly description: "The explanation of the reasoning behind generating this image";
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
readonly required: readonly ["prompt", "filePath", "size", "cheap"];
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for generateImage
|
|
3
|
+
*/
|
|
4
|
+
export const generateImage = {
|
|
5
|
+
name: 'generateImage',
|
|
6
|
+
description: 'Generate an image using AI service and save it as a file.',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
prompt: {
|
|
11
|
+
type: 'string',
|
|
12
|
+
description: 'The prompt that will be used to generate the image. This prompt must be detailed, it will be used by image generation model.',
|
|
13
|
+
},
|
|
14
|
+
filePath: {
|
|
15
|
+
type: 'string',
|
|
16
|
+
description: 'The file path to save the generated image.',
|
|
17
|
+
},
|
|
18
|
+
contextImagePath: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'Path to a image file that will be used as a context for image generation. It is useful if there is a need to edit an image with genAI.',
|
|
21
|
+
},
|
|
22
|
+
size: {
|
|
23
|
+
type: 'object',
|
|
24
|
+
properties: {
|
|
25
|
+
width: {
|
|
26
|
+
type: 'number',
|
|
27
|
+
description: 'width of the image',
|
|
28
|
+
},
|
|
29
|
+
height: {
|
|
30
|
+
type: 'number',
|
|
31
|
+
description: 'height of the image',
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
required: ['width', 'height'],
|
|
35
|
+
description: 'The size of the image to generate.',
|
|
36
|
+
},
|
|
37
|
+
cheap: {
|
|
38
|
+
type: 'boolean',
|
|
39
|
+
description: 'true value means that the prompt will be executed with cheaper model, which work faster, but provides lower quality results, so please use it only in situation when lower quality results are acceptable for the prompt.',
|
|
40
|
+
},
|
|
41
|
+
explanation: {
|
|
42
|
+
type: 'string',
|
|
43
|
+
description: 'The explanation of the reasoning behind generating this image',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
required: ['prompt', 'filePath', 'size', 'cheap'],
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=generate-image.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"generate-image.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/generate-image.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,eAAe;IACrB,WAAW,EAAE,2DAA2D;IACxE,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,MAAM,EAAE;gBACN,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,8HAA8H;aACjI;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,4CAA4C;aAC1D;YACD,gBAAgB,EAAE;gBAChB,IAAI,EAAE,QAAQ;gBACd,WAAW,EACT,wIAAwI;aAC3I;YACD,IAAI,EAAE;gBACJ,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,oBAAoB;qBAClC;oBACD,MAAM,EAAE;wBACN,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,qBAAqB;qBACnC;iBACF;gBACD,QAAQ,EAAE,CAAC,OAAO,EAAE,QAAQ,CAAC;gBAC7B,WAAW,EAAE,oCAAoC;aAClD;YACD,KAAK,EAAE;gBACL,IAAI,EAAE,SAAS;gBACf,WAAW,EACT,2NAA2N;aAC9N;YACD,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,+DAA+D;aAC7E;SACF;QACD,QAAQ,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,MAAM,EAAE,OAAO,CAAC;KAClD;CACO,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for getImageAssets
|
|
3
|
+
*/
|
|
4
|
+
export declare const getImageAssets: {
|
|
5
|
+
readonly name: "getImageAssets";
|
|
6
|
+
readonly description: "This function returns a map of application image assets. This map contains absolute file path, and basic metadata information. It does not contain contents. Contents must be requested using dedicated tool.";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly filePaths: {
|
|
11
|
+
readonly type: "array";
|
|
12
|
+
readonly description: "An array of absolute paths of files that should be used to provided context.";
|
|
13
|
+
readonly items: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly required: readonly [];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for getImageAssets
|
|
3
|
+
*/
|
|
4
|
+
export const getImageAssets = {
|
|
5
|
+
name: 'getImageAssets',
|
|
6
|
+
description: 'This function returns a map of application image assets. This map contains absolute file path, and basic metadata information. It does not contain contents. Contents must be requested using dedicated tool.',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
filePaths: {
|
|
11
|
+
type: 'array',
|
|
12
|
+
description: 'An array of absolute paths of files that should be used to provided context.',
|
|
13
|
+
items: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
required: [],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=get-image-assets.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-image-assets.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/get-image-assets.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,gBAAgB;IACtB,WAAW,EACT,+MAA+M;IACjN,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,8EAA8E;gBAC3F,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;QACD,QAAQ,EAAE,EAAE;KACb;CACO,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for getSourceCode
|
|
3
|
+
*/
|
|
4
|
+
export declare const getSourceCode: {
|
|
5
|
+
readonly name: "getSourceCode";
|
|
6
|
+
readonly description: "This function returns source code of the application in Map format, where absolute file path is the key, and the value is an object, where one of the properties may be the content of the file. Some keys may not provide content. This function can be called only once during the conversation, and only if suggested by the user.";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly filePaths: {
|
|
11
|
+
readonly type: "array";
|
|
12
|
+
readonly description: "An array of absolute paths of files that should be used to provided context.";
|
|
13
|
+
readonly items: {
|
|
14
|
+
readonly type: "string";
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
};
|
|
18
|
+
readonly required: readonly [];
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for getSourceCode
|
|
3
|
+
*/
|
|
4
|
+
export const getSourceCode = {
|
|
5
|
+
name: 'getSourceCode',
|
|
6
|
+
description: 'This function returns source code of the application in Map format, where absolute file path is the key, and the value is an object, where one of the properties may be the content of the file. Some keys may not provide content. This function can be called only once during the conversation, and only if suggested by the user.',
|
|
7
|
+
parameters: {
|
|
8
|
+
type: 'object',
|
|
9
|
+
properties: {
|
|
10
|
+
filePaths: {
|
|
11
|
+
type: 'array',
|
|
12
|
+
description: 'An array of absolute paths of files that should be used to provided context.',
|
|
13
|
+
items: {
|
|
14
|
+
type: 'string',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
required: [],
|
|
19
|
+
},
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=get-source-code.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get-source-code.js","sourceRoot":"","sources":["../../../src/prompt/function-defs/get-source-code.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG;IAC3B,IAAI,EAAE,eAAe;IACrB,WAAW,EACT,uUAAuU;IACzU,UAAU,EAAE;QACV,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,SAAS,EAAE;gBACT,IAAI,EAAE,OAAO;gBACb,WAAW,EAAE,8EAA8E;gBAC3F,KAAK,EAAE;oBACL,IAAI,EAAE,QAAQ;iBACf;aACF;SACF;QACD,QAAQ,EAAE,EAAE;KACb;CACO,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Function definition for imglyRemoveBackground
|
|
3
|
+
*/
|
|
4
|
+
export declare const imglyRemoveBackground: {
|
|
5
|
+
readonly name: "imglyRemoveBackground";
|
|
6
|
+
readonly description: "Removes background from an image using @imgly/background-removal-node";
|
|
7
|
+
readonly parameters: {
|
|
8
|
+
readonly type: "object";
|
|
9
|
+
readonly properties: {
|
|
10
|
+
readonly inputFilePath: {
|
|
11
|
+
readonly type: "string";
|
|
12
|
+
readonly description: "The file path of the input image.";
|
|
13
|
+
};
|
|
14
|
+
readonly outputFilePath: {
|
|
15
|
+
readonly type: "string";
|
|
16
|
+
readonly description: "The file path to save the output image with removed background.";
|
|
17
|
+
};
|
|
18
|
+
readonly explanation: {
|
|
19
|
+
readonly type: "string";
|
|
20
|
+
readonly description: "The explanation of the reasoning behind removing the background from this image";
|
|
21
|
+
};
|
|
22
|
+
};
|
|
23
|
+
readonly required: readonly ["inputFilePath", "outputFilePath"];
|
|
24
|
+
};
|
|
25
|
+
};
|