ide-assi 0.702.0 → 0.703.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.
@@ -203084,58 +203084,34 @@ console.log(el, href, title);
203084
203084
  console.log(srcPath);
203085
203085
  */
203086
203086
 
203087
+ let where;
203088
+ let href;
203087
203089
 
203088
- const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
203089
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
203090
+ if (what === "C1") {
203091
+ where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
203092
+ href = where.menu.url;
203093
+ }
203094
+ else if (what === "U1") {
203095
+ const el = ninegrid.querySelector("nx-side-menu-item.active");
203096
+ if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
203090
203097
 
203091
- console.log(where);
203098
+ href = el.getAttribute("href");
203099
+ const title = el.getAttribute("title");
203092
203100
 
203093
- const srcPath = this.#getSourcePath(where.menu.url);
203094
- console.log(srcPath);
203101
+ where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
203102
+ }
203103
+ else {
203104
+ throw new Error("invalid command type.");
203105
+ }
203095
203106
 
203107
+ const srcPath = this.#getSourcePath(href);
203108
+ console.log(where, srcPath);
203096
203109
 
203097
- /**
203098
- * {
203099
- * "package": "ide.assi.be.tmpla",
203100
- * "namespace": "ide.assi.be.tmpla.docmanager",
203101
- * "baseClass": "DocManager",
203102
- * "resultType": "ide.assi.core.utils.CamelCaseMap",
203103
- * "mybatis": "tmpla/DocManagerMapper.xml",
203104
- * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
203105
- * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
203106
- * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
203107
- * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
203108
- * }
203109
- */
203110
203110
  const src = await api.post("/api/source/read", srcPath);
203111
- console.log(srcPath, src);
203111
+ console.log(src);
203112
203112
 
203113
- /**
203114
- const response = await fetch(srcPath.javascript);
203115
- src.javascript = await response.text();*/
203116
-
203117
- //console.log(src);
203118
- //const template = await fetch(path).then(res => res.text());
203119
- /*
203120
- arr.push({
203121
- //menuId: elem.getAttribute("menu-id"),
203122
- url: elem.getAttribute("href"),
203123
- title: elem.getAttribute("title"),
203124
- })*/
203125
-
203126
-
203127
-
203128
-
203129
-
203130
- //const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
203131
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
203132
203113
  progressMessageInstance.updateProgress('prepare2', 'completed');
203133
203114
 
203134
- //console.log(where);
203135
-
203136
- //const srcPath = this.#getSourcePath(where.menu.url);
203137
-
203138
-
203139
203115
 
203140
203116
  const columnInfo = await this.#getColumnInfo(where.table);
203141
203117
 
@@ -203080,58 +203080,34 @@ console.log(el, href, title);
203080
203080
  console.log(srcPath);
203081
203081
  */
203082
203082
 
203083
+ let where;
203084
+ let href;
203083
203085
 
203084
- const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
203085
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
203086
+ if (what === "C1") {
203087
+ where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
203088
+ href = where.menu.url;
203089
+ }
203090
+ else if (what === "U1") {
203091
+ const el = ninegrid.querySelector("nx-side-menu-item.active");
203092
+ if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
203086
203093
 
203087
- console.log(where);
203094
+ href = el.getAttribute("href");
203095
+ const title = el.getAttribute("title");
203088
203096
 
203089
- const srcPath = this.#getSourcePath(where.menu.url);
203090
- console.log(srcPath);
203097
+ where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
203098
+ }
203099
+ else {
203100
+ throw new Error("invalid command type.");
203101
+ }
203091
203102
 
203103
+ const srcPath = this.#getSourcePath(href);
203104
+ console.log(where, srcPath);
203092
203105
 
203093
- /**
203094
- * {
203095
- * "package": "ide.assi.be.tmpla",
203096
- * "namespace": "ide.assi.be.tmpla.docmanager",
203097
- * "baseClass": "DocManager",
203098
- * "resultType": "ide.assi.core.utils.CamelCaseMap",
203099
- * "mybatis": "tmpla/DocManagerMapper.xml",
203100
- * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
203101
- * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
203102
- * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
203103
- * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
203104
- * }
203105
- */
203106
203106
  const src = await api.post("/api/source/read", srcPath);
203107
- console.log(srcPath, src);
203107
+ console.log(src);
203108
203108
 
203109
- /**
203110
- const response = await fetch(srcPath.javascript);
203111
- src.javascript = await response.text();*/
203112
-
203113
- //console.log(src);
203114
- //const template = await fetch(path).then(res => res.text());
203115
- /*
203116
- arr.push({
203117
- //menuId: elem.getAttribute("menu-id"),
203118
- url: elem.getAttribute("href"),
203119
- title: elem.getAttribute("title"),
203120
- })*/
203121
-
203122
-
203123
-
203124
-
203125
-
203126
- //const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
203127
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
203128
203109
  progressMessageInstance.updateProgress('prepare2', 'completed');
203129
203110
 
