ide-assi 0.16.0 → 0.18.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.
@@ -193262,6 +193262,8 @@ class IdeAi
193262
193262
  #API_URL = "http://localhost:8091";
193263
193263
  #SCHEMA = "booxtory_250131";
193264
193264
 
193265
+ #ing = false;
193266
+
193265
193267
  constructor() {
193266
193268
  }
193267
193269
 
@@ -193307,7 +193309,11 @@ class IdeAi
193307
193309
  *
193308
193310
  * 1. 메뉴정보, 테이블정보로 해당 패키지, URL, 소스명칭을 유추
193309
193311
  */
193310
- generateSource = async (question) => {
193312
+ generateSource = async (userPrompt) => {
193313
+
193314
+ if (this.#ing) return;
193315
+
193316
+ this.#ing = true;
193311
193317
 
193312
193318
  const menus = this.#getMenuInfo();
193313
193319
  const tables = await this.#getTableInfo();
@@ -193319,13 +193325,14 @@ class IdeAi
193319
193325
  method: "POST",
193320
193326
  headers: { "Content-Type": "application/json" },
193321
193327
  body: JSON.stringify({
193322
- question: question,
193328
+ userPrompt: userPrompt,
193323
193329
  menus: menus,
193324
193330
  tables: tables.list,
193325
193331
  })
193326
193332
  });
193327
193333
 
193328
193334
  //console.log(await response.json());
193335
+ this.#ing = false;
193329
193336
 
193330
193337
  return await response.json();
193331
193338
  };
@@ -193258,6 +193258,8 @@ class IdeAi
193258
193258
  #API_URL = "http://localhost:8091";
193259
193259
  #SCHEMA = "booxtory_250131";
193260
193260
 
193261
+ #ing = false;
193262
+
193261
193263
  constructor() {
193262
193264
  }
193263
193265
 
@@ -193303,7 +193305,11 @@ class IdeAi
193303
193305
  *
193304
193306
  * 1. 메뉴정보, 테이블정보로 해당 패키지, URL, 소스명칭을 유추
193305
193307
  */
193306
- generateSource = async (question) => {
193308
+ generateSource = async (userPrompt) => {
193309
+
193310
+ if (this.#ing) return;
193311
+
193312
+ this.#ing = true;
193307
193313
 
193308
193314
  const menus = this.#getMenuInfo();
193309
193315
  const tables = await this.#getTableInfo();
@@ -193315,13 +193321,14 @@ class IdeAi
193315
193321
  method: "POST",
193316
193322
  headers: { "Content-Type": "application/json" },
193317
193323
  body: JSON.stringify({
193318
- question: question,
193324
+ userPrompt: userPrompt,
193319
193325
  menus: menus,
193320
193326
  tables: tables.list,
193321
193327
  })
193322
193328
  });
193323
193329
 
193324
193330
  //console.log(await response.json());
193331
+ this.#ing = false;
193325
193332
 
193326
193333
  return await response.json();
193327
193334
  };
@@ -5,6 +5,8 @@ export class IdeAi
5
5
  #API_URL = "http://localhost:8091";
6
6
  #SCHEMA = "booxtory_250131";
7
7
 
8
+ #ing = false;
9
+
8
10
  constructor() {
9
11
  }
10
12
 
@@ -50,7 +52,11 @@ export class IdeAi
50
52
  *
51
53
  * 1. 메뉴정보, 테이블정보로 해당 패키지, URL, 소스명칭을 유추
52
54
  */
53
- generateSource = async (question) => {
55
+ generateSource = async (userPrompt) => {
56
+
57
+ if (this.#ing) return;
58
+
59
+ this.#ing = true;
54
60
 
55
61
  const menus = this.#getMenuInfo();
56
62
  const tables = await this.#getTableInfo();
@@ -62,13 +68,14 @@ export class IdeAi
62
68
  method: "POST",
63
69
  headers: { "Content-Type": "application/json" },
64
70
  body: JSON.stringify({
65
- question: question,
71
+ userPrompt: userPrompt,
66
72
  menus: menus,
67
73
  tables: tables.list,
68
74
  })
69
75
  });
70
76
 
71
77
  //console.log(await response.json());
78
+ this.#ing = false;
72
79
 
73
80
  return await response.json();
74
81
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.16.0",
4
+ "version": "0.18.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -5,6 +5,8 @@ export class IdeAi
5
5
  #API_URL = "http://localhost:8091";
6
6
  #SCHEMA = "booxtory_250131";
7
7
 
8
+ #ing = false;
9
+
8
10
  constructor() {
9
11
  }
10
12
 
@@ -50,7 +52,11 @@ export class IdeAi
50
52
  *
51
53
  * 1. 메뉴정보, 테이블정보로 해당 패키지, URL, 소스명칭을 유추
52
54
  */
53
- generateSource = async (question) => {
55
+ generateSource = async (userPrompt) => {
56
+
57
+ if (this.#ing) return;
58
+
59
+ this.#ing = true;
54
60
 
55
61
  const menus = this.#getMenuInfo();
56
62
  const tables = await this.#getTableInfo();
@@ -62,13 +68,14 @@ export class IdeAi
62
68
  method: "POST",
63
69
  headers: { "Content-Type": "application/json" },
64
70
  body: JSON.stringify({
65
- question: question,
71
+ userPrompt: userPrompt,
66
72
  menus: menus,
67
73
  tables: tables.list,
68
74
  })
69
75
  });
70
76
 
71
77
  //console.log(await response.json());
78
+ this.#ing = false;
72
79
 
73
80
  return await response.json();
74
81
  };