ide-assi 0.598.0 → 0.600.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 +128 -7
- package/dist/bundle.esm.js +128 -7
- package/dist/components/ideAi.js +130 -7
- package/package.json +1 -1
- package/src/components/ideAi.js +130 -7
package/dist/bundle.cjs.js
CHANGED
|
@@ -202095,7 +202095,7 @@ class IdeAi
|
|
|
202095
202095
|
|
|
202096
202096
|
console.log(menuList, tableDefinitions, JSON.stringify(menuList), JSON.stringify(tableDefinitions));
|
|
202097
202097
|
|
|
202098
|
-
const o = await this.#invoke('/prompts/meta/
|
|
202098
|
+
const o = await this.#invoke('/prompts/meta/2.where.txt', {
|
|
202099
202099
|
"userPrompt": userPrompt,
|
|
202100
202100
|
"menuList": JSON.stringify(menuList),
|
|
202101
202101
|
"tableDefinitions": JSON.stringify(tableDefinitions),
|
|
@@ -202178,7 +202178,7 @@ class IdeAi
|
|
|
202178
202178
|
return src;
|
|
202179
202179
|
};
|
|
202180
202180
|
|
|
202181
|
-
#
|
|
202181
|
+
#getSourcePath_BAK = (menuUrl) => {
|
|
202182
202182
|
const path = menuUrl.replace(/^\/+/, '');
|
|
202183
202183
|
|
|
202184
202184
|
const raw = path.split("/").join(".").toLowerCase();
|
|
@@ -202214,6 +202214,83 @@ class IdeAi
|
|
|
202214
202214
|
};*/
|
|
202215
202215
|
};
|
|
202216
202216
|
|
|
202217
|
+
#findFirstEmptyDetailWrapper = () => {
|
|
202218
|
+
const allWrappers = document.querySelectorAll('div[class^="detail-wrapper-"]');
|
|
202219
|
+
|
|
202220
|
+
for (const el of allWrappers) {
|
|
202221
|
+
if (el.innerHTML.trim() === '') {
|
|
202222
|
+
// 클래스명 전체를 반환하거나, 특정 패턴을 찾아 반환
|
|
202223
|
+
const className = el.className;
|
|
202224
|
+
const match = className.match(/detail-wrapper-([^ ]+)/); // 숫자뿐만 아니라 다른 문자도 포함
|
|
202225
|
+
|
|
202226
|
+
if (match && match[1]) {
|
|
202227
|
+
return match[1];
|
|
202228
|
+
}
|
|
202229
|
+
}
|
|
202230
|
+
}
|
|
202231
|
+
|
|
202232
|
+
return null; // 비어있는 요소가 없을 경우 null 반환
|
|
202233
|
+
};
|
|
202234
|
+
|
|
202235
|
+
#findActiveDetailWrapperIndex = () => {
|
|
202236
|
+
const allWrappers = document.querySelectorAll('div[class^="detail-wrapper-"]');
|
|
202237
|
+
|
|
202238
|
+
for (let i = 0; i < allWrappers.length; i++) {
|
|
202239
|
+
const el = allWrappers[i];
|
|
202240
|
+
if (el.classList.contains('active')) {
|
|
202241
|
+
const className = el.className;
|
|
202242
|
+
const match = className.match(/detail-wrapper-([^ ]+)/);
|
|
202243
|
+
|
|
202244
|
+
if (match && match[1]) {
|
|
202245
|
+
return match[1];
|
|
202246
|
+
}
|
|
202247
|
+
}
|
|
202248
|
+
}
|
|
202249
|
+
|
|
202250
|
+
return null; // 'active' 클래스를 가진 요소가 없을 경우 null 반환
|
|
202251
|
+
};
|
|
202252
|
+
|
|
202253
|
+
|
|
202254
|
+
|
|
202255
|
+
#getSourcePath = (menuUrl) => {
|
|
202256
|
+
const path = menuUrl.replace(/^\/+/, '');
|
|
202257
|
+
|
|
202258
|
+
const raw = path.split("/").join(".").toLowerCase();
|
|
202259
|
+
const cleaned = raw.replace(/[^a-z0-9.]/g, "");
|
|
202260
|
+
const namespace = `${this.#parent.config.basePackage}.${cleaned}`;
|
|
202261
|
+
|
|
202262
|
+
const packageName = namespace.split(".").slice(0, -1).join(".");
|
|
202263
|
+
|
|
202264
|
+
//const packageName = `${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
|
|
202265
|
+
//const packageName = path.split("/").join(".").toLowerCase();
|
|
202266
|
+
const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
202267
|
+
|
|
202268
|
+
const javascript = `/src/views/${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}`;
|
|
202269
|
+
const index = this.#findFirstEmptyDetailWrapper();
|
|
202270
|
+
const javascriptTo = javascript + "-" + index;
|
|
202271
|
+
const activeIndex = this.#findActiveDetailWrapperIndex();
|
|
202272
|
+
const javascriptFrom = activeIndex ? javascript + "-" + activeIndex : javascript;
|
|
202273
|
+
|
|
202274
|
+
return {
|
|
202275
|
+
package: packageName,
|
|
202276
|
+
namespace: namespace,
|
|
202277
|
+
baseClass: fileName,
|
|
202278
|
+
resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
|
|
202279
|
+
mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
202280
|
+
javascript: `${javascript}.jsx`,
|
|
202281
|
+
javascriptFrom: `${javascriptFrom}.jsx`,
|
|
202282
|
+
javascriptTo: `${javascriptTo}.jsx`,
|
|
202283
|
+
mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
202284
|
+
controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
|
|
202285
|
+
servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
|
|
202286
|
+
javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
202287
|
+
javascriptFromPullPath: `${this.#parent.settings.feProjectName}${javascriptFrom}.jsx`,
|
|
202288
|
+
javascriptToPullPath: `${this.#parent.settings.feProjectName}${javascriptTo}.jsx`,
|
|
202289
|
+
};
|
|
202290
|
+
};
|
|
202291
|
+
|
|
202292
|
+
|
|
202293
|
+
|
|
202217
202294
|
#createSource = async (userPrompt, apply) => {
|
|
202218
202295
|
const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
|
|
202219
202296
|
this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
|
|
@@ -202545,7 +202622,36 @@ console.log(el, href, title);
|
|
|
202545
202622
|
}
|
|
202546
202623
|
|
|
202547
202624
|
let jsSrc;
|
|
202625
|
+
let jsSrc2;
|
|
202548
202626
|
if (apply.javascript) {
|
|
202627
|
+
jsSrc2 = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Link.txt", "react.jsx", {
|
|
202628
|
+
userPrompt: userPrompt,
|
|
202629
|
+
mybatis: srcPath.mybatis,
|
|
202630
|
+
originSrc: src.javascriptFrom,
|
|
202631
|
+
menuUrl: where.menu.url,
|
|
202632
|
+
menuName: where.menu.name,
|
|
202633
|
+
baseClass: srcPath.baseClass,
|
|
202634
|
+
mybatisXmlSource: mybatisXmlSource,
|
|
202635
|
+
controllerSource: controllerSrc,
|
|
202636
|
+
tableDefinitions: JSON.stringify(columnInfo),
|
|
202637
|
+
});
|
|
202638
|
+
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
202639
|
+
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
202640
|
+
|
|
202641
|
+
jsSrc = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Detail.txt", "react2.jsx", {
|
|
202642
|
+
userPrompt: userPrompt,
|
|
202643
|
+
mybatis: srcPath.mybatis,
|
|
202644
|
+
originSrc: src.javascriptTo,
|
|
202645
|
+
menuUrl: where.menu.url,
|
|
202646
|
+
menuName: where.menu.name,
|
|
202647
|
+
baseClass: srcPath.baseClass,
|
|
202648
|
+
mybatisXmlSource: mybatisXmlSource,
|
|
202649
|
+
controllerSource: controllerSrc,
|
|
202650
|
+
tableDefinitions: JSON.stringify(columnInfo),
|
|
202651
|
+
});
|
|
202652
|
+
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
202653
|
+
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
202654
|
+
/**
|
|
202549
202655
|
jsSrc = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Detail.txt", "react2.jsx", {
|
|
202550
202656
|
userPrompt: userPrompt,
|
|
202551
202657
|
mybatis: srcPath.mybatis,
|
|
@@ -202559,9 +202665,10 @@ console.log(el, href, title);
|
|
|
202559
202665
|
});
|
|
202560
202666
|
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
202561
202667
|
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
202668
|
+
*/
|
|
202562
202669
|
}
|
|
202563
202670
|
else {
|
|
202564
|
-
jsSrc = src.
|
|
202671
|
+
jsSrc = src.javascriptTo;
|
|
202565
202672
|
}
|
|
202566
202673
|
|
|
202567
202674
|
//await this.#generateRealFile(srcPath, apply);
|
|
@@ -202582,11 +202689,17 @@ console.log(el, href, title);
|
|
|
202582
202689
|
src: controllerSrc,
|
|
202583
202690
|
},
|
|
202584
202691
|
javascript: {
|
|
202585
|
-
path: srcPath.
|
|
202692
|
+
path: srcPath.javascriptToPullPath,
|
|
202586
202693
|
src: jsSrc,
|
|
202587
|
-
}
|
|
202694
|
+
},
|
|
202695
|
+
javascript2: {
|
|
202696
|
+
path: srcPath.javascriptFromPullPath,
|
|
202697
|
+
src: jsSrc2,
|
|
202698
|
+
},
|
|
202588
202699
|
};
|
|
202589
202700
|
|
|
202701
|
+
console.log(apply);
|
|
202702
|
+
|
|
202590
202703
|
for (const key in apply) {
|
|
202591
202704
|
if (apply[key]) {
|
|
202592
202705
|
returnSrc.push({
|
|
@@ -202659,6 +202772,9 @@ console.log(el, href, title);
|
|
|
202659
202772
|
progressMessageInstance.updateProgress('prepare1', 'completed');
|
|
202660
202773
|
|
|
202661
202774
|
|
|
202775
|
+
|
|
202776
|
+
|
|
202777
|
+
|
|
202662
202778
|
/**
|
|
202663
202779
|
//active가 상세면
|
|
202664
202780
|
if (!apply.javascript) {
|
|
@@ -202680,12 +202796,17 @@ console.log(el, href, title);
|
|
|
202680
202796
|
*/
|
|
202681
202797
|
|
|
202682
202798
|
|
|
202683
|
-
if (what === "
|
|
202799
|
+
if (what === "C1") {
|
|
202684
202800
|
if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) ;
|
|
202685
202801
|
//await this.#createSource(userPrompt, apply);
|
|
202686
202802
|
return await this.#modifySource(userPrompt, apply, progressMessageInstance);
|
|
202687
202803
|
}
|
|
202688
|
-
else if (what === "
|
|
202804
|
+
else if (what === "C2") {
|
|
202805
|
+
if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) ;
|
|
202806
|
+
//await this.#createSource(userPrompt, apply);
|
|
202807
|
+
return await this.#generateDetailSource(userPrompt, apply, progressMessageInstance);
|
|
202808
|
+
}
|
|
202809
|
+
else if (what === "U1") {
|
|
202689
202810
|
return await this.#modifySource(userPrompt, apply, progressMessageInstance);
|
|
202690
202811
|
}
|
|
202691
202812
|
}
|
package/dist/bundle.esm.js
CHANGED
|
@@ -202091,7 +202091,7 @@ class IdeAi
|
|
|
202091
202091
|
|
|
202092
202092
|
console.log(menuList, tableDefinitions, JSON.stringify(menuList), JSON.stringify(tableDefinitions));
|
|
202093
202093
|
|
|
202094
|
-
const o = await this.#invoke('/prompts/meta/
|
|
202094
|
+
const o = await this.#invoke('/prompts/meta/2.where.txt', {
|
|
202095
202095
|
"userPrompt": userPrompt,
|
|
202096
202096
|
"menuList": JSON.stringify(menuList),
|
|
202097
202097
|
"tableDefinitions": JSON.stringify(tableDefinitions),
|
|
@@ -202174,7 +202174,7 @@ class IdeAi
|
|
|
202174
202174
|
return src;
|
|
202175
202175
|
};
|
|
202176
202176
|
|
|
202177
|
-
#
|
|
202177
|
+
#getSourcePath_BAK = (menuUrl) => {
|
|
202178
202178
|
const path = menuUrl.replace(/^\/+/, '');
|
|
202179
202179
|
|
|
202180
202180
|
const raw = path.split("/").join(".").toLowerCase();
|
|
@@ -202210,6 +202210,83 @@ class IdeAi
|
|
|
202210
202210
|
};*/
|
|
202211
202211
|
};
|
|
202212
202212
|
|
|
202213
|
+
#findFirstEmptyDetailWrapper = () => {
|
|
202214
|
+
const allWrappers = document.querySelectorAll('div[class^="detail-wrapper-"]');
|
|
202215
|
+
|
|
202216
|
+
for (const el of allWrappers) {
|
|
202217
|
+
if (el.innerHTML.trim() === '') {
|
|
202218
|
+
// 클래스명 전체를 반환하거나, 특정 패턴을 찾아 반환
|
|
202219
|
+
const className = el.className;
|
|
202220
|
+
const match = className.match(/detail-wrapper-([^ ]+)/); // 숫자뿐만 아니라 다른 문자도 포함
|
|
202221
|
+
|
|
202222
|
+
if (match && match[1]) {
|
|
202223
|
+
return match[1];
|
|
202224
|
+
}
|
|
202225
|
+
}
|
|
202226
|
+
}
|
|
202227
|
+
|
|
202228
|
+
return null; // 비어있는 요소가 없을 경우 null 반환
|
|
202229
|
+
};
|
|
202230
|
+
|
|
202231
|
+
#findActiveDetailWrapperIndex = () => {
|
|
202232
|
+
const allWrappers = document.querySelectorAll('div[class^="detail-wrapper-"]');
|
|
202233
|
+
|
|
202234
|
+
for (let i = 0; i < allWrappers.length; i++) {
|
|
202235
|
+
const el = allWrappers[i];
|
|
202236
|
+
if (el.classList.contains('active')) {
|
|
202237
|
+
const className = el.className;
|
|
202238
|
+
const match = className.match(/detail-wrapper-([^ ]+)/);
|
|
202239
|
+
|
|
202240
|
+
if (match && match[1]) {
|
|
202241
|
+
return match[1];
|
|
202242
|
+
}
|
|
202243
|
+
}
|
|
202244
|
+
}
|
|
202245
|
+
|
|
202246
|
+
return null; // 'active' 클래스를 가진 요소가 없을 경우 null 반환
|
|
202247
|
+
};
|
|
202248
|
+
|
|
202249
|
+
|
|
202250
|
+
|
|
202251
|
+
#getSourcePath = (menuUrl) => {
|
|
202252
|
+
const path = menuUrl.replace(/^\/+/, '');
|
|
202253
|
+
|
|
202254
|
+
const raw = path.split("/").join(".").toLowerCase();
|
|
202255
|
+
const cleaned = raw.replace(/[^a-z0-9.]/g, "");
|
|
202256
|
+
const namespace = `${this.#parent.config.basePackage}.${cleaned}`;
|
|
202257
|
+
|
|
202258
|
+
const packageName = namespace.split(".").slice(0, -1).join(".");
|
|
202259
|
+
|
|
202260
|
+
//const packageName = `${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
|
|
202261
|
+
//const packageName = path.split("/").join(".").toLowerCase();
|
|
202262
|
+
const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
202263
|
+
|
|
202264
|
+
const javascript = `/src/views/${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}`;
|
|
202265
|
+
const index = this.#findFirstEmptyDetailWrapper();
|
|
202266
|
+
const javascriptTo = javascript + "-" + index;
|
|
202267
|
+
const activeIndex = this.#findActiveDetailWrapperIndex();
|
|
202268
|
+
const javascriptFrom = activeIndex ? javascript + "-" + activeIndex : javascript;
|
|
202269
|
+
|
|
202270
|
+
return {
|
|
202271
|
+
package: packageName,
|
|
202272
|
+
namespace: namespace,
|
|
202273
|
+
baseClass: fileName,
|
|
202274
|
+
resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
|
|
202275
|
+
mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
202276
|
+
javascript: `${javascript}.jsx`,
|
|
202277
|
+
javascriptFrom: `${javascriptFrom}.jsx`,
|
|
202278
|
+
javascriptTo: `${javascriptTo}.jsx`,
|
|
202279
|
+
mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
202280
|
+
controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
|
|
202281
|
+
servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
|
|
202282
|
+
javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
202283
|
+
javascriptFromPullPath: `${this.#parent.settings.feProjectName}${javascriptFrom}.jsx`,
|
|
202284
|
+
javascriptToPullPath: `${this.#parent.settings.feProjectName}${javascriptTo}.jsx`,
|
|
202285
|
+
};
|
|
202286
|
+
};
|
|
202287
|
+
|
|
202288
|
+
|
|
202289
|
+
|
|
202213
202290
|
#createSource = async (userPrompt, apply) => {
|
|
202214
202291
|
const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
|
|
202215
202292
|
this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
|
|
@@ -202541,7 +202618,36 @@ console.log(el, href, title);
|
|
|
202541
202618
|
}
|
|
202542
202619
|
|
|
202543
202620
|
let jsSrc;
|
|
202621
|
+
let jsSrc2;
|
|
202544
202622
|
if (apply.javascript) {
|
|
202623
|
+
jsSrc2 = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Link.txt", "react.jsx", {
|
|
202624
|
+
userPrompt: userPrompt,
|
|
202625
|
+
mybatis: srcPath.mybatis,
|
|
202626
|
+
originSrc: src.javascriptFrom,
|
|
202627
|
+
menuUrl: where.menu.url,
|
|
202628
|
+
menuName: where.menu.name,
|
|
202629
|
+
baseClass: srcPath.baseClass,
|
|
202630
|
+
mybatisXmlSource: mybatisXmlSource,
|
|
202631
|
+
controllerSource: controllerSrc,
|
|
202632
|
+
tableDefinitions: JSON.stringify(columnInfo),
|
|
202633
|
+
});
|
|
202634
|
+
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
202635
|
+
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
202636
|
+
|
|
202637
|
+
jsSrc = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Detail.txt", "react2.jsx", {
|
|
202638
|
+
userPrompt: userPrompt,
|
|
202639
|
+
mybatis: srcPath.mybatis,
|
|
202640
|
+
originSrc: src.javascriptTo,
|
|
202641
|
+
menuUrl: where.menu.url,
|
|
202642
|
+
menuName: where.menu.name,
|
|
202643
|
+
baseClass: srcPath.baseClass,
|
|
202644
|
+
mybatisXmlSource: mybatisXmlSource,
|
|
202645
|
+
controllerSource: controllerSrc,
|
|
202646
|
+
tableDefinitions: JSON.stringify(columnInfo),
|
|
202647
|
+
});
|
|
202648
|
+
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
202649
|
+
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
202650
|
+
/**
|
|
202545
202651
|
jsSrc = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Detail.txt", "react2.jsx", {
|
|
202546
202652
|
userPrompt: userPrompt,
|
|
202547
202653
|
mybatis: srcPath.mybatis,
|
|
@@ -202555,9 +202661,10 @@ console.log(el, href, title);
|
|
|
202555
202661
|
});
|
|
202556
202662
|
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
202557
202663
|
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
202664
|
+
*/
|
|
202558
202665
|
}
|
|
202559
202666
|
else {
|
|
202560
|
-
jsSrc = src.
|
|
202667
|
+
jsSrc = src.javascriptTo;
|
|
202561
202668
|
}
|
|
202562
202669
|
|
|
202563
202670
|
//await this.#generateRealFile(srcPath, apply);
|
|
@@ -202578,11 +202685,17 @@ console.log(el, href, title);
|
|
|
202578
202685
|
src: controllerSrc,
|
|
202579
202686
|
},
|
|
202580
202687
|
javascript: {
|
|
202581
|
-
path: srcPath.
|
|
202688
|
+
path: srcPath.javascriptToPullPath,
|
|
202582
202689
|
src: jsSrc,
|
|
202583
|
-
}
|
|
202690
|
+
},
|
|
202691
|
+
javascript2: {
|
|
202692
|
+
path: srcPath.javascriptFromPullPath,
|
|
202693
|
+
src: jsSrc2,
|
|
202694
|
+
},
|
|
202584
202695
|
};
|
|
202585
202696
|
|
|
202697
|
+
console.log(apply);
|
|
202698
|
+
|
|
202586
202699
|
for (const key in apply) {
|
|
202587
202700
|
if (apply[key]) {
|
|
202588
202701
|
returnSrc.push({
|
|
@@ -202655,6 +202768,9 @@ console.log(el, href, title);
|
|
|
202655
202768
|
progressMessageInstance.updateProgress('prepare1', 'completed');
|
|
202656
202769
|
|
|
202657
202770
|
|
|
202771
|
+
|
|
202772
|
+
|
|
202773
|
+
|
|
202658
202774
|
/**
|
|
202659
202775
|
//active가 상세면
|
|
202660
202776
|
if (!apply.javascript) {
|
|
@@ -202676,12 +202792,17 @@ console.log(el, href, title);
|
|
|
202676
202792
|
*/
|
|
202677
202793
|
|
|
202678
202794
|
|
|
202679
|
-
if (what === "
|
|
202795
|
+
if (what === "C1") {
|
|
202680
202796
|
if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) ;
|
|
202681
202797
|
//await this.#createSource(userPrompt, apply);
|
|
202682
202798
|
return await this.#modifySource(userPrompt, apply, progressMessageInstance);
|
|
202683
202799
|
}
|
|
202684
|
-
else if (what === "
|
|
202800
|
+
else if (what === "C2") {
|
|
202801
|
+
if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) ;
|
|
202802
|
+
//await this.#createSource(userPrompt, apply);
|
|
202803
|
+
return await this.#generateDetailSource(userPrompt, apply, progressMessageInstance);
|
|
202804
|
+
}
|
|
202805
|
+
else if (what === "U1") {
|
|
202685
202806
|
return await this.#modifySource(userPrompt, apply, progressMessageInstance);
|
|
202686
202807
|
}
|
|
202687
202808
|
}
|
package/dist/components/ideAi.js
CHANGED
|
@@ -225,7 +225,7 @@ export class IdeAi
|
|
|
225
225
|
|
|
226
226
|
console.log(menuList, tableDefinitions, JSON.stringify(menuList), JSON.stringify(tableDefinitions));
|
|
227
227
|
|
|
228
|
-
const o = await this.#invoke('/prompts/meta/
|
|
228
|
+
const o = await this.#invoke('/prompts/meta/2.where.txt', {
|
|
229
229
|
"userPrompt": userPrompt,
|
|
230
230
|
"menuList": JSON.stringify(menuList),
|
|
231
231
|
"tableDefinitions": JSON.stringify(tableDefinitions),
|
|
@@ -308,7 +308,7 @@ export class IdeAi
|
|
|
308
308
|
return src;
|
|
309
309
|
};
|
|
310
310
|
|
|
311
|
-
#
|
|
311
|
+
#getSourcePath_BAK = (menuUrl) => {
|
|
312
312
|
const path = menuUrl.replace(/^\/+/, '');
|
|
313
313
|
|
|
314
314
|
const raw = path.split("/").join(".").toLowerCase();
|
|
@@ -344,6 +344,83 @@ export class IdeAi
|
|
|
344
344
|
};*/
|
|
345
345
|
};
|
|
346
346
|
|
|
347
|
+
#findFirstEmptyDetailWrapper = () => {
|
|
348
|
+
const allWrappers = document.querySelectorAll('div[class^="detail-wrapper-"]');
|
|
349
|
+
|
|
350
|
+
for (const el of allWrappers) {
|
|
351
|
+
if (el.innerHTML.trim() === '') {
|
|
352
|
+
// 클래스명 전체를 반환하거나, 특정 패턴을 찾아 반환
|
|
353
|
+
const className = el.className;
|
|
354
|
+
const match = className.match(/detail-wrapper-([^ ]+)/); // 숫자뿐만 아니라 다른 문자도 포함
|
|
355
|
+
|
|
356
|
+
if (match && match[1]) {
|
|
357
|
+
return match[1];
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
return null; // 비어있는 요소가 없을 경우 null 반환
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
#findActiveDetailWrapperIndex = () => {
|
|
366
|
+
const allWrappers = document.querySelectorAll('div[class^="detail-wrapper-"]');
|
|
367
|
+
|
|
368
|
+
for (let i = 0; i < allWrappers.length; i++) {
|
|
369
|
+
const el = allWrappers[i];
|
|
370
|
+
if (el.classList.contains('active')) {
|
|
371
|
+
const className = el.className;
|
|
372
|
+
const match = className.match(/detail-wrapper-([^ ]+)/);
|
|
373
|
+
|
|
374
|
+
if (match && match[1]) {
|
|
375
|
+
return match[1];
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return null; // 'active' 클래스를 가진 요소가 없을 경우 null 반환
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
#getSourcePath = (menuUrl) => {
|
|
386
|
+
const path = menuUrl.replace(/^\/+/, '');
|
|
387
|
+
|
|
388
|
+
const raw = path.split("/").join(".").toLowerCase();
|
|
389
|
+
const cleaned = raw.replace(/[^a-z0-9.]/g, "");
|
|
390
|
+
const namespace = `${this.#parent.config.basePackage}.${cleaned}`;
|
|
391
|
+
|
|
392
|
+
const packageName = namespace.split(".").slice(0, -1).join(".");
|
|
393
|
+
|
|
394
|
+
//const packageName = `${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
|
|
395
|
+
//const packageName = path.split("/").join(".").toLowerCase();
|
|
396
|
+
const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
397
|
+
|
|
398
|
+
const javascript = `/src/views/${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}`;
|
|
399
|
+
const index = this.#findFirstEmptyDetailWrapper();
|
|
400
|
+
const javascriptTo = javascript + "-" + index;
|
|
401
|
+
const activeIndex = this.#findActiveDetailWrapperIndex();
|
|
402
|
+
const javascriptFrom = activeIndex ? javascript + "-" + activeIndex : javascript;
|
|
403
|
+
|
|
404
|
+
return {
|
|
405
|
+
package: packageName,
|
|
406
|
+
namespace: namespace,
|
|
407
|
+
baseClass: fileName,
|
|
408
|
+
resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
|
|
409
|
+
mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
410
|
+
javascript: `${javascript}.jsx`,
|
|
411
|
+
javascriptFrom: `${javascriptFrom}.jsx`,
|
|
412
|
+
javascriptTo: `${javascriptTo}.jsx`,
|
|
413
|
+
mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
414
|
+
controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
|
|
415
|
+
servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
|
|
416
|
+
javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
417
|
+
javascriptFromPullPath: `${this.#parent.settings.feProjectName}${javascriptFrom}.jsx`,
|
|
418
|
+
javascriptToPullPath: `${this.#parent.settings.feProjectName}${javascriptTo}.jsx`,
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
347
424
|
#createSource = async (userPrompt, apply) => {
|
|
348
425
|
const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
|
|
349
426
|
this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
|
|
@@ -675,7 +752,36 @@ console.log(el, href, title);
|
|
|
675
752
|
}
|
|
676
753
|
|
|
677
754
|
let jsSrc;
|
|
755
|
+
let jsSrc2;
|
|
678
756
|
if (apply.javascript) {
|
|
757
|
+
jsSrc2 = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Link.txt", "react.jsx", {
|
|
758
|
+
userPrompt: userPrompt,
|
|
759
|
+
mybatis: srcPath.mybatis,
|
|
760
|
+
originSrc: src.javascriptFrom,
|
|
761
|
+
menuUrl: where.menu.url,
|
|
762
|
+
menuName: where.menu.name,
|
|
763
|
+
baseClass: srcPath.baseClass,
|
|
764
|
+
mybatisXmlSource: mybatisXmlSource,
|
|
765
|
+
controllerSource: controllerSrc,
|
|
766
|
+
tableDefinitions: JSON.stringify(columnInfo),
|
|
767
|
+
});
|
|
768
|
+
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
769
|
+
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
770
|
+
|
|
771
|
+
jsSrc = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Detail.txt", "react2.jsx", {
|
|
772
|
+
userPrompt: userPrompt,
|
|
773
|
+
mybatis: srcPath.mybatis,
|
|
774
|
+
originSrc: src.javascriptTo,
|
|
775
|
+
menuUrl: where.menu.url,
|
|
776
|
+
menuName: where.menu.name,
|
|
777
|
+
baseClass: srcPath.baseClass,
|
|
778
|
+
mybatisXmlSource: mybatisXmlSource,
|
|
779
|
+
controllerSource: controllerSrc,
|
|
780
|
+
tableDefinitions: JSON.stringify(columnInfo),
|
|
781
|
+
});
|
|
782
|
+
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
783
|
+
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
784
|
+
/**
|
|
679
785
|
jsSrc = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Detail.txt", "react2.jsx", {
|
|
680
786
|
userPrompt: userPrompt,
|
|
681
787
|
mybatis: srcPath.mybatis,
|
|
@@ -689,9 +795,10 @@ console.log(el, href, title);
|
|
|
689
795
|
});
|
|
690
796
|
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
691
797
|
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
798
|
+
*/
|
|
692
799
|
}
|
|
693
800
|
else {
|
|
694
|
-
jsSrc = src.
|
|
801
|
+
jsSrc = src.javascriptTo;
|
|
695
802
|
}
|
|
696
803
|
|
|
697
804
|
//await this.#generateRealFile(srcPath, apply);
|
|
@@ -712,11 +819,17 @@ console.log(el, href, title);
|
|
|
712
819
|
src: controllerSrc,
|
|
713
820
|
},
|
|
714
821
|
javascript: {
|
|
715
|
-
path: srcPath.
|
|
822
|
+
path: srcPath.javascriptToPullPath,
|
|
716
823
|
src: jsSrc,
|
|
717
|
-
}
|
|
824
|
+
},
|
|
825
|
+
javascript2: {
|
|
826
|
+
path: srcPath.javascriptFromPullPath,
|
|
827
|
+
src: jsSrc2,
|
|
828
|
+
},
|
|
718
829
|
};
|
|
719
830
|
|
|
831
|
+
console.log(apply);
|
|
832
|
+
|
|
720
833
|
for (const key in apply) {
|
|
721
834
|
if (apply[key]) {
|
|
722
835
|
returnSrc.push({
|
|
@@ -789,6 +902,9 @@ console.log(el, href, title);
|
|
|
789
902
|
progressMessageInstance.updateProgress('prepare1', 'completed');
|
|
790
903
|
|
|
791
904
|
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
792
908
|
/**
|
|
793
909
|
//active가 상세면
|
|
794
910
|
if (!apply.javascript) {
|
|
@@ -810,14 +926,21 @@ console.log(el, href, title);
|
|
|
810
926
|
*/
|
|
811
927
|
|
|
812
928
|
|
|
813
|
-
if (what === "
|
|
929
|
+
if (what === "C1") {
|
|
814
930
|
if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) {
|
|
815
931
|
//return "소스 생성하실려면 변경대상 소스를 모두 선택하세요.";
|
|
816
932
|
}
|
|
817
933
|
//await this.#createSource(userPrompt, apply);
|
|
818
934
|
return await this.#modifySource(userPrompt, apply, progressMessageInstance);
|
|
819
935
|
}
|
|
820
|
-
else if (what === "
|
|
936
|
+
else if (what === "C2") {
|
|
937
|
+
if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) {
|
|
938
|
+
//return "소스 생성하실려면 변경대상 소스를 모두 선택하세요.";
|
|
939
|
+
}
|
|
940
|
+
//await this.#createSource(userPrompt, apply);
|
|
941
|
+
return await this.#generateDetailSource(userPrompt, apply, progressMessageInstance);
|
|
942
|
+
}
|
|
943
|
+
else if (what === "U1") {
|
|
821
944
|
return await this.#modifySource(userPrompt, apply, progressMessageInstance);
|
|
822
945
|
}
|
|
823
946
|
}
|
package/package.json
CHANGED
package/src/components/ideAi.js
CHANGED
|
@@ -225,7 +225,7 @@ export class IdeAi
|
|
|
225
225
|
|
|
226
226
|
console.log(menuList, tableDefinitions, JSON.stringify(menuList), JSON.stringify(tableDefinitions));
|
|
227
227
|
|
|
228
|
-
const o = await this.#invoke('/prompts/meta/
|
|
228
|
+
const o = await this.#invoke('/prompts/meta/2.where.txt', {
|
|
229
229
|
"userPrompt": userPrompt,
|
|
230
230
|
"menuList": JSON.stringify(menuList),
|
|
231
231
|
"tableDefinitions": JSON.stringify(tableDefinitions),
|
|
@@ -308,7 +308,7 @@ export class IdeAi
|
|
|
308
308
|
return src;
|
|
309
309
|
};
|
|
310
310
|
|
|
311
|
-
#
|
|
311
|
+
#getSourcePath_BAK = (menuUrl) => {
|
|
312
312
|
const path = menuUrl.replace(/^\/+/, '');
|
|
313
313
|
|
|
314
314
|
const raw = path.split("/").join(".").toLowerCase();
|
|
@@ -344,6 +344,83 @@ export class IdeAi
|
|
|
344
344
|
};*/
|
|
345
345
|
};
|
|
346
346
|
|
|
347
|
+
#findFirstEmptyDetailWrapper = () => {
|
|
348
|
+
const allWrappers = document.querySelectorAll('div[class^="detail-wrapper-"]');
|
|
349
|
+
|
|
350
|
+
for (const el of allWrappers) {
|
|
351
|
+
if (el.innerHTML.trim() === '') {
|
|
352
|
+
// 클래스명 전체를 반환하거나, 특정 패턴을 찾아 반환
|
|
353
|
+
const className = el.className;
|
|
354
|
+
const match = className.match(/detail-wrapper-([^ ]+)/); // 숫자뿐만 아니라 다른 문자도 포함
|
|
355
|
+
|
|
356
|
+
if (match && match[1]) {
|
|
357
|
+
return match[1];
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
return null; // 비어있는 요소가 없을 경우 null 반환
|
|
363
|
+
};
|
|
364
|
+
|
|
365
|
+
#findActiveDetailWrapperIndex = () => {
|
|
366
|
+
const allWrappers = document.querySelectorAll('div[class^="detail-wrapper-"]');
|
|
367
|
+
|
|
368
|
+
for (let i = 0; i < allWrappers.length; i++) {
|
|
369
|
+
const el = allWrappers[i];
|
|
370
|
+
if (el.classList.contains('active')) {
|
|
371
|
+
const className = el.className;
|
|
372
|
+
const match = className.match(/detail-wrapper-([^ ]+)/);
|
|
373
|
+
|
|
374
|
+
if (match && match[1]) {
|
|
375
|
+
return match[1];
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
|
|
380
|
+
return null; // 'active' 클래스를 가진 요소가 없을 경우 null 반환
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
|
|
384
|
+
|
|
385
|
+
#getSourcePath = (menuUrl) => {
|
|
386
|
+
const path = menuUrl.replace(/^\/+/, '');
|
|
387
|
+
|
|
388
|
+
const raw = path.split("/").join(".").toLowerCase();
|
|
389
|
+
const cleaned = raw.replace(/[^a-z0-9.]/g, "");
|
|
390
|
+
const namespace = `${this.#parent.config.basePackage}.${cleaned}`;
|
|
391
|
+
|
|
392
|
+
const packageName = namespace.split(".").slice(0, -1).join(".");
|
|
393
|
+
|
|
394
|
+
//const packageName = `${path.split("/").slice(0, -1).join(".").toLowerCase()}`;
|
|
395
|
+
//const packageName = path.split("/").join(".").toLowerCase();
|
|
396
|
+
const fileName = path.split("/").at(-1).toLowerCase().split('-').map(word => word.charAt(0).toUpperCase() + word.slice(1)).join('');
|
|
397
|
+
|
|
398
|
+
const javascript = `/src/views/${cleaned.split(".").slice(0, -1).join("/")}/${path.split("/").at(-1)}`;
|
|
399
|
+
const index = this.#findFirstEmptyDetailWrapper();
|
|
400
|
+
const javascriptTo = javascript + "-" + index;
|
|
401
|
+
const activeIndex = this.#findActiveDetailWrapperIndex();
|
|
402
|
+
const javascriptFrom = activeIndex ? javascript + "-" + activeIndex : javascript;
|
|
403
|
+
|
|
404
|
+
return {
|
|
405
|
+
package: packageName,
|
|
406
|
+
namespace: namespace,
|
|
407
|
+
baseClass: fileName,
|
|
408
|
+
resultType: this.#parent.config.basePackage.split(".").slice(0, -1).join(".") + ".core.utils.CamelCaseMap",
|
|
409
|
+
mybatis: `${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
410
|
+
javascript: `${javascript}.jsx`,
|
|
411
|
+
javascriptFrom: `${javascriptFrom}.jsx`,
|
|
412
|
+
javascriptTo: `${javascriptTo}.jsx`,
|
|
413
|
+
mybatisPullPath: `${this.#parent.settings.beProjectName}/src/main/resources/mapper/${cleaned.split(".").slice(0, -1).join("/")}/${fileName}Mapper.xml`,
|
|
414
|
+
controllerPullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/controller/${fileName}Controller.java`,
|
|
415
|
+
servicePullPath: `${this.#parent.settings.beProjectName}/src/main/java/${packageName.replaceAll(".", "/")}/service/${fileName}Service.java`,
|
|
416
|
+
javascriptPullPath: `${this.#parent.settings.feProjectName}${javascript}.jsx`,
|
|
417
|
+
javascriptFromPullPath: `${this.#parent.settings.feProjectName}${javascriptFrom}.jsx`,
|
|
418
|
+
javascriptToPullPath: `${this.#parent.settings.feProjectName}${javascriptTo}.jsx`,
|
|
419
|
+
};
|
|
420
|
+
};
|
|
421
|
+
|
|
422
|
+
|
|
423
|
+
|
|
347
424
|
#createSource = async (userPrompt, apply) => {
|
|
348
425
|
const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
|
|
349
426
|
this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
|
|
@@ -675,7 +752,36 @@ console.log(el, href, title);
|
|
|
675
752
|
}
|
|
676
753
|
|
|
677
754
|
let jsSrc;
|
|
755
|
+
let jsSrc2;
|
|
678
756
|
if (apply.javascript) {
|
|
757
|
+
jsSrc2 = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Link.txt", "react.jsx", {
|
|
758
|
+
userPrompt: userPrompt,
|
|
759
|
+
mybatis: srcPath.mybatis,
|
|
760
|
+
originSrc: src.javascriptFrom,
|
|
761
|
+
menuUrl: where.menu.url,
|
|
762
|
+
menuName: where.menu.name,
|
|
763
|
+
baseClass: srcPath.baseClass,
|
|
764
|
+
mybatisXmlSource: mybatisXmlSource,
|
|
765
|
+
controllerSource: controllerSrc,
|
|
766
|
+
tableDefinitions: JSON.stringify(columnInfo),
|
|
767
|
+
});
|
|
768
|
+
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
769
|
+
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
770
|
+
|
|
771
|
+
jsSrc = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Detail.txt", "react2.jsx", {
|
|
772
|
+
userPrompt: userPrompt,
|
|
773
|
+
mybatis: srcPath.mybatis,
|
|
774
|
+
originSrc: src.javascriptTo,
|
|
775
|
+
menuUrl: where.menu.url,
|
|
776
|
+
menuName: where.menu.name,
|
|
777
|
+
baseClass: srcPath.baseClass,
|
|
778
|
+
mybatisXmlSource: mybatisXmlSource,
|
|
779
|
+
controllerSource: controllerSrc,
|
|
780
|
+
tableDefinitions: JSON.stringify(columnInfo),
|
|
781
|
+
});
|
|
782
|
+
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
783
|
+
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
784
|
+
/**
|
|
679
785
|
jsSrc = await this.#generateTmplFile("/prompts/meta/detail/4.BuildReactJsx_Detail.txt", "react2.jsx", {
|
|
680
786
|
userPrompt: userPrompt,
|
|
681
787
|
mybatis: srcPath.mybatis,
|
|
@@ -689,9 +795,10 @@ console.log(el, href, title);
|
|
|
689
795
|
});
|
|
690
796
|
//this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
|
|
691
797
|
progressMessageInstance.updateProgress('javascript', 'completed');
|
|
798
|
+
*/
|
|
692
799
|
}
|
|
693
800
|
else {
|
|
694
|
-
jsSrc = src.
|
|
801
|
+
jsSrc = src.javascriptTo;
|
|
695
802
|
}
|
|
696
803
|
|
|
697
804
|
//await this.#generateRealFile(srcPath, apply);
|
|
@@ -712,11 +819,17 @@ console.log(el, href, title);
|
|
|
712
819
|
src: controllerSrc,
|
|
713
820
|
},
|
|
714
821
|
javascript: {
|
|
715
|
-
path: srcPath.
|
|
822
|
+
path: srcPath.javascriptToPullPath,
|
|
716
823
|
src: jsSrc,
|
|
717
|
-
}
|
|
824
|
+
},
|
|
825
|
+
javascript2: {
|
|
826
|
+
path: srcPath.javascriptFromPullPath,
|
|
827
|
+
src: jsSrc2,
|
|
828
|
+
},
|
|
718
829
|
};
|
|
719
830
|
|
|
831
|
+
console.log(apply);
|
|
832
|
+
|
|
720
833
|
for (const key in apply) {
|
|
721
834
|
if (apply[key]) {
|
|
722
835
|
returnSrc.push({
|
|
@@ -789,6 +902,9 @@ console.log(el, href, title);
|
|
|
789
902
|
progressMessageInstance.updateProgress('prepare1', 'completed');
|
|
790
903
|
|
|
791
904
|
|
|
905
|
+
|
|
906
|
+
|
|
907
|
+
|
|
792
908
|
/**
|
|
793
909
|
//active가 상세면
|
|
794
910
|
if (!apply.javascript) {
|
|
@@ -810,14 +926,21 @@ console.log(el, href, title);
|
|
|
810
926
|
*/
|
|
811
927
|
|
|
812
928
|
|
|
813
|
-
if (what === "
|
|
929
|
+
if (what === "C1") {
|
|
814
930
|
if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) {
|
|
815
931
|
//return "소스 생성하실려면 변경대상 소스를 모두 선택하세요.";
|
|
816
932
|
}
|
|
817
933
|
//await this.#createSource(userPrompt, apply);
|
|
818
934
|
return await this.#modifySource(userPrompt, apply, progressMessageInstance);
|
|
819
935
|
}
|
|
820
|
-
else if (what === "
|
|
936
|
+
else if (what === "C2") {
|
|
937
|
+
if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) {
|
|
938
|
+
//return "소스 생성하실려면 변경대상 소스를 모두 선택하세요.";
|
|
939
|
+
}
|
|
940
|
+
//await this.#createSource(userPrompt, apply);
|
|
941
|
+
return await this.#generateDetailSource(userPrompt, apply, progressMessageInstance);
|
|
942
|
+
}
|
|
943
|
+
else if (what === "U1") {
|
|
821
944
|
return await this.#modifySource(userPrompt, apply, progressMessageInstance);
|
|
822
945
|
}
|
|
823
946
|
}
|