@proteinjs/conversation 1.0.1 → 1.0.2
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/CHANGELOG.md +8 -0
- package/dist/index.d.ts +12 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -0
- package/dist/src/CodegenConversation.d.ts +13 -0
- package/dist/src/CodegenConversation.d.ts.map +1 -0
- package/dist/src/CodegenConversation.js +128 -57
- package/dist/src/CodegenConversation.js.map +1 -0
- package/dist/src/Conversation.d.ts +60 -0
- package/dist/src/Conversation.d.ts.map +1 -0
- package/dist/src/Conversation.js +202 -102
- package/dist/src/Conversation.js.map +1 -0
- package/dist/src/ConversationModule.d.ts +12 -0
- package/dist/src/ConversationModule.d.ts.map +1 -0
- package/dist/src/ConversationModule.js +1 -0
- package/dist/src/ConversationModule.js.map +1 -0
- package/dist/src/Function.d.ts +7 -0
- package/dist/src/Function.d.ts.map +1 -0
- package/dist/src/Function.js +1 -0
- package/dist/src/Function.js.map +1 -0
- package/dist/src/OpenAi.d.ts +18 -0
- package/dist/src/OpenAi.d.ts.map +1 -0
- package/dist/src/OpenAi.js +265 -169
- package/dist/src/OpenAi.js.map +1 -0
- package/dist/src/Paragraph.d.ts +7 -0
- package/dist/src/Paragraph.d.ts.map +1 -0
- package/dist/src/Paragraph.js +9 -7
- package/dist/src/Paragraph.js.map +1 -0
- package/dist/src/Sentence.d.ts +6 -0
- package/dist/src/Sentence.d.ts.map +1 -0
- package/dist/src/Sentence.js +10 -8
- package/dist/src/Sentence.js.map +1 -0
- package/dist/src/code_template/Code.d.ts +24 -0
- package/dist/src/code_template/Code.d.ts.map +1 -0
- package/dist/src/code_template/Code.js +57 -22
- package/dist/src/code_template/Code.js.map +1 -0
- package/dist/src/code_template/CodeTemplate.d.ts +18 -0
- package/dist/src/code_template/CodeTemplate.d.ts.map +1 -0
- package/dist/src/code_template/CodeTemplate.js +68 -20
- package/dist/src/code_template/CodeTemplate.js.map +1 -0
- package/dist/src/code_template/CodeTemplateModule.d.ts +11 -0
- package/dist/src/code_template/CodeTemplateModule.d.ts.map +1 -0
- package/dist/src/code_template/CodeTemplateModule.js +20 -16
- package/dist/src/code_template/CodeTemplateModule.js.map +1 -0
- package/dist/src/code_template/Repo.d.ts +50 -0
- package/dist/src/code_template/Repo.d.ts.map +1 -0
- package/dist/src/code_template/Repo.js +161 -80
- package/dist/src/code_template/Repo.js.map +1 -0
- package/dist/src/fs/conversation_fs/ConversationFsModerator.d.ts +24 -0
- package/dist/src/fs/conversation_fs/ConversationFsModerator.d.ts.map +1 -0
- package/dist/src/fs/conversation_fs/ConversationFsModerator.js +45 -36
- package/dist/src/fs/conversation_fs/ConversationFsModerator.js.map +1 -0
- package/dist/src/fs/conversation_fs/ConversationFsModule.d.ts +18 -0
- package/dist/src/fs/conversation_fs/ConversationFsModule.d.ts.map +1 -0
- package/dist/src/fs/conversation_fs/ConversationFsModule.js +84 -41
- package/dist/src/fs/conversation_fs/ConversationFsModule.js.map +1 -0
- package/dist/src/fs/conversation_fs/FsFunctions.d.ts +82 -0
- package/dist/src/fs/conversation_fs/FsFunctions.d.ts.map +1 -0
- package/dist/src/fs/conversation_fs/FsFunctions.js +105 -30
- package/dist/src/fs/conversation_fs/FsFunctions.js.map +1 -0
- package/dist/src/fs/git/GitModule.d.ts +14 -0
- package/dist/src/fs/git/GitModule.d.ts.map +1 -0
- package/dist/src/fs/git/GitModule.js +65 -24
- package/dist/src/fs/git/GitModule.js.map +1 -0
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.d.ts +23 -0
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.d.ts.map +1 -0
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.js +35 -5
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexFunctions.js.map +1 -0
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.d.ts +34 -0
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.d.ts.map +1 -0
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.js +107 -50
- package/dist/src/fs/keyword_to_files_index/KeywordToFilesIndexModule.js.map +1 -0
- package/dist/src/fs/package/PackageFunctions.d.ts +79 -0
- package/dist/src/fs/package/PackageFunctions.d.ts.map +1 -0
- package/dist/src/fs/package/PackageFunctions.js +78 -16
- package/dist/src/fs/package/PackageFunctions.js.map +1 -0
- package/dist/src/fs/package/PackageModule.d.ts +34 -0
- package/dist/src/fs/package/PackageModule.d.ts.map +1 -0
- package/dist/src/fs/package/PackageModule.js +135 -62
- package/dist/src/fs/package/PackageModule.js.map +1 -0
- package/dist/src/history/MessageHistory.d.ts +17 -0
- package/dist/src/history/MessageHistory.d.ts.map +1 -0
- package/dist/src/history/MessageHistory.js +25 -22
- package/dist/src/history/MessageHistory.js.map +1 -0
- package/dist/src/history/MessageModerator.d.ts +5 -0
- package/dist/src/history/MessageModerator.d.ts.map +1 -0
- package/dist/src/history/MessageModerator.js +1 -0
- package/dist/src/history/MessageModerator.js.map +1 -0
- package/dist/src/template/ConversationTemplate.d.ts +12 -0
- package/dist/src/template/ConversationTemplate.d.ts.map +1 -0
- package/dist/src/template/ConversationTemplate.js +1 -0
- package/dist/src/template/ConversationTemplate.js.map +1 -0
- package/dist/src/template/ConversationTemplateFunctions.d.ts +44 -0
- package/dist/src/template/ConversationTemplateFunctions.d.ts.map +1 -0
- package/dist/src/template/ConversationTemplateFunctions.js +39 -4
- package/dist/src/template/ConversationTemplateFunctions.js.map +1 -0
- package/dist/src/template/ConversationTemplateModule.d.ts +65 -0
- package/dist/src/template/ConversationTemplateModule.d.ts.map +1 -0
- package/dist/src/template/ConversationTemplateModule.js +92 -47
- package/dist/src/template/ConversationTemplateModule.js.map +1 -0
- package/dist/src/template/createApp/CreateAppTemplate.d.ts +3 -0
- package/dist/src/template/createApp/CreateAppTemplate.d.ts.map +1 -0
- package/dist/src/template/createApp/CreateAppTemplate.js +44 -14
- package/dist/src/template/createApp/CreateAppTemplate.js.map +1 -0
- package/dist/src/template/createCode/CreateCodeConversationTemplate.d.ts +3 -0
- package/dist/src/template/createCode/CreateCodeConversationTemplate.d.ts.map +1 -0
- package/dist/src/template/createCode/CreateCodeConversationTemplate.js +56 -26
- package/dist/src/template/createCode/CreateCodeConversationTemplate.js.map +1 -0
- package/dist/src/template/createPackage/CreatePackageConversationTemplate.d.ts +3 -0
- package/dist/src/template/createPackage/CreatePackageConversationTemplate.d.ts.map +1 -0
- package/dist/src/template/createPackage/CreatePackageConversationTemplate.js +63 -26
- package/dist/src/template/createPackage/CreatePackageConversationTemplate.js.map +1 -0
- package/dist/test/createKeywordFilesIndex.test.d.ts +2 -0
- package/dist/test/createKeywordFilesIndex.test.d.ts.map +1 -0
- package/dist/test/createKeywordFilesIndex.test.js +37 -6
- package/dist/test/createKeywordFilesIndex.test.js.map +1 -0
- package/dist/test/openai/openai.generateList.test.d.ts +2 -0
- package/dist/test/openai/openai.generateList.test.d.ts.map +1 -0
- package/dist/test/openai/openai.generateList.test.js +43 -5
- package/dist/test/openai/openai.generateList.test.js.map +1 -0
- package/dist/test/openai/openai.parseCodeFromMarkdown.test.d.ts +2 -0
- package/dist/test/openai/openai.parseCodeFromMarkdown.test.d.ts.map +1 -0
- package/dist/test/openai/openai.parseCodeFromMarkdown.test.js +11 -10
- package/dist/test/openai/openai.parseCodeFromMarkdown.test.js.map +1 -0
- package/dist/test/repo/repo.test.d.ts +2 -0
- package/dist/test/repo/repo.test.d.ts.map +1 -0
- package/dist/test/repo/repo.test.js +33 -4
- package/dist/test/repo/repo.test.js.map +1 -0
- package/package.json +3 -2
- package/tsconfig.json +20 -106
- package/dist/jest.config.js +0 -10
- package/dist/src/template/createPackage/jest.config.js +0 -10
- package/dist/test/setup.js +0 -1
|
@@ -8,73 +8,118 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
11
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
39
|
exports.ConversationTemplateModuleFactory = exports.ConversationTemplateModule = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
40
|
+
var util_1 = require("@proteinjs/util");
|
|
41
|
+
var CreatePackageConversationTemplate_1 = require("./createPackage/CreatePackageConversationTemplate");
|
|
42
|
+
var ConversationTemplateFunctions_1 = require("./ConversationTemplateFunctions");
|
|
43
|
+
var CreateCodeConversationTemplate_1 = require("./createCode/CreateCodeConversationTemplate");
|
|
44
|
+
var CreateAppTemplate_1 = require("./createApp/CreateAppTemplate");
|
|
45
|
+
var conversationTemplates = [
|
|
19
46
|
CreatePackageConversationTemplate_1.createPackageConversationTemplate,
|
|
20
47
|
CreateCodeConversationTemplate_1.createCodeConversationTemplate,
|
|
21
48
|
CreateAppTemplate_1.createAppTemplate,
|
|
22
49
|
];
|
|
23
|
-
|
|
24
|
-
|
|
50
|
+
var ConversationTemplateModule = /** @class */ (function () {
|
|
51
|
+
function ConversationTemplateModule(params) {
|
|
25
52
|
this.logger = new util_1.Logger(this.constructor.name);
|
|
26
53
|
this.params = params;
|
|
27
54
|
}
|
|
28
|
-
getName() {
|
|
55
|
+
ConversationTemplateModule.prototype.getName = function () {
|
|
29
56
|
return 'Conversation Template';
|
|
30
|
-
}
|
|
31
|
-
searchConversationTemplates(keyword) {
|
|
32
|
-
this.logger.info(
|
|
33
|
-
|
|
57
|
+
};
|
|
58
|
+
ConversationTemplateModule.prototype.searchConversationTemplates = function (keyword) {
|
|
59
|
+
this.logger.info("Searching for conversation template, keyword: ".concat(keyword));
|
|
60
|
+
var conversationNames = this.params.conversationTemplateKeywordIndex[keyword];
|
|
34
61
|
return conversationNames || [];
|
|
35
|
-
}
|
|
36
|
-
getConversationTemplate(conversationTemplateName) {
|
|
37
|
-
return __awaiter(this, void 0, void 0, function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
62
|
+
};
|
|
63
|
+
ConversationTemplateModule.prototype.getConversationTemplate = function (conversationTemplateName) {
|
|
64
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
65
|
+
var conversationTemplate, instructions;
|
|
66
|
+
return __generator(this, function (_a) {
|
|
67
|
+
switch (_a.label) {
|
|
68
|
+
case 0:
|
|
69
|
+
conversationTemplate = this.params.conversationTemplates[conversationTemplateName];
|
|
70
|
+
if (!conversationTemplate)
|
|
71
|
+
return [2 /*return*/, {}];
|
|
72
|
+
return [4 /*yield*/, conversationTemplate.instructions()];
|
|
73
|
+
case 1:
|
|
74
|
+
instructions = _a.sent();
|
|
75
|
+
return [2 /*return*/, Object.assign(conversationTemplate, { instructions: instructions })];
|
|
76
|
+
}
|
|
77
|
+
});
|
|
43
78
|
});
|
|
44
|
-
}
|
|
45
|
-
getSystemMessages() {
|
|
79
|
+
};
|
|
80
|
+
ConversationTemplateModule.prototype.getSystemMessages = function () {
|
|
46
81
|
return [
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
82
|
+
"Whenever the user wants to create or talk about something, fisrt use the ".concat(ConversationTemplateFunctions_1.searchConversationTemplatesFunctionName, " function to identify if there are relevant conversation templates to use"),
|
|
83
|
+
"Use the ".concat(ConversationTemplateFunctions_1.getConversationTemplateFunctionName, " function to get the conversation template"),
|
|
84
|
+
"Once you've identified a conversation template that's relevant to the conversation, ask the user if they'd like to use that conversation template",
|
|
85
|
+
"If they want to engage in the templated conversation, ask only the conversation template questions (template.questions), then use the user's answers to carry out the conversation template instructions (template.instructions)",
|
|
51
86
|
];
|
|
52
|
-
}
|
|
53
|
-
getFunctions() {
|
|
87
|
+
};
|
|
88
|
+
ConversationTemplateModule.prototype.getFunctions = function () {
|
|
54
89
|
return [
|
|
55
90
|
(0, ConversationTemplateFunctions_1.searchConversationTemplatesFunction)(this),
|
|
56
91
|
(0, ConversationTemplateFunctions_1.getConversationTemplateFunction)(this),
|
|
57
92
|
];
|
|
58
|
-
}
|
|
59
|
-
getMessageModerators() {
|
|
93
|
+
};
|
|
94
|
+
ConversationTemplateModule.prototype.getMessageModerators = function () {
|
|
60
95
|
return [];
|
|
61
|
-
}
|
|
62
|
-
|
|
96
|
+
};
|
|
97
|
+
return ConversationTemplateModule;
|
|
98
|
+
}());
|
|
63
99
|
exports.ConversationTemplateModule = ConversationTemplateModule;
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
100
|
+
var ConversationTemplateModuleFactory = /** @class */ (function () {
|
|
101
|
+
function ConversationTemplateModuleFactory() {
|
|
102
|
+
}
|
|
103
|
+
ConversationTemplateModuleFactory.prototype.createModule = function (repoPath) {
|
|
104
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
+
var params, _i, conversationTemplates_1, conversationTemplate, _a, _b, keyword;
|
|
106
|
+
return __generator(this, function (_c) {
|
|
107
|
+
params = { conversationTemplates: {}, conversationTemplateKeywordIndex: {} };
|
|
108
|
+
for (_i = 0, conversationTemplates_1 = conversationTemplates; _i < conversationTemplates_1.length; _i++) {
|
|
109
|
+
conversationTemplate = conversationTemplates_1[_i];
|
|
110
|
+
params.conversationTemplates[conversationTemplate.name] = conversationTemplate;
|
|
111
|
+
for (_a = 0, _b = conversationTemplate.keywords; _a < _b.length; _a++) {
|
|
112
|
+
keyword = _b[_a];
|
|
113
|
+
if (!params.conversationTemplateKeywordIndex[keyword])
|
|
114
|
+
params.conversationTemplateKeywordIndex[keyword] = [];
|
|
115
|
+
params.conversationTemplateKeywordIndex[keyword].push(conversationTemplate.name);
|
|
116
|
+
}
|
|
74
117
|
}
|
|
75
|
-
|
|
76
|
-
|
|
118
|
+
return [2 /*return*/, new ConversationTemplateModule(params)];
|
|
119
|
+
});
|
|
77
120
|
});
|
|
78
|
-
}
|
|
79
|
-
|
|
121
|
+
};
|
|
122
|
+
return ConversationTemplateModuleFactory;
|
|
123
|
+
}());
|
|
80
124
|
exports.ConversationTemplateModuleFactory = ConversationTemplateModuleFactory;
|
|
125
|
+
//# sourceMappingURL=ConversationTemplateModule.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ConversationTemplateModule.js","sourceRoot":"","sources":["../../../src/template/ConversationTemplateModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wCAAyC;AAEzC,uGAAsG;AAEtG,iFAAqM;AACrM,8FAA6F;AAC7F,mEAAkE;AAElE,IAAM,qBAAqB,GAA2B;IACpD,qEAAiC;IACjC,+DAA8B;IAC9B,qCAAiB;CAClB,CAAC;AAOF;IAIE,oCAAY,MAAwC;QAH5C,WAAM,GAAG,IAAI,aAAM,CAAC,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;QAIjD,IAAI,CAAC,MAAM,GAAG,MAAM,CAAC;IACvB,CAAC;IAED,4CAAO,GAAP;QACE,OAAO,uBAAuB,CAAC;IACjC,CAAC;IAED,gEAA2B,GAA3B,UAA4B,OAAe;QACzC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,wDAAiD,OAAO,CAAE,CAAC,CAAC;QAC7E,IAAM,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,gCAAgC,CAAC,OAAO,CAAC,CAAC;QAChF,OAAO,iBAAiB,IAAI,EAAE,CAAC;IACjC,CAAC;IAEK,4DAAuB,GAA7B,UAA8B,wBAAgC;;;;;;wBACtD,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,qBAAqB,CAAC,wBAAwB,CAAC,CAAC;wBACzF,IAAI,CAAC,oBAAoB;4BACvB,sBAAO,EAAS,EAAC;wBAEE,qBAAM,oBAAoB,CAAC,YAAY,EAAE,EAAA;;wBAAxD,YAAY,GAAG,SAAyC;wBAC9D,sBAAO,MAAM,CAAC,MAAM,CAAC,oBAAoB,EAAE,EAAE,YAAY,cAAA,EAAE,CAAC,EAAC;;;;KAC9D;IAED,sDAAiB,GAAjB;QACE,OAAO;YACL,mFAA4E,uEAAuC,8EAA2E;YAC9L,kBAAW,mEAAmC,+CAA4C;YAC1F,mJAAmJ;YACnJ,kOAAkO;SACnO,CAAC;IACJ,CAAC;IAED,iDAAY,GAAZ;QACE,OAAO;YACL,IAAA,mEAAmC,EAAC,IAAI,CAAC;YACzC,IAAA,+DAA+B,EAAC,IAAI,CAAC;SACtC,CAAC;IACJ,CAAC;IAED,yDAAoB,GAApB;QACE,OAAO,EAAE,CAAC;IACZ,CAAC;IACH,iCAAC;AAAD,CAAC,AA9CD,IA8CC;AA9CY,gEAA0B;AAgDvC;IAAA;IAeA,CAAC;IAdO,wDAAY,GAAlB,UAAmB,QAAgB;;;;gBAC3B,MAAM,GAAqC,EAAE,qBAAqB,EAAE,EAAE,EAAE,gCAAgC,EAAE,EAAE,EAAE,CAAC;gBACrH,WAAsD,EAArB,+CAAqB,EAArB,mCAAqB,EAArB,IAAqB,EAAE;oBAA/C,oBAAoB;oBAC3B,MAAM,CAAC,qBAAqB,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,oBAAoB,CAAC;oBAC/E,WAAiD,EAA7B,KAAA,oBAAoB,CAAC,QAAQ,EAA7B,cAA6B,EAA7B,IAA6B,EAAE;wBAA1C,OAAO;wBACd,IAAI,CAAC,MAAM,CAAC,gCAAgC,CAAC,OAAO,CAAC;4BACnD,MAAM,CAAC,gCAAgC,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;wBAExD,MAAM,CAAC,gCAAgC,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,oBAAoB,CAAC,IAAI,CAAC,CAAC;qBAClF;iBACF;gBAED,sBAAO,IAAI,0BAA0B,CAAC,MAAM,CAAC,EAAC;;;KAC/C;IACH,wCAAC;AAAD,CAAC,AAfD,IAeC;AAfY,8EAAiC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateAppTemplate.d.ts","sourceRoot":"","sources":["../../../../src/template/createApp/CreateAppTemplate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAY,MAAM,yBAAyB,CAAC;AAyBzE,eAAO,MAAM,iBAAiB,EAAE,oBAM/B,CAAC"}
|
|
@@ -8,9 +8,36 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
11
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
39
|
exports.createAppTemplate = void 0;
|
|
13
|
-
|
|
40
|
+
var createAppQuestions = [
|
|
14
41
|
{
|
|
15
42
|
text: 'What is the name of the app you want to create?',
|
|
16
43
|
},
|
|
@@ -18,19 +45,21 @@ const createAppQuestions = [
|
|
|
18
45
|
text: 'Which directory would you like to create the app in?',
|
|
19
46
|
},
|
|
20
47
|
];
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
48
|
+
var createAppInstructions = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
49
|
+
return __generator(this, function (_a) {
|
|
50
|
+
// Here we would implement the instructions based on the user's answers to the questions
|
|
51
|
+
return [2 /*return*/, [
|
|
52
|
+
'create a directory for the app (if it doesnt already exist), with the same name as the app (replace ` ` with `-`)',
|
|
53
|
+
'cloneAppTemplatePackages on the app directory',
|
|
54
|
+
'update the package.json files of the packages you just cloned, set the package names to be app-name-ui and app-name-server',
|
|
55
|
+
"update the ui/src/Container.tsx and ui/src/SplashPage.tsx files to replace the occurrences of 'appName' with their app name in each file",
|
|
56
|
+
'npmInstall each newly cloned package',
|
|
57
|
+
'runPackageScript(`build`, cwd) each newly cloned package',
|
|
58
|
+
'describe the packages',
|
|
59
|
+
'tell the user they can start the server by calling `npm run dev` in the server package',
|
|
60
|
+
]];
|
|
61
|
+
});
|
|
62
|
+
}); };
|
|
34
63
|
exports.createAppTemplate = {
|
|
35
64
|
name: 'Create App',
|
|
36
65
|
keywords: ['create', 'app', 'create app', 'create new app'],
|
|
@@ -38,3 +67,4 @@ exports.createAppTemplate = {
|
|
|
38
67
|
questions: createAppQuestions,
|
|
39
68
|
instructions: createAppInstructions,
|
|
40
69
|
};
|
|
70
|
+
//# sourceMappingURL=CreateAppTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateAppTemplate.js","sourceRoot":"","sources":["../../../../src/template/createApp/CreateAppTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAM,kBAAkB,GAAe;IACrC;QACE,IAAI,EAAE,iDAAiD;KACxD;IACD;QACE,IAAI,EAAE,sDAAsD;KAC7D;CACF,CAAC;AAEF,IAAM,qBAAqB,GAAG;;QAC5B,wFAAwF;QACxF,sBAAO;gBACL,mHAAmH;gBACnH,+CAA+C;gBAC/C,4HAA4H;gBAC5H,0IAA0I;gBAC1I,sCAAsC;gBACtC,0DAA0D;gBAC1D,uBAAuB;gBACvB,wFAAwF;aACzF,EAAC;;KACH,CAAC;AAEW,QAAA,iBAAiB,GAAyB;IACrD,IAAI,EAAE,YAAY;IAClB,QAAQ,EAAE,CAAC,QAAQ,EAAE,KAAK,EAAE,YAAY,EAAE,gBAAgB,CAAC;IAC3D,WAAW,EAAE,yEAAyE;IACtF,SAAS,EAAE,kBAAkB;IAC7B,YAAY,EAAE,qBAAqB;CACpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateCodeConversationTemplate.d.ts","sourceRoot":"","sources":["../../../../src/template/createCode/CreateCodeConversationTemplate.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAE/D,eAAO,MAAM,8BAA8B,EAAE,oBAoC5C,CAAA"}
|
|
@@ -8,10 +8,37 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
11
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
39
|
exports.createCodeConversationTemplate = void 0;
|
|
13
|
-
|
|
14
|
-
|
|
40
|
+
var FsFunctions_1 = require("../../fs/conversation_fs/FsFunctions");
|
|
41
|
+
var PackageFunctions_1 = require("../../fs/package/PackageFunctions");
|
|
15
42
|
exports.createCodeConversationTemplate = {
|
|
16
43
|
name: 'Create code',
|
|
17
44
|
keywords: [
|
|
@@ -24,28 +51,31 @@ exports.createCodeConversationTemplate = {
|
|
|
24
51
|
],
|
|
25
52
|
description: 'User and ai developing together',
|
|
26
53
|
questions: [],
|
|
27
|
-
instructions: ()
|
|
28
|
-
return
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
54
|
+
instructions: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
55
|
+
return __generator(this, function (_a) {
|
|
56
|
+
return [2 /*return*/, [
|
|
57
|
+
"You are going to generate code for the user, follow these steps:",
|
|
58
|
+
"1. Confirm the package they want to work in, if the user didn't already provide one",
|
|
59
|
+
"1.a. Use the ".concat(PackageFunctions_1.searchPackagesFunctionName, " function to identify the package.json file path"),
|
|
60
|
+
"1.b. Use the ".concat(FsFunctions_1.readFilesFunctionName, " function to read the package.json file, reference this throughout the conversation in the fileSystem"),
|
|
61
|
+
"1.c. Set the cwd to the directory of the package.json file",
|
|
62
|
+
"2. Ask for a file name to work in, if the user didn't alrady provide one",
|
|
63
|
+
"2.a. Whenever the user wants to create a new source file, default to creating it in the package src/ folder",
|
|
64
|
+
"2.b. Confirm the package-relative file path with the user. Only after the users confirms the path, create the file if it doesn't exist",
|
|
65
|
+
"2.b.1. Use the ".concat(FsFunctions_1.fileOrDirectoryExistsFunction.definition.name, " function to confirm if a file exists"),
|
|
66
|
+
"3. Once working in a file, ask the user what they'd like to create",
|
|
67
|
+
"3.a. If the user references a library, use the ".concat(PackageFunctions_1.searchLibrariesFunctionName, " function to identify local libraries that can be imported"),
|
|
68
|
+
"3.a.1. Confirm the library file name and package name with the user, if they provide a different library or package name, repeat step 3.a.",
|
|
69
|
+
"3.a.2. Call the ".concat(PackageFunctions_1.generateTypescriptDeclarationsFunction.definition.name, " function to get the typescript declaration of the library file"),
|
|
70
|
+
"3.a.3. Use the typescript declaration and the package name to add the import statements to the top of the file",
|
|
71
|
+
"3.a.4. Use the ".concat(FsFunctions_1.readFilesFunctionName, " function on the package.json if it's not in the fileSystem"),
|
|
72
|
+
"3.a.5. Check the pacakge.json dependencies, if the imported package is not already a dependency, use the ".concat(PackageFunctions_1.installPackagesFunction.definition.name, " function to install it"),
|
|
73
|
+
"3.a.5.a. Use the ".concat(PackageFunctions_1.searchPackagesFunctionName, " on the import package to derermine if it's in the local repo; if it is, calculate the relative path from the cwd package to the package being installed, use that path as the version when installing the package"),
|
|
74
|
+
"3.b. Generate the code the user asked to create, leveraging the imported library where appropriate",
|
|
75
|
+
"3.c. When writing the code to file, if updating an existing file, be sure to read the file first to not blow away existing code. Be sure to preserve comments as well.",
|
|
76
|
+
"4. Repeat 3. unless the user asks to switch packages or files",
|
|
77
|
+
]];
|
|
78
|
+
});
|
|
79
|
+
}); }
|
|
51
80
|
};
|
|
81
|
+
//# sourceMappingURL=CreateCodeConversationTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreateCodeConversationTemplate.js","sourceRoot":"","sources":["../../../../src/template/createCode/CreateCodeConversationTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,oEAA4G;AAC5G,sEAA6K;AAGhK,QAAA,8BAA8B,GAAyB;IAClE,IAAI,EAAE,aAAa;IACnB,QAAQ,EAAE;QACR,aAAa;QACb,WAAW;QACX,YAAY;QACZ,eAAe;QACf,gBAAgB;QAChB,iBAAiB;KAClB;IACD,WAAW,EAAE,iCAAiC;IAC9C,SAAS,EAAE,EAAE;IACb,YAAY,EAAE;;YACZ,sBAAO;oBACL,kEAAkE;oBAClE,qFAAqF;oBACrF,uBAAgB,6CAA0B,qDAAkD;oBAC5F,uBAAgB,mCAAqB,0GAAuG;oBAC5I,4DAA4D;oBAC5D,0EAA0E;oBAC1E,6GAA6G;oBAC7G,wIAAwI;oBACxI,yBAAkB,2CAA6B,CAAC,UAAU,CAAC,IAAI,0CAAuC;oBACtG,oEAAoE;oBACpE,yDAAkD,8CAA2B,+DAA4D;oBACzI,4IAA4I;oBAC5I,0BAAmB,yDAAsC,CAAC,UAAU,CAAC,IAAI,oEAAiE;oBAC1I,gHAAgH;oBAChH,yBAAkB,mCAAqB,gEAA6D;oBACpG,mHAA4G,0CAAuB,CAAC,UAAU,CAAC,IAAI,4BAAyB;oBAC5K,2BAAoB,6CAA0B,uNAAoN;oBAClQ,oGAAoG;oBACpG,wKAAwK;oBACxK,+DAA+D;iBAChE,EAAC;;SACH;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreatePackageConversationTemplate.d.ts","sourceRoot":"","sources":["../../../../src/template/createPackage/CreatePackageConversationTemplate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAI/D,eAAO,MAAM,iCAAiC,EAAE,oBAoC/C,CAAA"}
|
|
@@ -8,13 +8,40 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
11
38
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
39
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
40
|
};
|
|
14
41
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
42
|
exports.createPackageConversationTemplate = void 0;
|
|
16
|
-
|
|
17
|
-
|
|
43
|
+
var util_node_1 = require("@proteinjs/util-node");
|
|
44
|
+
var path_1 = __importDefault(require("path"));
|
|
18
45
|
exports.createPackageConversationTemplate = {
|
|
19
46
|
name: 'Create Package',
|
|
20
47
|
keywords: [
|
|
@@ -23,32 +50,42 @@ exports.createPackageConversationTemplate = {
|
|
|
23
50
|
'create',
|
|
24
51
|
'create a package',
|
|
25
52
|
'create a new package',
|
|
26
|
-
|
|
53
|
+
"new package",
|
|
27
54
|
],
|
|
28
55
|
description: 'Create a npm package',
|
|
29
56
|
questions: [
|
|
30
|
-
{ text:
|
|
31
|
-
{ text:
|
|
32
|
-
{ text:
|
|
33
|
-
{ text:
|
|
34
|
-
{ text:
|
|
57
|
+
{ text: "Which folder should the package be created in?" },
|
|
58
|
+
{ text: "What should the package name be?" },
|
|
59
|
+
{ text: "What should the package version be?", optional: true },
|
|
60
|
+
{ text: "Is this a typescript project?" },
|
|
61
|
+
{ text: "Are there any default dependencies you'd like to include?", optional: true },
|
|
35
62
|
],
|
|
36
|
-
instructions: ()
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
63
|
+
instructions: function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
64
|
+
var jestConfig, tsConfig;
|
|
65
|
+
return __generator(this, function (_a) {
|
|
66
|
+
switch (_a.label) {
|
|
67
|
+
case 0: return [4 /*yield*/, util_node_1.Fs.readFile(path_1.default.join(__dirname, "./jest.config.js"))];
|
|
68
|
+
case 1:
|
|
69
|
+
jestConfig = _a.sent();
|
|
70
|
+
return [4 /*yield*/, util_node_1.Fs.readFile(path_1.default.join(__dirname, "./tsconfig.json"))];
|
|
71
|
+
case 2:
|
|
72
|
+
tsConfig = _a.sent();
|
|
73
|
+
return [2 /*return*/, [
|
|
74
|
+
"Create a new package.json with the provided name, version (if one wasn't provided, default to 0.1), and any default dependencies provided",
|
|
75
|
+
"Create the package.json in the specified folder, do not create subfolders from the package name",
|
|
76
|
+
"If the folder does not exist, create the folder",
|
|
77
|
+
"Add these scripts to the package.json: \"start\": \"node ./dist/index.js\", \"test\": \"jest\"",
|
|
78
|
+
"Add these dev dependencies to the package.json: jest",
|
|
79
|
+
"If it's a typescript project, add these dev dependencies: @types/jest, ts-jest",
|
|
80
|
+
"If it's a typescript project, add these scripts: \"watch\": \"tsc -w -p .\"",
|
|
81
|
+
"Create an index file in the package root directory (choose extension based on if it's a typescript project or not)",
|
|
82
|
+
"Create the following folders in the package directory: src, test",
|
|
83
|
+
"Create a jest.config.js file in the test directory with the following content: ".concat(jestConfig),
|
|
84
|
+
"Create a .gitignore file in the package directory that ignores the node_modules and dist directories",
|
|
85
|
+
"If it's a typescript project, create a tsconfig.json file in the pakage directory with the following content: ".concat(tsConfig),
|
|
86
|
+
]];
|
|
87
|
+
}
|
|
88
|
+
});
|
|
89
|
+
}); },
|
|
54
90
|
};
|
|
91
|
+
//# sourceMappingURL=CreatePackageConversationTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"CreatePackageConversationTemplate.js","sourceRoot":"","sources":["../../../../src/template/createPackage/CreatePackageConversationTemplate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0C;AAE1C,8CAAwB;AAGX,QAAA,iCAAiC,GAAyB;IACrE,IAAI,EAAE,gBAAgB;IACtB,QAAQ,EAAE;QACR,SAAS;QACT,gBAAgB;QAChB,QAAQ;QACR,kBAAkB;QAClB,sBAAsB;QACtB,aAAa;KACd;IACD,WAAW,EAAE,sBAAsB;IACnC,SAAS,EAAE;QACT,EAAE,IAAI,EAAE,gDAAgD,EAAE;QAC1D,EAAE,IAAI,EAAE,kCAAkC,EAAE;QAC5C,EAAE,IAAI,EAAE,qCAAqC,EAAE,QAAQ,EAAE,IAAI,EAAE;QAC/D,EAAE,IAAI,EAAE,+BAA+B,EAAE;QACzC,EAAE,IAAI,EAAE,2DAA2D,EAAE,QAAQ,EAAE,IAAI,EAAE;KACtF;IACD,YAAY,EAAE;;;;wBACO,qBAAM,cAAE,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,kBAAkB,CAAC,CAAC,EAAA;;oBAAxE,UAAU,GAAG,SAA2D;oBAC7D,qBAAM,cAAE,CAAC,QAAQ,CAAC,cAAI,CAAC,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC,CAAC,EAAA;;oBAArE,QAAQ,GAAG,SAA0D;oBAC3E,sBAAO;4BACL,2IAA2I;4BAC3I,iGAAiG;4BACjG,iDAAiD;4BACjD,gGAAwF;4BACxF,sDAAsD;4BACtD,gFAAgF;4BAChF,6EAAyE;4BACzE,oHAAoH;4BACpH,kEAAkE;4BAClE,yFAAkF,UAAU,CAAE;4BAC9F,sGAAsG;4BACtG,wHAAiH,QAAQ,CAAE;yBAC5H,EAAC;;;SACH;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createKeywordFilesIndex.test.d.ts","sourceRoot":"","sources":["../../test/createKeywordFilesIndex.test.ts"],"names":[],"mappings":""}
|
|
@@ -8,10 +8,41 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
+
function step(op) {
|
|
16
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
+
while (g && (g = 0, op[0] && (_ = 0)), _) try {
|
|
18
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
19
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
+
switch (op[0]) {
|
|
21
|
+
case 0: case 1: t = op; break;
|
|
22
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
+
default:
|
|
26
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
+
if (t[2]) _.ops.pop();
|
|
31
|
+
_.trys.pop(); continue;
|
|
32
|
+
}
|
|
33
|
+
op = body.call(thisArg, _);
|
|
34
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
+
}
|
|
37
|
+
};
|
|
11
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
|
|
13
|
-
test('Create keyword-files index', ()
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
39
|
+
var KeywordToFilesIndexModule_1 = require("../src/fs/keyword_to_files_index/KeywordToFilesIndexModule");
|
|
40
|
+
test('Create keyword-files index', function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
41
|
+
var index;
|
|
42
|
+
return __generator(this, function (_a) {
|
|
43
|
+
index = new KeywordToFilesIndexModule_1.KeywordToFilesIndexModuleFactory().createKeywordFilesIndex("".concat(process.cwd()));
|
|
44
|
+
console.log(JSON.stringify(index, null, 2));
|
|
45
|
+
return [2 /*return*/];
|
|
46
|
+
});
|
|
47
|
+
}); }, 60000);
|
|
48
|
+
//# sourceMappingURL=createKeywordFilesIndex.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"createKeywordFilesIndex.test.js","sourceRoot":"","sources":["../../test/createKeywordFilesIndex.test.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,wGAA8G;AAE9G,IAAI,CAAC,4BAA4B,EAAE;;;QAE3B,KAAK,GAAG,IAAI,4DAAgC,EAAE,CAAC,uBAAuB,CAAC,UAAG,OAAO,CAAC,GAAG,EAAE,CAAE,CAAC,CAAA;QAChG,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;;;KAC7C,EAAE,KAAK,CAAC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"openai.generateList.test.d.ts","sourceRoot":"","sources":["../../../test/openai/openai.generateList.test.ts"],"names":[],"mappings":""}
|