ide-assi 0.701.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.
- package/dist/bundle.cjs.js +28 -52
- package/dist/bundle.esm.js +28 -52
- package/dist/components/ideAi.js +28 -52
- package/package.json +1 -1
- package/src/components/ideAi.js +28 -52
package/dist/bundle.cjs.js
CHANGED
|
@@ -202866,11 +202866,11 @@ class IdeAi
|
|
|
202866
202866
|
//const packageName = path.split("/").join(".").toLowerCase();
|
|
202867
202867
|
const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
202868
202868
|
|
|
202869
|
-
const javascript =
|
|
202869
|
+
const javascript = `${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}`;
|
|
202870
202870
|
const emptyIndex = this.#findFirstEmptyDetailWrapper();
|
|
202871
|
-
const javascriptTo = javascript + "-detail-" + emptyIndex;
|
|
202872
202871
|
const activeIndex = this.#findActiveDetailWrapperIndex();
|
|
202873
202872
|
const javascriptFrom = activeIndex ? javascript + "-detail-" + activeIndex : javascript;
|
|
202873
|
+
const javascriptTo = javascript + "-detail-" + emptyIndex;
|
|
202874
202874
|
const classFrom = activeIndex ? fileName + "Detail" + activeIndex : fileName;
|
|
202875
202875
|
const classTo = fileName + "Detail" + emptyIndex;
|
|
202876
202876
|
|
|
@@ -202882,9 +202882,9 @@ class IdeAi
|
|
|
202882
202882
|
baseClass: fileName,
|
|
202883
202883
|
resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
|
|
202884
202884
|
mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
202885
|
-
javascript: `${javascript}.jsx`,
|
|
202886
|
-
javascriptFrom: `${javascriptFrom}.jsx`,
|
|
202887
|
-
javascriptTo: `${javascriptTo}.jsx`,
|
|
202885
|
+
//javascript: `${javascript}.jsx`,
|
|
202886
|
+
//javascriptFrom: `${javascriptFrom}.jsx`,
|
|
202887
|
+
//javascriptTo: `${javascriptTo}.jsx`,
|
|
202888
202888
|
classFrom: classFrom,
|
|
202889
202889
|
classTo: classTo,
|
|
202890
202890
|
activeIndex: activeIndex,
|
|
@@ -202892,9 +202892,9 @@ class IdeAi
|
|
|
202892
202892
|
mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
202893
202893
|
controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
|
|
202894
202894
|
servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
|
|
202895
|
-
javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
202896
|
-
|
|
202897
|
-
|
|
202895
|
+
//javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
202896
|
+
javascriptFrom: `${this.#parent.settings.feProjectName}/src/views/${javascriptFrom}.jsx`,
|
|
202897
|
+
javascriptTo: `${this.#parent.settings.feProjectName}/src/views/${javascriptTo}.jsx`,
|
|
202898
202898
|
};
|
|
202899
202899
|
};
|
|
202900
202900
|
|
|
@@ -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
|
-
|
|
203089
|
-
|
|
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
|
-
|
|
203098
|
+
href = el.getAttribute("href");
|
|
203099
|
+
const title = el.getAttribute("title");
|
|
203092
203100
|
|
|
203093
|
-
|
|
203094
|
-
|
|
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(
|
|
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
|
|
|
@@ -203195,7 +203171,7 @@ console.log(el, href, title);
|
|
|
203195
203171
|
jsSrc = await this.#generateTmplFile(this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all.")), "react.jsx", {
|
|
203196
203172
|
userPrompt: userPrompt,
|
|
203197
203173
|
mybatis: srcPath.mybatis,
|
|
203198
|
-
originSrc: src.
|
|
203174
|
+
originSrc: src.javascriptFrom,
|
|
203199
203175
|
menuUrl: where.menu.url,
|
|
203200
203176
|
menuName: where.menu.name,
|
|
203201
203177
|
baseClass: srcPath.baseClass,
|
package/dist/bundle.esm.js
CHANGED
|
@@ -202862,11 +202862,11 @@ class IdeAi
|
|
|
202862
202862
|
//const packageName = path.split("/").join(".").toLowerCase();
|
|
202863
202863
|
const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
202864
202864
|
|
|
202865
|
-
const javascript =
|
|
202865
|
+
const javascript = `${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}`;
|
|
202866
202866
|
const emptyIndex = this.#findFirstEmptyDetailWrapper();
|
|
202867
|
-
const javascriptTo = javascript + "-detail-" + emptyIndex;
|
|
202868
202867
|
const activeIndex = this.#findActiveDetailWrapperIndex();
|
|
202869
202868
|
const javascriptFrom = activeIndex ? javascript + "-detail-" + activeIndex : javascript;
|
|
202869
|
+
const javascriptTo = javascript + "-detail-" + emptyIndex;
|
|
202870
202870
|
const classFrom = activeIndex ? fileName + "Detail" + activeIndex : fileName;
|
|
202871
202871
|
const classTo = fileName + "Detail" + emptyIndex;
|
|
202872
202872
|
|
|
@@ -202878,9 +202878,9 @@ class IdeAi
|
|
|
202878
202878
|
baseClass: fileName,
|
|
202879
202879
|
resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
|
|
202880
202880
|
mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
202881
|
-
javascript: `${javascript}.jsx`,
|
|
202882
|
-
javascriptFrom: `${javascriptFrom}.jsx`,
|
|
202883
|
-
javascriptTo: `${javascriptTo}.jsx`,
|
|
202881
|
+
//javascript: `${javascript}.jsx`,
|
|
202882
|
+
//javascriptFrom: `${javascriptFrom}.jsx`,
|
|
202883
|
+
//javascriptTo: `${javascriptTo}.jsx`,
|
|
202884
202884
|
classFrom: classFrom,
|
|
202885
202885
|
classTo: classTo,
|
|
202886
202886
|
activeIndex: activeIndex,
|
|
@@ -202888,9 +202888,9 @@ class IdeAi
|
|
|
202888
202888
|
mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
202889
202889
|
controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
|
|
202890
202890
|
servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
|
|
202891
|
-
javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
202892
|
-
|
|
202893
|
-
|
|
202891
|
+
//javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
202892
|
+
javascriptFrom: `${this.#parent.settings.feProjectName}/src/views/${javascriptFrom}.jsx`,
|
|
202893
|
+
javascriptTo: `${this.#parent.settings.feProjectName}/src/views/${javascriptTo}.jsx`,
|
|
202894
202894
|
};
|
|
202895
202895
|
};
|
|
202896
202896
|
|
|
@@ -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
|
-
|
|
203085
|
-
|
|
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
|
-
|
|
203094
|
+
href = el.getAttribute("href");
|
|
203095
|
+
const title = el.getAttribute("title");
|
|
203088
203096
|
|
|
203089
|
-
|
|
203090
|
-
|
|
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(
|
|
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
|
|
|
@@ -203191,7 +203167,7 @@ console.log(el, href, title);
|
|
|
203191
203167
|
jsSrc = await this.#generateTmplFile(this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all.")), "react.jsx", {
|
|
203192
203168
|
userPrompt: userPrompt,
|
|
203193
203169
|
mybatis: srcPath.mybatis,
|
|
203194
|
-
originSrc: src.
|
|
203170
|
+
originSrc: src.javascriptFrom,
|
|
203195
203171
|
menuUrl: where.menu.url,
|
|
203196
203172
|
menuName: where.menu.name,
|
|
203197
203173
|
baseClass: srcPath.baseClass,
|
package/dist/components/ideAi.js
CHANGED
|
@@ -340,11 +340,11 @@ export class IdeAi
|
|
|
340
340
|
//const packageName = path.split("/").join(".").toLowerCase();
|
|
341
341
|
const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
342
342
|
|
|
343
|
-
const javascript =
|
|
343
|
+
const javascript = `${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}`;
|
|
344
344
|
const emptyIndex = this.#findFirstEmptyDetailWrapper();
|
|
345
|
-
const javascriptTo = javascript + "-detail-" + emptyIndex;
|
|
346
345
|
const activeIndex = this.#findActiveDetailWrapperIndex();
|
|
347
346
|
const javascriptFrom = activeIndex ? javascript + "-detail-" + activeIndex : javascript;
|
|
347
|
+
const javascriptTo = javascript + "-detail-" + emptyIndex;
|
|
348
348
|
const classFrom = activeIndex ? fileName + "Detail" + activeIndex : fileName;
|
|
349
349
|
const classTo = fileName + "Detail" + emptyIndex;
|
|
350
350
|
|
|
@@ -356,9 +356,9 @@ export class IdeAi
|
|
|
356
356
|
baseClass: fileName,
|
|
357
357
|
resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
|
|
358
358
|
mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
359
|
-
javascript: `${javascript}.jsx`,
|
|
360
|
-
javascriptFrom: `${javascriptFrom}.jsx`,
|
|
361
|
-
javascriptTo: `${javascriptTo}.jsx`,
|
|
359
|
+
//javascript: `${javascript}.jsx`,
|
|
360
|
+
//javascriptFrom: `${javascriptFrom}.jsx`,
|
|
361
|
+
//javascriptTo: `${javascriptTo}.jsx`,
|
|
362
362
|
classFrom: classFrom,
|
|
363
363
|
classTo: classTo,
|
|
364
364
|
activeIndex: activeIndex,
|
|
@@ -366,9 +366,9 @@ export class IdeAi
|
|
|
366
366
|
mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
367
367
|
controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
|
|
368
368
|
servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
|
|
369
|
-
javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
370
|
-
|
|
371
|
-
|
|
369
|
+
//javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
370
|
+
javascriptFrom: `${this.#parent.settings.feProjectName}/src/views/${javascriptFrom}.jsx`,
|
|
371
|
+
javascriptTo: `${this.#parent.settings.feProjectName}/src/views/${javascriptTo}.jsx`,
|
|
372
372
|
};
|
|
373
373
|
};
|
|
374
374
|
|
|
@@ -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
|
-
|
|
563
|
-
|
|
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
|
-
|
|
572
|
+
href = el.getAttribute("href");
|
|
573
|
+
const title = el.getAttribute("title");
|
|
566
574
|
|
|
567
|
-
|
|
568
|
-
|
|
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(
|
|
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
|
|
|
@@ -669,7 +645,7 @@ console.log(el, href, title);
|
|
|
669
645
|
jsSrc = await this.#generateTmplFile(this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all.")), "react.jsx", {
|
|
670
646
|
userPrompt: userPrompt,
|
|
671
647
|
mybatis: srcPath.mybatis,
|
|
672
|
-
originSrc: src.
|
|
648
|
+
originSrc: src.javascriptFrom,
|
|
673
649
|
menuUrl: where.menu.url,
|
|
674
650
|
menuName: where.menu.name,
|
|
675
651
|
baseClass: srcPath.baseClass,
|
package/package.json
CHANGED
package/src/components/ideAi.js
CHANGED
|
@@ -340,11 +340,11 @@ export class IdeAi
|
|
|
340
340
|
//const packageName = path.split("/").join(".").toLowerCase();
|
|
341
341
|
const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
342
342
|
|
|
343
|
-
const javascript =
|
|
343
|
+
const javascript = `${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}`;
|
|
344
344
|
const emptyIndex = this.#findFirstEmptyDetailWrapper();
|
|
345
|
-
const javascriptTo = javascript + "-detail-" + emptyIndex;
|
|
346
345
|
const activeIndex = this.#findActiveDetailWrapperIndex();
|
|
347
346
|
const javascriptFrom = activeIndex ? javascript + "-detail-" + activeIndex : javascript;
|
|
347
|
+
const javascriptTo = javascript + "-detail-" + emptyIndex;
|
|
348
348
|
const classFrom = activeIndex ? fileName + "Detail" + activeIndex : fileName;
|
|
349
349
|
const classTo = fileName + "Detail" + emptyIndex;
|
|
350
350
|
|
|
@@ -356,9 +356,9 @@ export class IdeAi
|
|
|
356
356
|
baseClass: fileName,
|
|
357
357
|
resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
|
|
358
358
|
mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
359
|
-
javascript: `${javascript}.jsx`,
|
|
360
|
-
javascriptFrom: `${javascriptFrom}.jsx`,
|
|
361
|
-
javascriptTo: `${javascriptTo}.jsx`,
|
|
359
|
+
//javascript: `${javascript}.jsx`,
|
|
360
|
+
//javascriptFrom: `${javascriptFrom}.jsx`,
|
|
361
|
+
//javascriptTo: `${javascriptTo}.jsx`,
|
|
362
362
|
classFrom: classFrom,
|
|
363
363
|
classTo: classTo,
|
|
364
364
|
activeIndex: activeIndex,
|
|
@@ -366,9 +366,9 @@ export class IdeAi
|
|
|
366
366
|
mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
367
367
|
controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
|
|
368
368
|
servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
|
|
369
|
-
javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
370
|
-
|
|
371
|
-
|
|
369
|
+
//javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
370
|
+
javascriptFrom: `${this.#parent.settings.feProjectName}/src/views/${javascriptFrom}.jsx`,
|
|
371
|
+
javascriptTo: `${this.#parent.settings.feProjectName}/src/views/${javascriptTo}.jsx`,
|
|
372
372
|
};
|
|
373
373
|
};
|
|
374
374
|
|
|
@@ -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
|
-
|
|
563
|
-
|
|
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
|
-
|
|
572
|
+
href = el.getAttribute("href");
|
|
573
|
+
const title = el.getAttribute("title");
|
|
566
574
|
|
|
567
|
-
|
|
568
|
-
|
|
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(
|
|
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
|
|
|
@@ -669,7 +645,7 @@ console.log(el, href, title);
|
|
|
669
645
|
jsSrc = await this.#generateTmplFile(this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all.")), "react.jsx", {
|
|
670
646
|
userPrompt: userPrompt,
|
|
671
647
|
mybatis: srcPath.mybatis,
|
|
672
|
-
originSrc: src.
|
|
648
|
+
originSrc: src.javascriptFrom,
|
|
673
649
|
menuUrl: where.menu.url,
|
|
674
650
|
menuName: where.menu.name,
|
|
675
651
|
baseClass: srcPath.baseClass,
|