ide-assi 0.664.0 → 0.666.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 +51 -23
- package/dist/bundle.esm.js +51 -23
- package/dist/components/aiNatualInput.js +4 -1
- package/dist/components/ideAi.js +54 -2
- package/package.json +1 -1
- package/src/components/aiNatualInput.js +4 -1
- package/src/components/ideAi.js +54 -2
package/dist/bundle.cjs.js
CHANGED
|
@@ -203805,51 +203805,76 @@ console.log(el, href, title);
|
|
|
203805
203805
|
}
|
|
203806
203806
|
}
|
|
203807
203807
|
|
|
203808
|
+
generateWhereCause2 = async (xmlPath, queryId, userPrompt, apiKey) => {
|
|
203808
203809
|
|
|
203810
|
+
const res = await api.post("/api/source/query", {
|
|
203811
|
+
xmlPath: xmlPath,
|
|
203812
|
+
queryId: queryId
|
|
203813
|
+
});
|
|
203809
203814
|
|
|
203815
|
+
console.log(res.query);
|
|
203810
203816
|
|
|
203811
|
-
|
|
203817
|
+
if (res.query) {
|
|
203818
|
+
const o = await this.#invoke('/prompts/user/generateWhereCause.txt', {
|
|
203819
|
+
"query": res.query,
|
|
203820
|
+
"userPrompt": userPrompt
|
|
203821
|
+
});
|
|
203812
203822
|
|
|
203813
|
-
|
|
203814
|
-
const prompt = await IdeUtils.generatePrompt(path, params);
|
|
203823
|
+
console.log(o);
|
|
203815
203824
|
|
|
203816
|
-
|
|
203825
|
+
if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
|
|
203826
|
+
if (o.result !== true) throw new Error(o.condition);
|
|
203827
|
+
}
|
|
203828
|
+
else {
|
|
203829
|
+
throw new Error(o);
|
|
203830
|
+
}
|
|
203817
203831
|
|
|
203818
|
-
|
|
203819
|
-
|
|
203832
|
+
return o.condition;
|
|
203833
|
+
}
|
|
203820
203834
|
|
|
203821
|
-
const response = await model.invoke([
|
|
203822
|
-
//new SystemMessage(systemMessage),
|
|
203823
|
-
new HumanMessage(prompt),
|
|
203824
|
-
]);
|
|
203825
203835
|
|
|
203826
|
-
|
|
203827
|
-
if ((r.startsWith("'") && r.endsWith("'")) || (r.startsWith('"') && r.endsWith('"')) || (r.startsWith('`') && r.endsWith('`'))) {
|
|
203828
|
-
r = r.slice(1, -1); // 맨 앞, 맨 뒤 한 글자씩 제거
|
|
203829
|
-
}
|
|
203836
|
+
};
|
|
203830
203837
|
|
|
203831
|
-
|
|
203832
|
-
|
|
203833
|
-
catch (error) {
|
|
203834
|
-
throw error;
|
|
203835
|
-
}
|
|
203836
|
-
};
|
|
203838
|
+
|
|
203839
|
+
static generateWhereCause = async (xmlPath, queryId, userPrompt, apiKey) => {
|
|
203837
203840
|
|
|
203838
203841
|
const res = await api.post("/api/source/query", {
|
|
203839
203842
|
xmlPath: xmlPath,
|
|
203840
203843
|
queryId: queryId
|
|
203841
203844
|
});
|
|
203842
203845
|
|
|
203846
|
+
console.log(res.query);
|
|
203847
|
+
|
|
203843
203848
|
if (res.query) {
|
|
203844
|
-
const o = await invoke('/prompts/user/generateWhereCause.txt', {
|
|
203849
|
+
const o = await this.#invoke('/prompts/user/generateWhereCause.txt', {
|
|
203845
203850
|
"query": res.query,
|
|
203846
203851
|
"userPrompt": userPrompt
|
|
203847
203852
|
});
|
|
203848
203853
|
|
|
203849
203854
|
console.log(o);
|
|
203850
203855
|
|
|
203851
|
-
|
|
203856
|
+
if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
|
|
203857
|
+
if (o.result !== true) throw new Error(o.condition);
|
|
203858
|
+
}
|
|
203859
|
+
else {
|
|
203860
|
+
throw new Error(o);
|
|
203861
|
+
}
|
|
203862
|
+
|
|
203863
|
+
return o.condition;
|
|
203864
|
+
|
|
203865
|
+
/**
|
|
203866
|
+
const o = await invoke('/prompts/user/generateWhereCause.txt', {
|
|
203867
|
+
"query": res.query,
|
|
203868
|
+
"userPrompt": userPrompt
|
|
203869
|
+
});
|
|
203870
|
+
|
|
203871
|
+
//console.log(o);
|
|
203872
|
+
|
|
203873
|
+
return o;
|
|
203874
|
+
*/
|
|
203852
203875
|
}
|
|
203876
|
+
|
|
203877
|
+
|
|
203853
203878
|
};
|
|
203854
203879
|
}
|
|
203855
203880
|
|
|
@@ -237558,9 +237583,12 @@ class aiNatualInput extends HTMLElement
|
|
|
237558
237583
|
#queryId;
|
|
237559
237584
|
#selectFunc;
|
|
237560
237585
|
#target;
|
|
237586
|
+
#ai;
|
|
237561
237587
|
|
|
237562
237588
|
constructor() {
|
|
237563
237589
|
super();
|
|
237590
|
+
|
|
237591
|
+
this.#ai = new IdeAi(this);
|
|
237564
237592
|
}
|
|
237565
237593
|
|
|
237566
237594
|
connectedCallback() {
|
|
@@ -237584,7 +237612,7 @@ class aiNatualInput extends HTMLElement
|
|
|
237584
237612
|
|
|
237585
237613
|
let params = {};
|
|
237586
237614
|
if (this.#target.value) {
|
|
237587
|
-
params = { "_whereClause": await
|
|
237615
|
+
params = { "_whereClause": await ai.generateWhereCause2(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
|
|
237588
237616
|
}
|
|
237589
237617
|
|
|
237590
237618
|
this.#selectFunc.call(this, params);
|
package/dist/bundle.esm.js
CHANGED
|
@@ -203801,51 +203801,76 @@ console.log(el, href, title);
|
|
|
203801
203801
|
}
|
|
203802
203802
|
}
|
|
203803
203803
|
|
|
203804
|
+
generateWhereCause2 = async (xmlPath, queryId, userPrompt, apiKey) => {
|
|
203804
203805
|
|
|
203806
|
+
const res = await api.post("/api/source/query", {
|
|
203807
|
+
xmlPath: xmlPath,
|
|
203808
|
+
queryId: queryId
|
|
203809
|
+
});
|
|
203805
203810
|
|
|
203811
|
+
console.log(res.query);
|
|
203806
203812
|
|
|
203807
|
-
|
|
203813
|
+
if (res.query) {
|
|
203814
|
+
const o = await this.#invoke('/prompts/user/generateWhereCause.txt', {
|
|
203815
|
+
"query": res.query,
|
|
203816
|
+
"userPrompt": userPrompt
|
|
203817
|
+
});
|
|
203808
203818
|
|
|
203809
|
-
|
|
203810
|
-
const prompt = await IdeUtils.generatePrompt(path, params);
|
|
203819
|
+
console.log(o);
|
|
203811
203820
|
|
|
203812
|
-
|
|
203821
|
+
if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
|
|
203822
|
+
if (o.result !== true) throw new Error(o.condition);
|
|
203823
|
+
}
|
|
203824
|
+
else {
|
|
203825
|
+
throw new Error(o);
|
|
203826
|
+
}
|
|
203813
203827
|
|
|
203814
|
-
|
|
203815
|
-
|
|
203828
|
+
return o.condition;
|
|
203829
|
+
}
|
|
203816
203830
|
|
|
203817
|
-
const response = await model.invoke([
|
|
203818
|
-
//new SystemMessage(systemMessage),
|
|
203819
|
-
new HumanMessage(prompt),
|
|
203820
|
-
]);
|
|
203821
203831
|
|
|
203822
|
-
|
|
203823
|
-
if ((r.startsWith("'") && r.endsWith("'")) || (r.startsWith('"') && r.endsWith('"')) || (r.startsWith('`') && r.endsWith('`'))) {
|
|
203824
|
-
r = r.slice(1, -1); // 맨 앞, 맨 뒤 한 글자씩 제거
|
|
203825
|
-
}
|
|
203832
|
+
};
|
|
203826
203833
|
|
|
203827
|
-
|
|
203828
|
-
|
|
203829
|
-
catch (error) {
|
|
203830
|
-
throw error;
|
|
203831
|
-
}
|
|
203832
|
-
};
|
|
203834
|
+
|
|
203835
|
+
static generateWhereCause = async (xmlPath, queryId, userPrompt, apiKey) => {
|
|
203833
203836
|
|
|
203834
203837
|
const res = await api.post("/api/source/query", {
|
|
203835
203838
|
xmlPath: xmlPath,
|
|
203836
203839
|
queryId: queryId
|
|
203837
203840
|
});
|
|
203838
203841
|
|
|
203842
|
+
console.log(res.query);
|
|
203843
|
+
|
|
203839
203844
|
if (res.query) {
|
|
203840
|
-
const o = await invoke('/prompts/user/generateWhereCause.txt', {
|
|
203845
|
+
const o = await this.#invoke('/prompts/user/generateWhereCause.txt', {
|
|
203841
203846
|
"query": res.query,
|
|
203842
203847
|
"userPrompt": userPrompt
|
|
203843
203848
|
});
|
|
203844
203849
|
|
|
203845
203850
|
console.log(o);
|
|
203846
203851
|
|
|
203847
|
-
|
|
203852
|
+
if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
|
|
203853
|
+
if (o.result !== true) throw new Error(o.condition);
|
|
203854
|
+
}
|
|
203855
|
+
else {
|
|
203856
|
+
throw new Error(o);
|
|
203857
|
+
}
|
|
203858
|
+
|
|
203859
|
+
return o.condition;
|
|
203860
|
+
|
|
203861
|
+
/**
|
|
203862
|
+
const o = await invoke('/prompts/user/generateWhereCause.txt', {
|
|
203863
|
+
"query": res.query,
|
|
203864
|
+
"userPrompt": userPrompt
|
|
203865
|
+
});
|
|
203866
|
+
|
|
203867
|
+
//console.log(o);
|
|
203868
|
+
|
|
203869
|
+
return o;
|
|
203870
|
+
*/
|
|
203848
203871
|
}
|
|
203872
|
+
|
|
203873
|
+
|
|
203849
203874
|
};
|
|
203850
203875
|
}
|
|
203851
203876
|
|
|
@@ -237554,9 +237579,12 @@ class aiNatualInput extends HTMLElement
|
|
|
237554
237579
|
#queryId;
|
|
237555
237580
|
#selectFunc;
|
|
237556
237581
|
#target;
|
|
237582
|
+
#ai;
|
|
237557
237583
|
|
|
237558
237584
|
constructor() {
|
|
237559
237585
|
super();
|
|
237586
|
+
|
|
237587
|
+
this.#ai = new IdeAi(this);
|
|
237560
237588
|
}
|
|
237561
237589
|
|
|
237562
237590
|
connectedCallback() {
|
|
@@ -237580,7 +237608,7 @@ class aiNatualInput extends HTMLElement
|
|
|
237580
237608
|
|
|
237581
237609
|
let params = {};
|
|
237582
237610
|
if (this.#target.value) {
|
|
237583
|
-
params = { "_whereClause": await
|
|
237611
|
+
params = { "_whereClause": await ai.generateWhereCause2(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
|
|
237584
237612
|
}
|
|
237585
237613
|
|
|
237586
237614
|
this.#selectFunc.call(this, params);
|
|
@@ -8,9 +8,12 @@ class aiNatualInput extends HTMLElement
|
|
|
8
8
|
#queryId;
|
|
9
9
|
#selectFunc;
|
|
10
10
|
#target;
|
|
11
|
+
#ai;
|
|
11
12
|
|
|
12
13
|
constructor() {
|
|
13
14
|
super();
|
|
15
|
+
|
|
16
|
+
this.#ai = new IdeAi(this);
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
connectedCallback() {
|
|
@@ -34,7 +37,7 @@ class aiNatualInput extends HTMLElement
|
|
|
34
37
|
|
|
35
38
|
let params = {};
|
|
36
39
|
if (this.#target.value) {
|
|
37
|
-
params = { "_whereClause": await
|
|
40
|
+
params = { "_whereClause": await ai.generateWhereCause2(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
this.#selectFunc.call(this, params);
|
package/dist/components/ideAi.js
CHANGED
|
@@ -1260,7 +1260,35 @@ console.log(el, href, title);
|
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
1262
|
|
|
1263
|
+
generateWhereCause2 = async (xmlPath, queryId, userPrompt, apiKey) => {
|
|
1263
1264
|
|
|
1265
|
+
const res = await api.post("/api/source/query", {
|
|
1266
|
+
xmlPath: xmlPath,
|
|
1267
|
+
queryId: queryId
|
|
1268
|
+
});
|
|
1269
|
+
|
|
1270
|
+
console.log(res.query);
|
|
1271
|
+
|
|
1272
|
+
if (res.query) {
|
|
1273
|
+
const o = await this.#invoke('/prompts/user/generateWhereCause.txt', {
|
|
1274
|
+
"query": res.query,
|
|
1275
|
+
"userPrompt": userPrompt
|
|
1276
|
+
});
|
|
1277
|
+
|
|
1278
|
+
console.log(o);
|
|
1279
|
+
|
|
1280
|
+
if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
|
|
1281
|
+
if (o.result !== true) throw new Error(o.condition);
|
|
1282
|
+
}
|
|
1283
|
+
else {
|
|
1284
|
+
throw new Error(o);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
return o.condition;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
|
|
1291
|
+
};
|
|
1264
1292
|
|
|
1265
1293
|
|
|
1266
1294
|
static generateWhereCause = async (xmlPath, queryId, userPrompt, apiKey) => {
|
|
@@ -1278,6 +1306,8 @@ console.log(el, href, title);
|
|
|
1278
1306
|
new HumanMessage(prompt),
|
|
1279
1307
|
]);
|
|
1280
1308
|
|
|
1309
|
+
console.log(response);
|
|
1310
|
+
|
|
1281
1311
|
let r = IdeUtils.extractResponse(response, "gemini");
|
|
1282
1312
|
if ((r.startsWith("'") && r.endsWith("'")) || (r.startsWith('"') && r.endsWith('"')) || (r.startsWith('`') && r.endsWith('`'))) {
|
|
1283
1313
|
r = r.slice(1, -1); // 맨 앞, 맨 뒤 한 글자씩 제거
|
|
@@ -1295,16 +1325,38 @@ console.log(el, href, title);
|
|
|
1295
1325
|
queryId: queryId
|
|
1296
1326
|
});
|
|
1297
1327
|
|
|
1328
|
+
console.log(res.query);
|
|
1329
|
+
|
|
1298
1330
|
if (res.query) {
|
|
1299
|
-
const o = await invoke('/prompts/user/generateWhereCause.txt', {
|
|
1331
|
+
const o = await this.#invoke('/prompts/user/generateWhereCause.txt', {
|
|
1300
1332
|
"query": res.query,
|
|
1301
1333
|
"userPrompt": userPrompt
|
|
1302
1334
|
});
|
|
1303
1335
|
|
|
1304
1336
|
console.log(o);
|
|
1305
1337
|
|
|
1306
|
-
|
|
1338
|
+
if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
|
|
1339
|
+
if (o.result !== true) throw new Error(o.condition);
|
|
1340
|
+
}
|
|
1341
|
+
else {
|
|
1342
|
+
throw new Error(o);
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
return o.condition;
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
const o = await invoke('/prompts/user/generateWhereCause.txt', {
|
|
1349
|
+
"query": res.query,
|
|
1350
|
+
"userPrompt": userPrompt
|
|
1351
|
+
});
|
|
1352
|
+
|
|
1353
|
+
//console.log(o);
|
|
1354
|
+
|
|
1355
|
+
return o;
|
|
1356
|
+
*/
|
|
1307
1357
|
}
|
|
1358
|
+
|
|
1359
|
+
|
|
1308
1360
|
};
|
|
1309
1361
|
}
|
|
1310
1362
|
|
package/package.json
CHANGED
|
@@ -8,9 +8,12 @@ class aiNatualInput extends HTMLElement
|
|
|
8
8
|
#queryId;
|
|
9
9
|
#selectFunc;
|
|
10
10
|
#target;
|
|
11
|
+
#ai;
|
|
11
12
|
|
|
12
13
|
constructor() {
|
|
13
14
|
super();
|
|
15
|
+
|
|
16
|
+
this.#ai = new IdeAi(this);
|
|
14
17
|
}
|
|
15
18
|
|
|
16
19
|
connectedCallback() {
|
|
@@ -34,7 +37,7 @@ class aiNatualInput extends HTMLElement
|
|
|
34
37
|
|
|
35
38
|
let params = {};
|
|
36
39
|
if (this.#target.value) {
|
|
37
|
-
params = { "_whereClause": await
|
|
40
|
+
params = { "_whereClause": await ai.generateWhereCause2(this.#xmlPath, this.#queryId, this.#target.value, this.#apiKey) };
|
|
38
41
|
}
|
|
39
42
|
|
|
40
43
|
this.#selectFunc.call(this, params);
|
package/src/components/ideAi.js
CHANGED
|
@@ -1260,7 +1260,35 @@ console.log(el, href, title);
|
|
|
1260
1260
|
}
|
|
1261
1261
|
}
|
|
1262
1262
|
|
|
1263
|
+
generateWhereCause2 = async (xmlPath, queryId, userPrompt, apiKey) => {
|
|
1263
1264
|
|
|
1265
|
+
const res = await api.post("/api/source/query", {
|
|
1266
|
+
xmlPath: xmlPath,
|
|
1267
|
+
queryId: queryId
|
|
1268
|
+
});
|
|
1269
|
+
|
|
1270
|
+
console.log(res.query);
|
|
1271
|
+
|
|
1272
|
+
if (res.query) {
|
|
1273
|
+
const o = await this.#invoke('/prompts/user/generateWhereCause.txt', {
|
|
1274
|
+
"query": res.query,
|
|
1275
|
+
"userPrompt": userPrompt
|
|
1276
|
+
});
|
|
1277
|
+
|
|
1278
|
+
console.log(o);
|
|
1279
|
+
|
|
1280
|
+
if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
|
|
1281
|
+
if (o.result !== true) throw new Error(o.condition);
|
|
1282
|
+
}
|
|
1283
|
+
else {
|
|
1284
|
+
throw new Error(o);
|
|
1285
|
+
}
|
|
1286
|
+
|
|
1287
|
+
return o.condition;
|
|
1288
|
+
}
|
|
1289
|
+
|
|
1290
|
+
|
|
1291
|
+
};
|
|
1264
1292
|
|
|
1265
1293
|
|
|
1266
1294
|
static generateWhereCause = async (xmlPath, queryId, userPrompt, apiKey) => {
|
|
@@ -1278,6 +1306,8 @@ console.log(el, href, title);
|
|
|
1278
1306
|
new HumanMessage(prompt),
|
|
1279
1307
|
]);
|
|
1280
1308
|
|
|
1309
|
+
console.log(response);
|
|
1310
|
+
|
|
1281
1311
|
let r = IdeUtils.extractResponse(response, "gemini");
|
|
1282
1312
|
if ((r.startsWith("'") && r.endsWith("'")) || (r.startsWith('"') && r.endsWith('"')) || (r.startsWith('`') && r.endsWith('`'))) {
|
|
1283
1313
|
r = r.slice(1, -1); // 맨 앞, 맨 뒤 한 글자씩 제거
|
|
@@ -1295,16 +1325,38 @@ console.log(el, href, title);
|
|
|
1295
1325
|
queryId: queryId
|
|
1296
1326
|
});
|
|
1297
1327
|
|
|
1328
|
+
console.log(res.query);
|
|
1329
|
+
|
|
1298
1330
|
if (res.query) {
|
|
1299
|
-
const o = await invoke('/prompts/user/generateWhereCause.txt', {
|
|
1331
|
+
const o = await this.#invoke('/prompts/user/generateWhereCause.txt', {
|
|
1300
1332
|
"query": res.query,
|
|
1301
1333
|
"userPrompt": userPrompt
|
|
1302
1334
|
});
|
|
1303
1335
|
|
|
1304
1336
|
console.log(o);
|
|
1305
1337
|
|
|
1306
|
-
|
|
1338
|
+
if (Object.prototype.toString.call(o) === "[object Object]" && o.hasOwnProperty("result")) {
|
|
1339
|
+
if (o.result !== true) throw new Error(o.condition);
|
|
1340
|
+
}
|
|
1341
|
+
else {
|
|
1342
|
+
throw new Error(o);
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
return o.condition;
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
const o = await invoke('/prompts/user/generateWhereCause.txt', {
|
|
1349
|
+
"query": res.query,
|
|
1350
|
+
"userPrompt": userPrompt
|
|
1351
|
+
});
|
|
1352
|
+
|
|
1353
|
+
//console.log(o);
|
|
1354
|
+
|
|
1355
|
+
return o;
|
|
1356
|
+
*/
|
|
1307
1357
|
}
|
|
1358
|
+
|
|
1359
|
+
|
|
1308
1360
|
};
|
|
1309
1361
|
}
|
|
1310
1362
|
|