ide-assi 0.217.0 → 0.219.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,33 @@ 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
+ /**
193772
+ * {
193773
+ * "package": "ide.assi.be.tmpla",
193774
+ * "namespace": "ide.assi.be.tmpla.docmanager",
193775
+ * "baseClass": "DocManager",
193776
+ * "resultType": "ide.assi.core.utils.CamelCaseMap",
193777
+ * "mybatis": "tmpla/DocManagerMapper.xml",
193778
+ * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
193779
+ * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
193780
+ * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
193781
+ * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
193782
+ * }
193783
+ */
193784
+ const template = await api.post("/api/source/read", srcPath);
193785
+ console.log(template);
193786
+
193787
+ //const template = await fetch(path).then(res => res.text());
193788
+
193762
193789
 
193763
193790
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193764
193791
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
@@ -193818,13 +193845,11 @@ class IdeAi
193818
193845
  const what = await this.#what(userPrompt);
193819
193846
  this.#parent.addMessage("명령을 이해했습니다.");
193820
193847
 
193821
- console.log(what);
193822
-
193823
193848
  if (what === "1") {
193824
- this.#createSource(userPrompt);
193849
+ await this.#createSource(userPrompt);
193825
193850
  }
193826
193851
  else if (what === "2") {
193827
- this.#modifySource(userPrompt);
193852
+ await this.#modifySource(userPrompt);
193828
193853
  }
193829
193854
 
193830
193855
  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,33 @@ 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
+ /**
193768
+ * {
193769
+ * "package": "ide.assi.be.tmpla",
193770
+ * "namespace": "ide.assi.be.tmpla.docmanager",
193771
+ * "baseClass": "DocManager",
193772
+ * "resultType": "ide.assi.core.utils.CamelCaseMap",
193773
+ * "mybatis": "tmpla/DocManagerMapper.xml",
193774
+ * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
193775
+ * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
193776
+ * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
193777
+ * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
193778
+ * }
193779
+ */
193780
+ const template = await api.post("/api/source/read", srcPath);
193781
+ console.log(template);
193782
+
193783
+ //const template = await fetch(path).then(res => res.text());
193784
+
193758
193785
 
193759
193786
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
193760
193787
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
@@ -193814,13 +193841,11 @@ class IdeAi
193814
193841
  const what = await this.#what(userPrompt);
193815
193842
  this.#parent.addMessage("명령을 이해했습니다.");
193816
193843
 
193817
- console.log(what);
193818
-
193819
193844
  if (what === "1") {
193820
- this.#createSource(userPrompt);
193845
+ await this.#createSource(userPrompt);
193821
193846
  }
193822
193847
  else if (what === "2") {
193823
- this.#modifySource(userPrompt);
193848
+ await this.#modifySource(userPrompt);
193824
193849
  }
193825
193850
 
193826
193851
  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,33 @@ 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
+ /**
356
+ * {
357
+ * "package": "ide.assi.be.tmpla",
358
+ * "namespace": "ide.assi.be.tmpla.docmanager",
359
+ * "baseClass": "DocManager",
360
+ * "resultType": "ide.assi.core.utils.CamelCaseMap",
361
+ * "mybatis": "tmpla/DocManagerMapper.xml",
362
+ * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
363
+ * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
364
+ * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
365
+ * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
366
+ * }
367
+ */
368
+ const template = await api.post("/api/source/read", srcPath);
369
+ console.log(template);
370
+
371
+ //const template = await fetch(path).then(res => res.text());
372
+
346
373
 
347
374
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
348
375
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
@@ -402,13 +429,11 @@ export class IdeAi
402
429
  const what = await this.#what(userPrompt);
403
430
  this.#parent.addMessage("명령을 이해했습니다.");
404
431
 
405
- console.log(what);
406
-
407
432
  if (what === "1") {
408
- this.#createSource(userPrompt);
433
+ await this.#createSource(userPrompt);
409
434
  }
410
435
  else if (what === "2") {
411
- this.#modifySource(userPrompt);
436
+ await this.#modifySource(userPrompt);
412
437
  }
413
438
 
414
439
  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.219.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,33 @@ 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
+ /**
356
+ * {
357
+ * "package": "ide.assi.be.tmpla",
358
+ * "namespace": "ide.assi.be.tmpla.docmanager",
359
+ * "baseClass": "DocManager",
360
+ * "resultType": "ide.assi.core.utils.CamelCaseMap",
361
+ * "mybatis": "tmpla/DocManagerMapper.xml",
362
+ * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
363
+ * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
364
+ * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
365
+ * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
366
+ * }
367
+ */
368
+ const template = await api.post("/api/source/read", srcPath);
369
+ console.log(template);
370
+
371
+ //const template = await fetch(path).then(res => res.text());
372
+
346
373
 
347
374
  const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
348
375
  this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
@@ -402,13 +429,11 @@ export class IdeAi
402
429
  const what = await this.#what(userPrompt);
403
430
  this.#parent.addMessage("명령을 이해했습니다.");
404
431
 
405
- console.log(what);
406
-
407
432
  if (what === "1") {
408
- this.#createSource(userPrompt);
433
+ await this.#createSource(userPrompt);
409
434
  }
410
435
  else if (what === "2") {
411
- this.#modifySource(userPrompt);
436
+ await this.#modifySource(userPrompt);
412
437
  }
413
438
 
414
439
  return "OK";