@proteinjs/conversation 1.0.5 → 1.0.7
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/.eslintrc.js +20 -0
- package/.prettierrc +8 -0
- package/CHANGELOG.md +7 -4
- package/LICENSE +21 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +40 -28
- package/dist/src/CodegenConversation.d.ts +11 -11
- package/dist/src/CodegenConversation.d.ts.map +1 -1
- package/dist/src/CodegenConversation.js +294 -180
- package/dist/src/CodegenConversation.js.map +1 -1
- package/dist/src/Conversation.d.ts +52 -49
- package/dist/src/Conversation.d.ts.map +1 -1
- package/dist/src/Conversation.js +480 -274
- package/dist/src/Conversation.js.map +1 -1
- package/dist/src/ConversationModule.d.ts +6 -6
- package/dist/src/ConversationModule.js +3 -3
- package/dist/src/Function.d.ts +4 -4
- package/dist/src/Function.d.ts.map +1 -1
- package/dist/src/Function.js +3 -3
- package/dist/src/OpenAi.d.ts +42 -10
- package/dist/src/OpenAi.d.ts.map +1 -1
- package/dist/src/OpenAi.js +496 -289
- package/dist/src/OpenAi.js.map +1 -1
- package/dist/src/Paragraph.d.ts +4 -4
- package/dist/src/Paragraph.d.ts.map +1 -1
- package/dist/src/Paragraph.js +17 -16
- package/dist/src/Paragraph.js.map +1 -1
- package/dist/src/Sentence.d.ts +4 -4
- package/dist/src/Sentence.d.ts.map +1 -1
- package/dist/src/Sentence.js +21 -19
- package/dist/src/Sentence.js.map +1 -1
- package/dist/src/code_template/Code.d.ts +15 -15
- package/dist/src/code_template/Code.d.ts.map +1 -1
- package/dist/src/code_template/Code.js +167 -69
- package/dist/src/code_template/Code.js.map +1 -1
- package/dist/src/code_template/CodeTemplate.d.ts +11 -11
- package/dist/src/code_template/CodeTemplate.d.ts.map +1 -1
- package/dist/src/code_template/CodeTemplate.js +169 -79
- package/dist/src/code_template/CodeTemplate.js.map +1 -1
- package/dist/src/code_template/CodeTemplateModule.d.ts +6 -6
- package/dist/src/code_template/CodeTemplateModule.js +28 -26
- package/dist/src/code_template/Repo.d.ts +34 -38
- package/dist/src/code_template/Repo.d.ts.map +1 -1
- package/dist/src/code_template/Repo.js +291 -191
- package/dist/src/code_template/Repo.js.map +1 -1
- package/dist/src/fs/conversation_fs/ConversationFsModerator.d.ts +12 -12
- package/dist/src/fs/conversation_fs/ConversationFsModerator.d.ts.map +1 -1
- package/dist/src/fs/conversation_fs/ConversationFsModerator.js +111 -98
- package/dist/src/fs/conversation_fs/ConversationFsModerator.js.map +1 -1
- package/dist/src/fs/conversation_fs/ConversationFsModule.d.ts +11 -11
- package/dist/src/fs/conversation_fs/ConversationFsModule.d.ts.map +1 -1
- package/dist/src/fs/conversation_fs/ConversationFsModule.js +204 -99
- package/dist/src/fs/conversation_fs/ConversationFsModule.js.map +1 -1
- package/dist/src/fs/conversation_fs/FsFunctions.d.ts +58 -62
- package/dist/src/fs/conversation_fs/FsFunctions.d.ts.map +1 -1
- package/dist/src/fs/conversation_fs/FsFunctions.js +414 -266
- package/dist/src/fs/conversation_fs/FsFunctions.js.map +1 -1
- package/dist/src/fs/git/GitModule.d.ts +8 -8
- package/dist/src/fs/git/GitModule.d.ts.map +1 -1
- package/dist/src/fs/git/GitModule.js +163 -74
- package/dist/src/fs/git/GitModule.js.map +1 -1
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.d.ts +16 -18
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.d.ts.map +1 -1
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.js +158 -58
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.js.map +1 -1
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.d.ts +27 -26
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.d.ts.map +1 -1
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.js +234 -133
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.js.map +1 -1
- package/dist/src/fs/package/PackageFunctions.d.ts +54 -60
- package/dist/src/fs/package/PackageFunctions.d.ts.map +1 -1
- package/dist/src/fs/package/PackageFunctions.js +366 -223
- package/dist/src/fs/package/PackageFunctions.js.map +1 -1
- package/dist/src/fs/package/PackageModule.d.ts +24 -24
- package/dist/src/fs/package/PackageModule.d.ts.map +1 -1
- package/dist/src/fs/package/PackageModule.js +292 -163
- package/dist/src/fs/package/PackageModule.js.map +1 -1
- package/dist/src/history/MessageHistory.d.ts +12 -12
- package/dist/src/history/MessageHistory.d.ts.map +1 -1
- package/dist/src/history/MessageHistory.js +52 -43
- package/dist/src/history/MessageHistory.js.map +1 -1
- package/dist/src/history/MessageModerator.d.ts +2 -2
- package/dist/src/history/MessageModerator.js +3 -3
- package/dist/src/template/ConversationTemplate.d.ts +8 -8
- package/dist/src/template/ConversationTemplate.d.ts.map +1 -1
- package/dist/src/template/ConversationTemplate.js +3 -3
- package/dist/src/template/ConversationTemplateFunctions.d.ts +33 -35
- package/dist/src/template/ConversationTemplateFunctions.d.ts.map +1 -1
- package/dist/src/template/ConversationTemplateFunctions.js +176 -75
- package/dist/src/template/ConversationTemplateFunctions.js.map +1 -1
- package/dist/src/template/ConversationTemplateModule.d.ts +51 -48
- package/dist/src/template/ConversationTemplateModule.d.ts.map +1 -1
- package/dist/src/template/ConversationTemplateModule.js +211 -114
- package/dist/src/template/ConversationTemplateModule.js.map +1 -1
- package/dist/src/template/createApp/CreateAppTemplate.d.ts +1 -1
- package/dist/src/template/createApp/CreateAppTemplate.js +151 -59
- package/dist/src/template/createCode/CreateCodeConversationTemplate.d.ts +1 -1
- package/dist/src/template/createCode/CreateCodeConversationTemplate.d.ts.map +1 -1
- package/dist/src/template/createCode/CreateCodeConversationTemplate.js +183 -74
- package/dist/src/template/createCode/CreateCodeConversationTemplate.js.map +1 -1
- package/dist/src/template/createPackage/CreatePackageConversationTemplate.d.ts +1 -1
- package/dist/src/template/createPackage/CreatePackageConversationTemplate.d.ts.map +1 -1
- package/dist/src/template/createPackage/CreatePackageConversationTemplate.js +174 -84
- package/dist/src/template/createPackage/CreatePackageConversationTemplate.js.map +1 -1
- package/dist/src/template/createPackage/tsconfig.json +11 -11
- package/dist/test/createKeywordFilesIndex.test.d.ts +1 -1
- package/dist/test/createKeywordFilesIndex.test.js +132 -41
- package/dist/test/createKeywordFilesIndex.test.js.map +1 -1
- package/dist/test/openai/openai.generateList.test.d.ts +1 -1
- package/dist/test/openai/openai.generateList.test.js +136 -47
- package/dist/test/openai/openai.generateList.test.js.map +1 -1
- package/dist/test/openai/openai.parseCodeFromMarkdown.test.d.ts +1 -1
- package/dist/test/openai/openai.parseCodeFromMarkdown.test.js +15 -10
- package/dist/test/openai/openai.parseCodeFromMarkdown.test.js.map +1 -1
- package/dist/test/repo/repo.test.d.ts +1 -1
- package/dist/test/repo/repo.test.js +127 -38
- package/dist/test/repo/repo.test.js.map +1 -1
- package/jest.config.js +2 -2
- package/package.json +11 -5
- package/src/CodegenConversation.ts +6 -4
- package/src/Conversation.ts +102 -33
- package/src/ConversationModule.ts +2 -2
- package/src/Function.ts +0 -1
- package/src/OpenAi.ts +128 -63
- package/src/Paragraph.ts +3 -2
- package/src/Sentence.ts +5 -3
- package/src/code_template/Code.ts +25 -19
- package/src/code_template/CodeTemplate.ts +8 -7
- package/src/code_template/CodeTemplateModule.ts +2 -2
- package/src/code_template/Repo.ts +25 -19
- package/src/fs/conversation_fs/ConversationFsModerator.ts +34 -20
- package/src/fs/conversation_fs/ConversationFsModule.ts +13 -7
- package/src/fs/conversation_fs/FsFunctions.ts +33 -44
- package/src/fs/git/GitModule.ts +2 -4
- package/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.ts +31 -31
- package/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.ts +19 -18
- package/src/fs/package/PackageFunctions.ts +34 -41
- package/src/fs/package/PackageModule.ts +33 -21
- package/src/history/MessageHistory.ts +7 -4
- package/src/history/MessageModerator.ts +1 -1
- package/src/template/ConversationTemplate.ts +9 -9
- package/src/template/ConversationTemplateFunctions.ts +8 -7
- package/src/template/ConversationTemplateModule.ts +24 -15
- package/src/template/createApp/CreateAppTemplate.ts +1 -1
- package/src/template/createCode/CreateCodeConversationTemplate.ts +9 -11
- package/src/template/createPackage/CreatePackageConversationTemplate.ts +2 -9
- package/src/template/createPackage/jest.config.js +2 -2
- package/test/createKeywordFilesIndex.test.ts +3 -3
- package/test/openai/openai.generateList.test.ts +5 -3
- package/test/openai/openai.parseCodeFromMarkdown.test.ts +10 -5
- package/test/repo/repo.test.ts +3 -4
- package/tsconfig.json +16 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FsFunctions.js","sourceRoot":"","sources":["../../../../src/fs/conversation_fs/FsFunctions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAgD;AAInC,QAAA,qBAAqB,GAAG,WAAW,CAAC;AACjD,SAAgB,iBAAiB,CAAC,QAA8B;IAAhE,
|
|
1
|
+
{"version":3,"file":"FsFunctions.js","sourceRoot":"","sources":["../../../../src/fs/conversation_fs/FsFunctions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAgD;AAInC,QAAA,qBAAqB,GAAG,WAAW,CAAC;AACjD,SAAgB,iBAAiB,CAAC,QAA8B;IAAhE,iBAyBC;IAxBC,OAAO;QACL,UAAU,EAAE;YACV,IAAI,EAAE,6BAAqB;YAC3B,WAAW,EAAE,0BAA0B;YACvC,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE;wBACT,IAAI,EAAE,OAAO;wBACb,WAAW,EAAE,oBAAoB;wBACjC,KAAK,EAAE;4BACL,IAAI,EAAE,QAAQ;yBACf;qBACF;iBACF;gBACD,QAAQ,EAAE,CAAC,WAAW,CAAC;aACxB;SACF;QACD,IAAI,EAAE,UAA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V,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,UAAU,EAAE;oBACV,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,sCAAsC;iBACpD;gBACD,eAAe,EAAE;oBACf,IAAI,EAAE,QAAQ;oBACd,WAAW,EAAE,kDAAkD;iBAChE;aACF;YACD,QAAQ,EAAE,CAAC,YAAY,EAAE,iBAAiB,CAAC;SAC5C;KACF;IACD,IAAI,EAAE,UAAO,MAAuD;;oBAClE,qBAAM,cAAE,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,eAAe,CAAC,EAAA;oBAAxD,sBAAA,SAAwD,EAAA;;aAAA;IAC1D,YAAY,EAAE,CAAC,+CAAwC,wBAAgB,cAAW,CAAC;CACpF,CAAC;AAEW,QAAA,WAAW,GAAe;IACrC,oBAAoB;IACpB,qCAA6B;IAC7B,gCAAgC;IAChC,cAAc;IACd,YAAY;IACZ,YAAY;CACb,CAAC"}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { ConversationModule, ConversationModuleFactory } from '../../ConversationModule';
|
|
2
2
|
import { Function } from '../../Function';
|
|
3
3
|
export declare class GitModule implements ConversationModule {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
private repoPath;
|
|
5
|
+
constructor(repoPath: string);
|
|
6
|
+
getName(): string;
|
|
7
|
+
getSystemMessages(): string[];
|
|
8
|
+
getFunctions(): Function[];
|
|
9
|
+
getMessageModerators(): never[];
|
|
10
10
|
}
|
|
11
11
|
export declare class GitModuleFactory implements ConversationModuleFactory {
|
|
12
|
-
|
|
12
|
+
createModule(repoPath: string): Promise<GitModule>;
|
|
13
13
|
}
|
|
14
|
-
//# sourceMappingURL=GitModule.d.ts.map
|
|
14
|
+
//# sourceMappingURL=GitModule.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitModule.d.ts","sourceRoot":"","sources":["../../../../src/fs/git/GitModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,qBAAa,SAAU,YAAW,kBAAkB;IAClD,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,EAAE,MAAM;IAI5B,OAAO,IAAI,MAAM;IAIjB,iBAAiB,IAAI,MAAM,EAAE;IAQ7B,YAAY,IAAI,QAAQ,EAAE;
|
|
1
|
+
{"version":3,"file":"GitModule.d.ts","sourceRoot":"","sources":["../../../../src/fs/git/GitModule.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,0BAA0B,CAAC;AACzF,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,qBAAa,SAAU,YAAW,kBAAkB;IAClD,OAAO,CAAC,QAAQ,CAAS;gBAEb,QAAQ,EAAE,MAAM;IAI5B,OAAO,IAAI,MAAM;IAIjB,iBAAiB,IAAI,MAAM,EAAE;IAQ7B,YAAY,IAAI,QAAQ,EAAE;IAI1B,oBAAoB;CAGrB;AAED,qBAAa,gBAAiB,YAAW,yBAAyB;IAC1D,YAAY,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC;CAGzD"}
|
|
@@ -1,86 +1,175 @@
|
|
|
1
|
-
|
|
2
|
-
var __awaiter =
|
|
3
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
var __awaiter =
|
|
3
|
+
(this && this.__awaiter) ||
|
|
4
|
+
function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) {
|
|
6
|
+
return value instanceof P
|
|
7
|
+
? value
|
|
8
|
+
: new P(function (resolve) {
|
|
9
|
+
resolve(value);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
4
12
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
function fulfilled(value) {
|
|
14
|
+
try {
|
|
15
|
+
step(generator.next(value));
|
|
16
|
+
} catch (e) {
|
|
17
|
+
reject(e);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function rejected(value) {
|
|
21
|
+
try {
|
|
22
|
+
step(generator['throw'](value));
|
|
23
|
+
} catch (e) {
|
|
24
|
+
reject(e);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function step(result) {
|
|
28
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
29
|
+
}
|
|
30
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
31
|
});
|
|
10
|
-
};
|
|
11
|
-
var __generator =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
32
|
+
};
|
|
33
|
+
var __generator =
|
|
34
|
+
(this && this.__generator) ||
|
|
35
|
+
function (thisArg, body) {
|
|
36
|
+
var _ = {
|
|
37
|
+
label: 0,
|
|
38
|
+
sent: function () {
|
|
39
|
+
if (t[0] & 1) throw t[1];
|
|
40
|
+
return t[1];
|
|
41
|
+
},
|
|
42
|
+
trys: [],
|
|
43
|
+
ops: [],
|
|
44
|
+
},
|
|
45
|
+
f,
|
|
46
|
+
y,
|
|
47
|
+
t,
|
|
48
|
+
g;
|
|
49
|
+
return (
|
|
50
|
+
(g = { next: verb(0), throw: verb(1), return: verb(2) }),
|
|
51
|
+
typeof Symbol === 'function' &&
|
|
52
|
+
(g[Symbol.iterator] = function () {
|
|
53
|
+
return this;
|
|
54
|
+
}),
|
|
55
|
+
g
|
|
56
|
+
);
|
|
57
|
+
function verb(n) {
|
|
58
|
+
return function (v) {
|
|
59
|
+
return step([n, v]);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
15
62
|
function step(op) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
63
|
+
if (f) throw new TypeError('Generator is already executing.');
|
|
64
|
+
while ((g && ((g = 0), op[0] && (_ = 0)), _))
|
|
65
|
+
try {
|
|
66
|
+
if (
|
|
67
|
+
((f = 1),
|
|
68
|
+
y &&
|
|
69
|
+
(t = op[0] & 2 ? y['return'] : op[0] ? y['throw'] || ((t = y['return']) && t.call(y), 0) : y.next) &&
|
|
70
|
+
!(t = t.call(y, op[1])).done)
|
|
71
|
+
)
|
|
72
|
+
return t;
|
|
73
|
+
if (((y = 0), t)) op = [op[0] & 2, t.value];
|
|
74
|
+
switch (op[0]) {
|
|
75
|
+
case 0:
|
|
76
|
+
case 1:
|
|
77
|
+
t = op;
|
|
78
|
+
break;
|
|
79
|
+
case 4:
|
|
80
|
+
_.label++;
|
|
81
|
+
return { value: op[1], done: false };
|
|
82
|
+
case 5:
|
|
83
|
+
_.label++;
|
|
84
|
+
y = op[1];
|
|
85
|
+
op = [0];
|
|
86
|
+
continue;
|
|
87
|
+
case 7:
|
|
88
|
+
op = _.ops.pop();
|
|
89
|
+
_.trys.pop();
|
|
90
|
+
continue;
|
|
91
|
+
default:
|
|
92
|
+
if (!((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && (op[0] === 6 || op[0] === 2)) {
|
|
93
|
+
_ = 0;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
97
|
+
_.label = op[1];
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
101
|
+
_.label = t[1];
|
|
102
|
+
t = op;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
if (t && _.label < t[2]) {
|
|
106
|
+
_.label = t[2];
|
|
107
|
+
_.ops.push(op);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
if (t[2]) _.ops.pop();
|
|
111
|
+
_.trys.pop();
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
op = body.call(thisArg, _);
|
|
115
|
+
} catch (e) {
|
|
116
|
+
op = [6, e];
|
|
117
|
+
y = 0;
|
|
118
|
+
} finally {
|
|
119
|
+
f = t = 0;
|
|
120
|
+
}
|
|
121
|
+
if (op[0] & 5) throw op[1];
|
|
122
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
123
|
}
|
|
37
|
-
};
|
|
38
|
-
var __spreadArray =
|
|
39
|
-
|
|
124
|
+
};
|
|
125
|
+
var __spreadArray =
|
|
126
|
+
(this && this.__spreadArray) ||
|
|
127
|
+
function (to, from, pack) {
|
|
128
|
+
if (pack || arguments.length === 2)
|
|
129
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
40
130
|
if (ar || !(i in from)) {
|
|
41
|
-
|
|
42
|
-
|
|
131
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
132
|
+
ar[i] = from[i];
|
|
43
133
|
}
|
|
44
|
-
|
|
134
|
+
}
|
|
45
135
|
return to.concat(ar || Array.prototype.slice.call(from));
|
|
46
|
-
};
|
|
47
|
-
Object.defineProperty(exports,
|
|
136
|
+
};
|
|
137
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
48
138
|
exports.GitModuleFactory = exports.GitModule = void 0;
|
|
49
|
-
var util_node_1 = require(
|
|
139
|
+
var util_node_1 = require('@proteinjs/util-node');
|
|
50
140
|
var GitModule = /** @class */ (function () {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
}()
|
|
141
|
+
function GitModule(repoPath) {
|
|
142
|
+
this.repoPath = repoPath;
|
|
143
|
+
}
|
|
144
|
+
GitModule.prototype.getName = function () {
|
|
145
|
+
return 'Git';
|
|
146
|
+
};
|
|
147
|
+
GitModule.prototype.getSystemMessages = function () {
|
|
148
|
+
return [
|
|
149
|
+
"After we make code changes (write to files), ask the user if they'd like to commit and sync those changes",
|
|
150
|
+
'If they want to commit, offer them 3 generated messages that summarize the changes to choose from, as well as the option to write a custom message',
|
|
151
|
+
'The generated messages should be 1-3 sentences in length, and each generated option should be a different length of summary',
|
|
152
|
+
];
|
|
153
|
+
};
|
|
154
|
+
GitModule.prototype.getFunctions = function () {
|
|
155
|
+
return __spreadArray([], util_node_1.gitFunctions, true);
|
|
156
|
+
};
|
|
157
|
+
GitModule.prototype.getMessageModerators = function () {
|
|
158
|
+
return [];
|
|
159
|
+
};
|
|
160
|
+
return GitModule;
|
|
161
|
+
})();
|
|
72
162
|
exports.GitModule = GitModule;
|
|
73
163
|
var GitModuleFactory = /** @class */ (function () {
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
}());
|
|
164
|
+
function GitModuleFactory() {}
|
|
165
|
+
GitModuleFactory.prototype.createModule = function (repoPath) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
167
|
+
return __generator(this, function (_a) {
|
|
168
|
+
return [2 /*return*/, new GitModule(repoPath)];
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
return GitModuleFactory;
|
|
173
|
+
})();
|
|
85
174
|
exports.GitModuleFactory = GitModuleFactory;
|
|
86
|
-
//# sourceMappingURL=GitModule.js.map
|
|
175
|
+
//# sourceMappingURL=GitModule.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GitModule.js","sourceRoot":"","sources":["../../../../src/fs/git/GitModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAoD;AAIpD;IAGE,mBAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,2BAAO,GAAP;QACE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,qCAAiB,GAAjB;QACE,OAAO;YACL,2GAA2G;YAC3G,oJAAoJ;YACpJ,6HAA6H;SAC9H,CAAC;IACJ,CAAC;IAED,gCAAY,GAAZ;QACE,
|
|
1
|
+
{"version":3,"file":"GitModule.js","sourceRoot":"","sources":["../../../../src/fs/git/GitModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAAoD;AAIpD;IAGE,mBAAY,QAAgB;QAC1B,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC;IAC3B,CAAC;IAED,2BAAO,GAAP;QACE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,qCAAiB,GAAjB;QACE,OAAO;YACL,2GAA2G;YAC3G,oJAAoJ;YACpJ,6HAA6H;SAC9H,CAAC;IACJ,CAAC;IAED,gCAAY,GAAZ;QACE,yBAAW,wBAAY,QAAE;IAC3B,CAAC;IAED,wCAAoB,GAApB;QACE,OAAO,EAAE,CAAC;IACZ,CAAC;IACH,gBAAC;AAAD,CAAC,AA1BD,IA0BC;AA1BY,8BAAS;AA4BtB;IAAA;IAIA,CAAC;IAHO,uCAAY,GAAlB,UAAmB,QAAgB;;;gBACjC,sBAAO,IAAI,SAAS,CAAC,QAAQ,CAAC,EAAC;;;KAChC;IACH,uBAAC;AAAD,CAAC,AAJD,IAIC;AAJY,4CAAgB"}
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
import { KeywordToFilesIndexModule } from './KeywordToFilesIndexModule';
|
|
2
|
-
export declare const searchFilesFunctionName =
|
|
2
|
+
export declare const searchFilesFunctionName = 'searchFiles';
|
|
3
3
|
export declare const searchFilesFunction: (module: KeywordToFilesIndexModule) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
};
|
|
14
|
-
};
|
|
15
|
-
required: string[];
|
|
4
|
+
definition: {
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
parameters: {
|
|
8
|
+
type: string;
|
|
9
|
+
properties: {
|
|
10
|
+
keyword: {
|
|
11
|
+
type: string;
|
|
12
|
+
description: string;
|
|
16
13
|
};
|
|
14
|
+
};
|
|
15
|
+
required: string[];
|
|
17
16
|
};
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
instructions: string[];
|
|
17
|
+
};
|
|
18
|
+
call: (params: { keyword: string }) => Promise<string[]>;
|
|
19
|
+
instructions: string[];
|
|
22
20
|
};
|
|
23
|
-
//# sourceMappingURL=KeywordToFilesIndexFunctions.d.ts.map
|
|
21
|
+
//# sourceMappingURL=KeywordToFilesIndexFunctions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeywordToFilesIndexFunctions.d.ts","sourceRoot":"","sources":["../../../../src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"KeywordToFilesIndexFunctions.d.ts","sourceRoot":"","sources":["../../../../src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAC;AAExE,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AACrD,eAAO,MAAM,mBAAmB,WAAY,yBAAyB;;;;;;;;;;;;;;;mBAgB5C;QAAE,OAAO,EAAE,MAAM,CAAA;KAAE;;CAO3C,CAAC"}
|
|
@@ -1,68 +1,168 @@
|
|
|
1
|
-
|
|
2
|
-
var __awaiter =
|
|
3
|
-
|
|
1
|
+
'use strict';
|
|
2
|
+
var __awaiter =
|
|
3
|
+
(this && this.__awaiter) ||
|
|
4
|
+
function (thisArg, _arguments, P, generator) {
|
|
5
|
+
function adopt(value) {
|
|
6
|
+
return value instanceof P
|
|
7
|
+
? value
|
|
8
|
+
: new P(function (resolve) {
|
|
9
|
+
resolve(value);
|
|
10
|
+
});
|
|
11
|
+
}
|
|
4
12
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
function fulfilled(value) {
|
|
14
|
+
try {
|
|
15
|
+
step(generator.next(value));
|
|
16
|
+
} catch (e) {
|
|
17
|
+
reject(e);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
function rejected(value) {
|
|
21
|
+
try {
|
|
22
|
+
step(generator['throw'](value));
|
|
23
|
+
} catch (e) {
|
|
24
|
+
reject(e);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
function step(result) {
|
|
28
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
29
|
+
}
|
|
30
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
31
|
});
|
|
10
|
-
};
|
|
11
|
-
var __generator =
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
32
|
+
};
|
|
33
|
+
var __generator =
|
|
34
|
+
(this && this.__generator) ||
|
|
35
|
+
function (thisArg, body) {
|
|
36
|
+
var _ = {
|
|
37
|
+
label: 0,
|
|
38
|
+
sent: function () {
|
|
39
|
+
if (t[0] & 1) throw t[1];
|
|
40
|
+
return t[1];
|
|
41
|
+
},
|
|
42
|
+
trys: [],
|
|
43
|
+
ops: [],
|
|
44
|
+
},
|
|
45
|
+
f,
|
|
46
|
+
y,
|
|
47
|
+
t,
|
|
48
|
+
g;
|
|
49
|
+
return (
|
|
50
|
+
(g = { next: verb(0), throw: verb(1), return: verb(2) }),
|
|
51
|
+
typeof Symbol === 'function' &&
|
|
52
|
+
(g[Symbol.iterator] = function () {
|
|
53
|
+
return this;
|
|
54
|
+
}),
|
|
55
|
+
g
|
|
56
|
+
);
|
|
57
|
+
function verb(n) {
|
|
58
|
+
return function (v) {
|
|
59
|
+
return step([n, v]);
|
|
60
|
+
};
|
|
61
|
+
}
|
|
15
62
|
function step(op) {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
63
|
+
if (f) throw new TypeError('Generator is already executing.');
|
|
64
|
+
while ((g && ((g = 0), op[0] && (_ = 0)), _))
|
|
65
|
+
try {
|
|
66
|
+
if (
|
|
67
|
+
((f = 1),
|
|
68
|
+
y &&
|
|
69
|
+
(t = op[0] & 2 ? y['return'] : op[0] ? y['throw'] || ((t = y['return']) && t.call(y), 0) : y.next) &&
|
|
70
|
+
!(t = t.call(y, op[1])).done)
|
|
71
|
+
)
|
|
72
|
+
return t;
|
|
73
|
+
if (((y = 0), t)) op = [op[0] & 2, t.value];
|
|
74
|
+
switch (op[0]) {
|
|
75
|
+
case 0:
|
|
76
|
+
case 1:
|
|
77
|
+
t = op;
|
|
78
|
+
break;
|
|
79
|
+
case 4:
|
|
80
|
+
_.label++;
|
|
81
|
+
return { value: op[1], done: false };
|
|
82
|
+
case 5:
|
|
83
|
+
_.label++;
|
|
84
|
+
y = op[1];
|
|
85
|
+
op = [0];
|
|
86
|
+
continue;
|
|
87
|
+
case 7:
|
|
88
|
+
op = _.ops.pop();
|
|
89
|
+
_.trys.pop();
|
|
90
|
+
continue;
|
|
91
|
+
default:
|
|
92
|
+
if (!((t = _.trys), (t = t.length > 0 && t[t.length - 1])) && (op[0] === 6 || op[0] === 2)) {
|
|
93
|
+
_ = 0;
|
|
94
|
+
continue;
|
|
95
|
+
}
|
|
96
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
97
|
+
_.label = op[1];
|
|
98
|
+
break;
|
|
99
|
+
}
|
|
100
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
101
|
+
_.label = t[1];
|
|
102
|
+
t = op;
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
if (t && _.label < t[2]) {
|
|
106
|
+
_.label = t[2];
|
|
107
|
+
_.ops.push(op);
|
|
108
|
+
break;
|
|
109
|
+
}
|
|
110
|
+
if (t[2]) _.ops.pop();
|
|
111
|
+
_.trys.pop();
|
|
112
|
+
continue;
|
|
113
|
+
}
|
|
114
|
+
op = body.call(thisArg, _);
|
|
115
|
+
} catch (e) {
|
|
116
|
+
op = [6, e];
|
|
117
|
+
y = 0;
|
|
118
|
+
} finally {
|
|
119
|
+
f = t = 0;
|
|
120
|
+
}
|
|
121
|
+
if (op[0] & 5) throw op[1];
|
|
122
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
123
|
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports,
|
|
124
|
+
};
|
|
125
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
39
126
|
exports.searchFilesFunction = exports.searchFilesFunctionName = void 0;
|
|
40
127
|
exports.searchFilesFunctionName = 'searchFiles';
|
|
41
128
|
var searchFilesFunction = function (module) {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
},
|
|
54
|
-
required: ['keyword']
|
|
55
|
-
},
|
|
129
|
+
return {
|
|
130
|
+
definition: {
|
|
131
|
+
name: exports.searchFilesFunctionName,
|
|
132
|
+
description: 'Get file paths to files that contain keyword',
|
|
133
|
+
parameters: {
|
|
134
|
+
type: 'object',
|
|
135
|
+
properties: {
|
|
136
|
+
keyword: {
|
|
137
|
+
type: 'string',
|
|
138
|
+
description: 'Search files for this keyword',
|
|
139
|
+
},
|
|
56
140
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
141
|
+
required: ['keyword'],
|
|
142
|
+
},
|
|
143
|
+
},
|
|
144
|
+
call: function (params) {
|
|
145
|
+
return __awaiter(void 0, void 0, void 0, function () {
|
|
146
|
+
return __generator(this, function (_a) {
|
|
147
|
+
return [2 /*return*/, module.searchFiles(params)];
|
|
148
|
+
});
|
|
149
|
+
});
|
|
150
|
+
},
|
|
151
|
+
instructions: [
|
|
152
|
+
'If the user is trying to interact with a file, but does not provide a path, you can find file paths that match a keyword using the '.concat(
|
|
153
|
+
exports.searchFilesFunctionName,
|
|
154
|
+
' function'
|
|
155
|
+
),
|
|
156
|
+
"Only call functions that take in filePaths with valid file paths, if you don't know the valid file path try and search for it by keyword with the ".concat(
|
|
157
|
+
exports.searchFilesFunctionName,
|
|
158
|
+
' function'
|
|
159
|
+
),
|
|
160
|
+
'If the user references a file in a package without providing a path, use the '.concat(
|
|
161
|
+
exports.searchFilesFunctionName,
|
|
162
|
+
' function on the keyword to find potentially relevant files, and choose the one that references the package name in its path'
|
|
163
|
+
),
|
|
164
|
+
],
|
|
165
|
+
};
|
|
66
166
|
};
|
|
67
167
|
exports.searchFilesFunction = searchFilesFunction;
|
|
68
168
|
// {
|
|
@@ -92,4 +192,4 @@ exports.searchFilesFunction = searchFilesFunction;
|
|
|
92
192
|
// `Favor calling getDeclarations over readFiles if full file content is not needed`,
|
|
93
193
|
// ],
|
|
94
194
|
// },
|
|
95
|
-
//# sourceMappingURL=KeywordToFilesIndexFunctions.js.map
|
|
195
|
+
//# sourceMappingURL=KeywordToFilesIndexFunctions.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"KeywordToFilesIndexFunctions.js","sourceRoot":"","sources":["../../../../src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEa,QAAA,uBAAuB,GAAG,aAAa,CAAC;AAC9C,IAAM,mBAAmB,GAAG,UAAC,MAAiC;IACnE,OAAO;QACL,UAAU,EAAE;YACV,IAAI,EAAE,+BAAuB;YAC7B,WAAW,EAAE,8CAA8C;YAC3D,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,+BAA+B;qBAC7C;iBACF;gBACD,QAAQ,EAAE,CAAC,SAAS,CAAC;aACtB;SACF;QACD,IAAI,EAAE,UAAO,MAA2B;YAAK,sBAAA,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,EAAA;iBAAA;QACvE,YAAY,EAAE;YACZ,6IAAsI,+BAAuB,cAAW;YACxK,4JAAqJ,+BAAuB,cAAW;YACvL,uFAAgF,+BAAuB,iIAA8H;SACtO;KACF,
|
|
1
|
+
{"version":3,"file":"KeywordToFilesIndexFunctions.js","sourceRoot":"","sources":["../../../../src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEa,QAAA,uBAAuB,GAAG,aAAa,CAAC;AAC9C,IAAM,mBAAmB,GAAG,UAAC,MAAiC;IACnE,OAAO;QACL,UAAU,EAAE;YACV,IAAI,EAAE,+BAAuB;YAC7B,WAAW,EAAE,8CAA8C;YAC3D,UAAU,EAAE;gBACV,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,OAAO,EAAE;wBACP,IAAI,EAAE,QAAQ;wBACd,WAAW,EAAE,+BAA+B;qBAC7C;iBACF;gBACD,QAAQ,EAAE,CAAC,SAAS,CAAC;aACtB;SACF;QACD,IAAI,EAAE,UAAO,MAA2B;YAAK,sBAAA,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,EAAA;iBAAA;QACvE,YAAY,EAAE;YACZ,6IAAsI,+BAAuB,cAAW;YACxK,4JAAqJ,+BAAuB,cAAW;YACvL,uFAAgF,+BAAuB,iIAA8H;SACtO;KACF,CAAC;AACJ,CAAC,CAAC;AAvBW,QAAA,mBAAmB,uBAuB9B;AAEF,IAAI;AACJ,kBAAkB;AAClB,+BAA+B;AAC/B,+DAA+D;AAC/D,oBAAoB;AACpB,wBAAwB;AACxB,sBAAsB;AACtB,yBAAyB;AACzB,2BAA2B;AAC3B,+CAA+C;AAC/C,qBAAqB;AACrB,8BAA8B;AAC9B,eAAe;AACf,aAAa;AACb,2CAA2C;AAC3C,6BAA6B;AAC7B,wHAAwH;AACxH,aAAa;AACb,WAAW;AACX,kCAAkC;AAClC,SAAS;AACT,OAAO;AACP,0FAA0F;AAC1F,oBAAoB;AACpB,yFAAyF;AACzF,OAAO;AACP,KAAK"}
|