203130
- //console.log(where);
203131
-
203132
- //const srcPath = this.#getSourcePath(where.menu.url);
203133
-
203134
-
203135
203111
 
203136
203112
  const columnInfo = await this.#getColumnInfo(where.table);
203137
203113
 
@@ -558,58 +558,34 @@ console.log(el, href, title);
558
558
  console.log(srcPath);
559
559
  */
560
560
 
561
+ let where;
562
+ let href;
561
563
 
562
- const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
563
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
564
+ if (what === "C1") {
565
+ where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
566
+ href = where.menu.url;
567
+ }
568
+ else if (what === "U1") {
569
+ const el = ninegrid.querySelector("nx-side-menu-item.active");
570
+ if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
564
571
 
565
- console.log(where);
572
+ href = el.getAttribute("href");
573
+ const title = el.getAttribute("title");
566
574
 
567
- const srcPath = this.#getSourcePath(where.menu.url);
568
- console.log(srcPath);
575
+ where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
576
+ }
577
+ else {
578
+ throw new Error("invalid command type.");
579
+ }
569
580
 
581
+ const srcPath = this.#getSourcePath(href);
582
+ console.log(where, srcPath);
570
583
 
571
- /**
572
- * {
573
- * "package": "ide.assi.be.tmpla",
574
- * "namespace": "ide.assi.be.tmpla.docmanager",
575
- * "baseClass": "DocManager",
576
- * "resultType": "ide.assi.core.utils.CamelCaseMap",
577
- * "mybatis": "tmpla/DocManagerMapper.xml",
578
- * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
579
- * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
580
- * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
581
- * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
582
- * }
583
- */
584
584
  const src = await api.post("/api/source/read", srcPath);
585
- console.log(srcPath, src);
585
+ console.log(src);
586
586
 
587
- /**
588
- const response = await fetch(srcPath.javascript);
589
- src.javascript = await response.text();*/
590
-
591
- //console.log(src);
592
- //const template = await fetch(path).then(res => res.text());
593
- /*
594
- arr.push({
595
- //menuId: elem.getAttribute("menu-id"),
596
- url: elem.getAttribute("href"),
597
- title: elem.getAttribute("title"),
598
- })*/
599
-
600
-
601
-
602
-
603
-
604
- //const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
605
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
606
587
  progressMessageInstance.updateProgress('prepare2', 'completed');
607
588
 
608
- //console.log(where);
609
-
610
- //const srcPath = this.#getSourcePath(where.menu.url);
611
-
612
-
613
589
 
614
590
  const columnInfo = await this.#getColumnInfo(where.table);
615
591
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.702.0",
4
+ "version": "0.703.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -558,58 +558,34 @@ console.log(el, href, title);
558
558
  console.log(srcPath);
559
559
  */
560
560
 
561
+ let where;
562
+ let href;
561
563
 
562
- const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
563
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
564
+ if (what === "C1") {
565
+ where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
566
+ href = where.menu.url;
567
+ }
568
+ else if (what === "U1") {
569
+ const el = ninegrid.querySelector("nx-side-menu-item.active");
570
+ if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
564
571
 
565
- console.log(where);
572
+ href = el.getAttribute("href");
573
+ const title = el.getAttribute("title");
566
574
 
567
- const srcPath = this.#getSourcePath(where.menu.url);
568
- console.log(srcPath);
575
+ where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
576
+ }
577
+ else {
578
+ throw new Error("invalid command type.");
579
+ }
569
580
 
581
+ const srcPath = this.#getSourcePath(href);
582
+ console.log(where, srcPath);
570
583
 
571
- /**
572
- * {
573
- * "package": "ide.assi.be.tmpla",
574
- * "namespace": "ide.assi.be.tmpla.docmanager",
575
- * "baseClass": "DocManager",
576
- * "resultType": "ide.assi.core.utils.CamelCaseMap",
577
- * "mybatis": "tmpla/DocManagerMapper.xml",
578
- * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
579
- * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
580
- * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
581
- * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
582
- * }
583
- */
584
584
  const src = await api.post("/api/source/read", srcPath);
585
- console.log(srcPath, src);
585
+ console.log(src);
586
586
 
587
- /**
588
- const response = await fetch(srcPath.javascript);
589
- src.javascript = await response.text();*/
590
-
591
- //console.log(src);
592
- //const template = await fetch(path).then(res => res.text());
593
- /*
594
- arr.push({
595
- //menuId: elem.getAttribute("menu-id"),
596
- url: elem.getAttribute("href"),
597
- title: elem.getAttribute("title"),
598
- })*/
599
-
600
-
601
-
602
-
603
-
604
- //const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
605
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
606
587
  progressMessageInstance.updateProgress('prepare2', 'completed');
607
588
 
608
- //console.log(where);
609
-
610
- //const srcPath = this.#getSourcePath(where.menu.url);
611
-
612
-
613
589
 
614
590
  const columnInfo = await this.#getColumnInfo(where.table);
615
591