ide-assi 0.716.0 → 0.718.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundle.cjs.js +8 -7
- package/dist/bundle.esm.js +8 -7
- package/dist/components/ideAi.js +8 -7
- package/package.json +1 -1
- package/src/components/ideAi.js +8 -7
package/dist/bundle.cjs.js
CHANGED
|
@@ -202617,7 +202617,7 @@ class IdeAi
|
|
|
202617
202617
|
#invoke = async (path, params) => {
|
|
202618
202618
|
|
|
202619
202619
|
const prompt = await IdeUtils.generatePrompt(path, params);
|
|
202620
|
-
|
|
202620
|
+
console.log(prompt);
|
|
202621
202621
|
|
|
202622
202622
|
try {
|
|
202623
202623
|
const response = await this.#model.invoke([
|
|
@@ -202625,9 +202625,13 @@ class IdeAi
|
|
|
202625
202625
|
new HumanMessage(prompt),
|
|
202626
202626
|
]);
|
|
202627
202627
|
|
|
202628
|
+
console.log(response);
|
|
202629
|
+
|
|
202628
202630
|
return IdeUtils.extractResponse(response, this.#parent.settings.server);
|
|
202629
202631
|
}
|
|
202630
202632
|
catch (error) {
|
|
202633
|
+
console.log(error);
|
|
202634
|
+
|
|
202631
202635
|
throw error;
|
|
202632
202636
|
}
|
|
202633
202637
|
}
|
|
@@ -202678,6 +202682,7 @@ class IdeAi
|
|
|
202678
202682
|
#generateTmplFile = async (promptFile, generateFileName, params) => {
|
|
202679
202683
|
|
|
202680
202684
|
let src = await this.#invoke(promptFile, params);
|
|
202685
|
+
|
|
202681
202686
|
if (src.endsWith("```")) {
|
|
202682
202687
|
src = src.slice(0, -3);
|
|
202683
202688
|
}
|
|
@@ -202803,12 +202808,11 @@ class IdeAi
|
|
|
202803
202808
|
|
|
202804
202809
|
const src = await api.post("/api/source/read", srcPath);
|
|
202805
202810
|
console.log(src);
|
|
202806
|
-
|
|
202811
|
+
|
|
202807
202812
|
progressMessageInstance.updateProgress('prepare2', 'completed');
|
|
202808
202813
|
|
|
202809
|
-
console.log(22222);
|
|
202810
202814
|
const columnInfo = await this.#getColumnInfo(where.table);
|
|
202811
|
-
|
|
202815
|
+
|
|
202812
202816
|
let generatedSource = {
|
|
202813
202817
|
mybatis: src.mybatis,
|
|
202814
202818
|
service: src.service,
|
|
@@ -202857,13 +202861,10 @@ class IdeAi
|
|
|
202857
202861
|
}
|
|
202858
202862
|
|
|
202859
202863
|
if (apply.javascript) {
|
|
202860
|
-
console.log(0);
|
|
202861
202864
|
|
|
202862
202865
|
const mainfiles = this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all."));
|
|
202863
202866
|
const subfiles = this.prompt.react.filter(item => item.includes(".sub.") || item.includes(".all."));
|
|
202864
202867
|
|
|
202865
|
-
console.log(what, mainfiles, subfiles);
|
|
202866
|
-
|
|
202867
202868
|
if (["C1","U1"].includes(what)) {
|
|
202868
202869
|
generatedSource.javascriptFrom = await this.#generateTmplFile(mainfiles, "reactFrom.jsx", {
|
|
202869
202870
|
userPrompt: userPrompt,
|
package/dist/bundle.esm.js
CHANGED
|
@@ -202613,7 +202613,7 @@ class IdeAi
|
|
|
202613
202613
|
#invoke = async (path, params) => {
|
|
202614
202614
|
|
|
202615
202615
|
const prompt = await IdeUtils.generatePrompt(path, params);
|
|
202616
|
-
|
|
202616
|
+
console.log(prompt);
|
|
202617
202617
|
|
|
202618
202618
|
try {
|
|
202619
202619
|
const response = await this.#model.invoke([
|
|
@@ -202621,9 +202621,13 @@ class IdeAi
|
|
|
202621
202621
|
new HumanMessage(prompt),
|
|
202622
202622
|
]);
|
|
202623
202623
|
|
|
202624
|
+
console.log(response);
|
|
202625
|
+
|
|
202624
202626
|
return IdeUtils.extractResponse(response, this.#parent.settings.server);
|
|
202625
202627
|
}
|
|
202626
202628
|
catch (error) {
|
|
202629
|
+
console.log(error);
|
|
202630
|
+
|
|
202627
202631
|
throw error;
|
|
202628
202632
|
}
|
|
202629
202633
|
}
|
|
@@ -202674,6 +202678,7 @@ class IdeAi
|
|
|
202674
202678
|
#generateTmplFile = async (promptFile, generateFileName, params) => {
|
|
202675
202679
|
|
|
202676
202680
|
let src = await this.#invoke(promptFile, params);
|
|
202681
|
+
|
|
202677
202682
|
if (src.endsWith("```")) {
|
|
202678
202683
|
src = src.slice(0, -3);
|
|
202679
202684
|
}
|
|
@@ -202799,12 +202804,11 @@ class IdeAi
|
|
|
202799
202804
|
|
|
202800
202805
|
const src = await api.post("/api/source/read", srcPath);
|
|
202801
202806
|
console.log(src);
|
|
202802
|
-
|
|
202807
|
+
|
|
202803
202808
|
progressMessageInstance.updateProgress('prepare2', 'completed');
|
|
202804
202809
|
|
|
202805
|
-
console.log(22222);
|
|
202806
202810
|
const columnInfo = await this.#getColumnInfo(where.table);
|
|
202807
|
-
|
|
202811
|
+
|
|
202808
202812
|
let generatedSource = {
|
|
202809
202813
|
mybatis: src.mybatis,
|
|
202810
202814
|
service: src.service,
|
|
@@ -202853,13 +202857,10 @@ class IdeAi
|
|
|
202853
202857
|
}
|
|
202854
202858
|
|
|
202855
202859
|
if (apply.javascript) {
|
|
202856
|
-
console.log(0);
|
|
202857
202860
|
|
|
202858
202861
|
const mainfiles = this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all."));
|
|
202859
202862
|
const subfiles = this.prompt.react.filter(item => item.includes(".sub.") || item.includes(".all."));
|
|
202860
202863
|
|
|
202861
|
-
console.log(what, mainfiles, subfiles);
|
|
202862
|
-
|
|
202863
202864
|
if (["C1","U1"].includes(what)) {
|
|
202864
202865
|
generatedSource.javascriptFrom = await this.#generateTmplFile(mainfiles, "reactFrom.jsx", {
|
|
202865
202866
|
userPrompt: userPrompt,
|
package/dist/components/ideAi.js
CHANGED
|
@@ -91,7 +91,7 @@ export class IdeAi
|
|
|
91
91
|
#invoke = async (path, params) => {
|
|
92
92
|
|
|
93
93
|
const prompt = await IdeUtils.generatePrompt(path, params);
|
|
94
|
-
|
|
94
|
+
console.log(prompt);
|
|
95
95
|
|
|
96
96
|
try {
|
|
97
97
|
const response = await this.#model.invoke([
|
|
@@ -99,9 +99,13 @@ export class IdeAi
|
|
|
99
99
|
new HumanMessage(prompt),
|
|
100
100
|
]);
|
|
101
101
|
|
|
102
|
+
console.log(response);
|
|
103
|
+
|
|
102
104
|
return IdeUtils.extractResponse(response, this.#parent.settings.server);
|
|
103
105
|
}
|
|
104
106
|
catch (error) {
|
|
107
|
+
console.log(error);
|
|
108
|
+
|
|
105
109
|
throw error;
|
|
106
110
|
}
|
|
107
111
|
}
|
|
@@ -152,6 +156,7 @@ export class IdeAi
|
|
|
152
156
|
#generateTmplFile = async (promptFile, generateFileName, params) => {
|
|
153
157
|
|
|
154
158
|
let src = await this.#invoke(promptFile, params);
|
|
159
|
+
|
|
155
160
|
if (src.endsWith("```")) {
|
|
156
161
|
src = src.slice(0, -3);
|
|
157
162
|
}
|
|
@@ -277,12 +282,11 @@ export class IdeAi
|
|
|
277
282
|
|
|
278
283
|
const src = await api.post("/api/source/read", srcPath);
|
|
279
284
|
console.log(src);
|
|
280
|
-
|
|
285
|
+
|
|
281
286
|
progressMessageInstance.updateProgress('prepare2', 'completed');
|
|
282
287
|
|
|
283
|
-
console.log(22222);
|
|
284
288
|
const columnInfo = await this.#getColumnInfo(where.table);
|
|
285
|
-
|
|
289
|
+
|
|
286
290
|
let generatedSource = {
|
|
287
291
|
mybatis: src.mybatis,
|
|
288
292
|
service: src.service,
|
|
@@ -331,13 +335,10 @@ export class IdeAi
|
|
|
331
335
|
}
|
|
332
336
|
|
|
333
337
|
if (apply.javascript) {
|
|
334
|
-
console.log(0);
|
|
335
338
|
|
|
336
339
|
const mainfiles = this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all."));
|
|
337
340
|
const subfiles = this.prompt.react.filter(item => item.includes(".sub.") || item.includes(".all."));
|
|
338
341
|
|
|
339
|
-
console.log(what, mainfiles, subfiles);
|
|
340
|
-
|
|
341
342
|
if (["C1","U1"].includes(what)) {
|
|
342
343
|
generatedSource.javascriptFrom = await this.#generateTmplFile(mainfiles, "reactFrom.jsx", {
|
|
343
344
|
userPrompt: userPrompt,
|
package/package.json
CHANGED
package/src/components/ideAi.js
CHANGED
|
@@ -91,7 +91,7 @@ export class IdeAi
|
|
|
91
91
|
#invoke = async (path, params) => {
|
|
92
92
|
|
|
93
93
|
const prompt = await IdeUtils.generatePrompt(path, params);
|
|
94
|
-
|
|
94
|
+
console.log(prompt);
|
|
95
95
|
|
|
96
96
|
try {
|
|
97
97
|
const response = await this.#model.invoke([
|
|
@@ -99,9 +99,13 @@ export class IdeAi
|
|
|
99
99
|
new HumanMessage(prompt),
|
|
100
100
|
]);
|
|
101
101
|
|
|
102
|
+
console.log(response);
|
|
103
|
+
|
|
102
104
|
return IdeUtils.extractResponse(response, this.#parent.settings.server);
|
|
103
105
|
}
|
|
104
106
|
catch (error) {
|
|
107
|
+
console.log(error);
|
|
108
|
+
|
|
105
109
|
throw error;
|
|
106
110
|
}
|
|
107
111
|
}
|
|
@@ -152,6 +156,7 @@ export class IdeAi
|
|
|
152
156
|
#generateTmplFile = async (promptFile, generateFileName, params) => {
|
|
153
157
|
|
|
154
158
|
let src = await this.#invoke(promptFile, params);
|
|
159
|
+
|
|
155
160
|
if (src.endsWith("```")) {
|
|
156
161
|
src = src.slice(0, -3);
|
|
157
162
|
}
|
|
@@ -277,12 +282,11 @@ export class IdeAi
|
|
|
277
282
|
|
|
278
283
|
const src = await api.post("/api/source/read", srcPath);
|
|
279
284
|
console.log(src);
|
|
280
|
-
|
|
285
|
+
|
|
281
286
|
progressMessageInstance.updateProgress('prepare2', 'completed');
|
|
282
287
|
|
|
283
|
-
console.log(22222);
|
|
284
288
|
const columnInfo = await this.#getColumnInfo(where.table);
|
|
285
|
-
|
|
289
|
+
|
|
286
290
|
let generatedSource = {
|
|
287
291
|
mybatis: src.mybatis,
|
|
288
292
|
service: src.service,
|
|
@@ -331,13 +335,10 @@ export class IdeAi
|
|
|
331
335
|
}
|
|
332
336
|
|
|
333
337
|
if (apply.javascript) {
|
|
334
|
-
console.log(0);
|
|
335
338
|
|
|
336
339
|
const mainfiles = this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all."));
|
|
337
340
|
const subfiles = this.prompt.react.filter(item => item.includes(".sub.") || item.includes(".all."));
|
|
338
341
|
|
|
339
|
-
console.log(what, mainfiles, subfiles);
|
|
340
|
-
|
|
341
342
|
if (["C1","U1"].includes(what)) {
|
|
342
343
|
generatedSource.javascriptFrom = await this.#generateTmplFile(mainfiles, "reactFrom.jsx", {
|
|
343
344
|
userPrompt: userPrompt,
|