ide-assi 0.217.0 → 0.218.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.
@@ -193457,7 +193457,7 @@ class IdeAi
193457
193457
  #getMenuInfo = () => {
193458
193458
  let arr = [];
193459
193459
 
193460
- ninegrid.querySelectorAll("nx-side-menu-item[url][title]").forEach(elem => {
193460
+ ninegrid.querySelectorAll("nx-side-menu-item[href][title]").forEach(elem => {
193461
193461
  arr.push({
193462
193462
  //menuId: elem.getAttribute("menu-id"),
193463
193463
  url: elem.getAttribute("href"),
@@ -193708,6 +193708,7 @@ class IdeAi
193708
193708
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193709
193709
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193710
193710
 
193711
+
193711
193712
  console.log(where);
193712
193713
 
193713
193714
  const srcPath = this.#getSourcePath(where.menu.url);
@@ -193758,7 +193759,20 @@ class IdeAi
193758
193759
 
193759
193760
  #modifySource = async (userPrompt) => {
193760
193761
 
193761
- console.log("modifySource");
193762
+ const el = ninegrid.querySelector("nx-side-menu-item.active");
193763
+ if (el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
193764
+
193765
+ const href = el.getAttribute("href");
193766
+ el.getAttribute("title");
193767
+
193768
+ const srcPath1 = this.#getSourcePath(href);
193769
+ console.log(srcPath1);
193770
+
193771
+ const template = await api.post("/api/source/read", srcPath);
193772
+ console.log(template);
193773
+
193774
+ //const template = await fetch(path).then(res => res.text());
193775
+
193762
193776
 
193763
193777
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193764
193778
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
@@ -193818,13 +193832,11 @@ class IdeAi
193818
193832
  const what = await this.#what(userPrompt);
193819
193833
  this.#parent.addMessage("명령을 이해했습니다.");
193820
193834
 
193821
- console.log(what);
193822
-
193823
193835
  if (what === "1") {
193824
- this.#createSource(userPrompt);
193836
+ await this.#createSource(userPrompt);
193825
193837
  }
193826
193838
  else if (what === "2") {
193827
- this.#modifySource(userPrompt);
193839
+ await this.#modifySource(userPrompt);
193828
193840
  }
193829
193841
 
193830
193842
  return "OK";
@@ -193453,7 +193453,7 @@ class IdeAi
193453
193453
  #getMenuInfo = () => {
193454
193454
  let arr = [];
193455
193455
 
193456
- ninegrid.querySelectorAll("nx-side-menu-item[url][title]").forEach(elem => {
193456
+ ninegrid.querySelectorAll("nx-side-menu-item[href][title]").forEach(elem => {
193457
193457
  arr.push({
193458
193458
  //menuId: elem.getAttribute("menu-id"),
193459
193459
  url: elem.getAttribute("href"),
@@ -193704,6 +193704,7 @@ class IdeAi
193704
193704
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193705
193705
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
193706
193706
 
193707
+
193707
193708
  console.log(where);
193708
193709
 
193709
193710
  const srcPath = this.#getSourcePath(where.menu.url);
@@ -193754,7 +193755,20 @@ class IdeAi
193754
193755
 
193755
193756
  #modifySource = async (userPrompt) => {
193756
193757
 
193757
- console.log("modifySource");
193758
+ const el = ninegrid.querySelector("nx-side-menu-item.active");
193759
+ if (el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
193760
+
193761
+ const href = el.getAttribute("href");
193762
+ el.getAttribute("title");
193763
+
193764
+ const srcPath1 = this.#getSourcePath(href);
193765
+ console.log(srcPath1);
193766
+
193767
+ const template = await api.post("/api/source/read", srcPath);
193768
+ console.log(template);
193769
+
193770
+ //const template = await fetch(path).then(res => res.text());
193771
+
193758
193772
 
193759
193773
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193760
193774
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
@@ -193814,13 +193828,11 @@ class IdeAi
193814
193828
  const what = await this.#what(userPrompt);
193815
193829
  this.#parent.addMessage("명령을 이해했습니다.");
193816
193830
 
193817
- console.log(what);
193818
-
193819
193831
  if (what === "1") {
193820
- this.#createSource(userPrompt);
193832
+ await this.#createSource(userPrompt);
193821
193833
  }
193822
193834
  else if (what === "2") {
193823
- this.#modifySource(userPrompt);
193835
+ await this.#modifySource(userPrompt);
193824
193836
  }
193825
193837
 
193826
193838
  return "OK";
@@ -41,7 +41,7 @@ export class IdeAi
41
41
  #getMenuInfo = () => {
42
42
  let arr = [];
43
43
 
44
- ninegrid.querySelectorAll("nx-side-menu-item[url][title]").forEach(elem => {
44
+ ninegrid.querySelectorAll("nx-side-menu-item[href][title]").forEach(elem => {
45
45
  arr.push({
46
46
  //menuId: elem.getAttribute("menu-id"),
47
47
  url: elem.getAttribute("href"),
@@ -292,6 +292,7 @@ export class IdeAi
292
292
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
293
293
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
294
294
 
295
+
295
296
  console.log(where);
296
297
 
297
298
  const srcPath = this.#getSourcePath(where.menu.url);
@@ -342,7 +343,20 @@ export class IdeAi
342
343
 
343
344
  #modifySource = async (userPrompt) => {
344
345
 
345
- console.log("modifySource");
346
+ const el = ninegrid.querySelector("nx-side-menu-item.active");
347
+ if (el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
348
+
349
+ const href = el.getAttribute("href");
350
+ const title = el.getAttribute("title");
351
+
352
+ const srcPath1 = this.#getSourcePath(href);
353
+ console.log(srcPath1);
354
+
355
+ const template = await api.post("/api/source/read", srcPath);
356
+ console.log(template);
357
+
358
+ //const template = await fetch(path).then(res => res.text());
359
+
346
360
 
347
361
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
348
362
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
@@ -402,13 +416,11 @@ export class IdeAi
402
416
  const what = await this.#what(userPrompt);
403
417
  this.#parent.addMessage("명령을 이해했습니다.");
404
418
 
405
- console.log(what);
406
-
407
419
  if (what === "1") {
408
- this.#createSource(userPrompt);
420
+ await this.#createSource(userPrompt);
409
421
  }
410
422
  else if (what === "2") {
411
- this.#modifySource(userPrompt);
423
+ await this.#modifySource(userPrompt);
412
424
  }
413
425
 
414
426
  return "OK";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.217.0",
4
+ "version": "0.218.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -41,7 +41,7 @@ export class IdeAi
41
41
  #getMenuInfo = () => {
42
42
  let arr = [];
43
43
 
44
- ninegrid.querySelectorAll("nx-side-menu-item[url][title]").forEach(elem => {
44
+ ninegrid.querySelectorAll("nx-side-menu-item[href][title]").forEach(elem => {
45
45
  arr.push({
46
46
  //menuId: elem.getAttribute("menu-id"),
47
47
  url: elem.getAttribute("href"),
@@ -292,6 +292,7 @@ export class IdeAi
292
292
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
293
293
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
294
294
 
295
+
295
296
  console.log(where);
296
297
 
297
298
  const srcPath = this.#getSourcePath(where.menu.url);
@@ -342,7 +343,20 @@ export class IdeAi
342
343
 
343
344
  #modifySource = async (userPrompt) => {
344
345
 
345
- console.log("modifySource");
346
+ const el = ninegrid.querySelector("nx-side-menu-item.active");
347
+ if (el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
348
+
349
+ const href = el.getAttribute("href");
350
+ const title = el.getAttribute("title");
351
+
352
+ const srcPath1 = this.#getSourcePath(href);
353
+ console.log(srcPath1);
354
+
355
+ const template = await api.post("/api/source/read", srcPath);
356
+ console.log(template);
357
+
358
+ //const template = await fetch(path).then(res => res.text());
359
+
346
360
 
347
361
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
348
362
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
@@ -402,13 +416,11 @@ export class IdeAi
402
416
  const what = await this.#what(userPrompt);
403
417
  this.#parent.addMessage("명령을 이해했습니다.");
404
418
 
405
- console.log(what);
406
-
407
419
  if (what === "1") {
408
- this.#createSource(userPrompt);
420
+ await this.#createSource(userPrompt);
409
421
  }
410
422
  else if (what === "2") {
411
- this.#modifySource(userPrompt);
423
+ await this.#modifySource(userPrompt);
412
424
  }
413
425
 
414
426
  return "OK";