ide-assi 0.102.0 → 0.103.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.
@@ -193517,6 +193517,26 @@ class IdeAi
193517
193517
  return o;
193518
193518
  };
193519
193519
 
193520
+ #mybatis = async (userPrompt, namespace, tableDefinitions) => {
193521
+ //const systemMessage = "You are a helpful assistant.";
193522
+
193523
+ const prompt = await IdeUtils.generatePrompt('/prompts/meta/MyBatisMapper.txt', {
193524
+ "userPrompt": userPrompt,
193525
+ "namespace": namespace,
193526
+ "tableDefinitions": tableDefinitions
193527
+ });
193528
+
193529
+ const response = await this.#model.invoke([
193530
+ //new SystemMessage(systemMessage),
193531
+ new HumanMessage(prompt),
193532
+ ]);
193533
+
193534
+ const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
193535
+ console.log(o);
193536
+
193537
+ return o;
193538
+ };
193539
+
193520
193540
  generateSourceClient = async (userPrompt) => {
193521
193541
 
193522
193542
  this.#createModel();
@@ -193526,9 +193546,12 @@ class IdeAi
193526
193546
 
193527
193547
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193528
193548
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193529
-
193530
193549
  console.log(where);
193531
193550
 
193551
+ await this.#mybatis(userPrompt, where.package, await this.#getColumnInfo(where.table));
193552
+
193553
+
193554
+
193532
193555
  return "OK";
193533
193556
  }
193534
193557
  }
@@ -193513,6 +193513,26 @@ class IdeAi
193513
193513
  return o;
193514
193514
  };
193515
193515
 
193516
+ #mybatis = async (userPrompt, namespace, tableDefinitions) => {
193517
+ //const systemMessage = "You are a helpful assistant.";
193518
+
193519
+ const prompt = await IdeUtils.generatePrompt('/prompts/meta/MyBatisMapper.txt', {
193520
+ "userPrompt": userPrompt,
193521
+ "namespace": namespace,
193522
+ "tableDefinitions": tableDefinitions
193523
+ });
193524
+
193525
+ const response = await this.#model.invoke([
193526
+ //new SystemMessage(systemMessage),
193527
+ new HumanMessage(prompt),
193528
+ ]);
193529
+
193530
+ const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
193531
+ console.log(o);
193532
+
193533
+ return o;
193534
+ };
193535
+
193516
193536
  generateSourceClient = async (userPrompt) => {
193517
193537
 
193518
193538
  this.#createModel();
@@ -193522,9 +193542,12 @@ class IdeAi
193522
193542
 
193523
193543
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193524
193544
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193525
-
193526
193545
  console.log(where);
193527
193546
 
193547
+ await this.#mybatis(userPrompt, where.package, await this.#getColumnInfo(where.table));
193548
+
193549
+
193550
+
193528
193551
  return "OK";
193529
193552
  }
193530
193553
  }
@@ -222,6 +222,26 @@ export class IdeAi
222
222
  return o;
223
223
  };
224
224
 
225
+ #mybatis = async (userPrompt, namespace, tableDefinitions) => {
226
+ //const systemMessage = "You are a helpful assistant.";
227
+
228
+ const prompt = await IdeUtils.generatePrompt('/prompts/meta/MyBatisMapper.txt', {
229
+ "userPrompt": userPrompt,
230
+ "namespace": namespace,
231
+ "tableDefinitions": tableDefinitions
232
+ });
233
+
234
+ const response = await this.#model.invoke([
235
+ //new SystemMessage(systemMessage),
236
+ new HumanMessage(prompt),
237
+ ]);
238
+
239
+ const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
240
+ console.log(o);
241
+
242
+ return o;
243
+ };
244
+
225
245
  generateSourceClient = async (userPrompt) => {
226
246
 
227
247
  this.#createModel();
@@ -231,9 +251,12 @@ export class IdeAi
231
251
 
232
252
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
233
253
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
234
-
235
254
  console.log(where);
236
255
 
256
+ const mybatis = await this.#mybatis(userPrompt, where.package, await this.#getColumnInfo(where.table));
257
+
258
+
259
+
237
260
  return "OK";
238
261
  }
239
262
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.102.0",
4
+ "version": "0.103.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -222,6 +222,26 @@ export class IdeAi
222
222
  return o;
223
223
  };
224
224
 
225
+ #mybatis = async (userPrompt, namespace, tableDefinitions) => {
226
+ //const systemMessage = "You are a helpful assistant.";
227
+
228
+ const prompt = await IdeUtils.generatePrompt('/prompts/meta/MyBatisMapper.txt', {
229
+ "userPrompt": userPrompt,
230
+ "namespace": namespace,
231
+ "tableDefinitions": tableDefinitions
232
+ });
233
+
234
+ const response = await this.#model.invoke([
235
+ //new SystemMessage(systemMessage),
236
+ new HumanMessage(prompt),
237
+ ]);
238
+
239
+ const o = IdeUtils.extractResponse(response, this.#parent.settings.server);
240
+ console.log(o);
241
+
242
+ return o;
243
+ };
244
+
225
245
  generateSourceClient = async (userPrompt) => {
226
246
 
227
247
  this.#createModel();
@@ -231,9 +251,12 @@ export class IdeAi
231
251
 
232
252
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
233
253
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
234
-
235
254
  console.log(where);
236
255
 
256
+ const mybatis = await this.#mybatis(userPrompt, where.package, await this.#getColumnInfo(where.table));
257
+
258
+
259
+
237
260
  return "OK";
238
261
  }
239
262
  }