ide-assi 0.708.0 → 0.710.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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.708.0",
4
+ "version": "0.710.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -88,104 +88,6 @@ export class IdeAi
88
88
  return await response.json();
89
89
  };
90
90
 
91
- #toJavaPackage = (path) => {
92
- // 확장자 및 파일 제거: 마지막 / 이후는 제거
93
- const withoutFile = path.substring(0, path.lastIndexOf('/'));
94
-
95
- // 슬래시(/) → 점(.) 변환
96
- return withoutFile.replace(/\//g, '.');
97
- }
98
-
99
- /**
100
- * 1. 소스 명칭 package 예) tmpl.population
101
- * 2. 소스가 없으면 소스 생성
102
- * 3.
103
- *
104
- * 1. 메뉴정보, 테이블정보로 해당 패키지, URL, 소스명칭을 유추
105
- */
106
- generateSource = async (userPrompt) => {
107
-
108
- const menus = this.#getMenuInfo();
109
- const tables = await this.#getTableList();
110
-
111
- console.log(menus);
112
- console.log(tables);
113
-
114
- const response = await fetch(`${this.#API_URL}/ai/inferSourceMeta`, {
115
- method: "POST",
116
- headers: { "Content-Type": "application/json" },
117
- body: JSON.stringify({
118
- userPrompt: userPrompt,
119
- menus: menus,
120
- tables: tables.list,
121
- })
122
- });
123
-
124
- const res = await response.json();
125
- //console.log(res);
126
-
127
- if (res.result == "1") {
128
-
129
- const columnInfo = await this.#getColumnInfo(res.table);
130
- console.log(columnInfo);
131
-
132
- const response2 = await fetch(`${this.#API_URL}/ai/generateSource`, {
133
- method: "POST",
134
- headers: { "Content-Type": "application/json" },
135
- body: JSON.stringify({
136
- packageName: "ide.assi.be." + this.#toJavaPackage(res.service).replace(".service", ""),
137
- userPrompt: userPrompt,
138
- url: res.menu.url,
139
- tables: columnInfo.list,
140
- })
141
- });
142
-
143
- const source = await response2.json();
144
-
145
- const response3 = await fetch(`/api/source/generateMybatisFile`, {
146
- method: "POST",
147
- headers: { "Content-Type": "application/json" },
148
- body: JSON.stringify({
149
- fileNm: res.xml,
150
- contents: source.mybatis,
151
- })
152
- });
153
- //console.log(response3);
154
- //console.log(await response3.json());
155
-
156
- const response4 = await fetch(`/api/source/generateJavaFile`, {
157
- method: "POST",
158
- headers: { "Content-Type": "application/json" },
159
- body: JSON.stringify({
160
- fileNm: res.service,
161
- contents: source.service,
162
- })
163
- });
164
-
165
- const response5 = await fetch(`/api/source/generateJavaFile`, {
166
- method: "POST",
167
- headers: { "Content-Type": "application/json" },
168
- body: JSON.stringify({
169
- fileNm: res.controller,
170
- contents: source.controller,
171
- })
172
- });
173
-
174
- const response6 = await fetch(`/api/source/generateJsFile`, {
175
- method: "POST",
176
- headers: { "Content-Type": "application/json" },
177
- body: JSON.stringify({
178
- fileNm: res.js + "x",
179
- contents: source.js,
180
- })
181
- });
182
-
183
- return await response4.json();
184
- }
185
-
186
- return null;
187
- };
188
-
189
91
  #invoke = async (path, params) => {
190
92
 
191
93
  const prompt = await IdeUtils.generatePrompt(path, params);
@@ -247,31 +149,6 @@ export class IdeAi
247
149
  return o;
248
150
  };
249
151
 
250
- #generateRealFile = async (srcPath, apply) => {
251
- const fileMap = {
252
- mybatis: { name: "mybatis.xml", path: srcPath.mybatisPullPath },
253
- service: { name: "service.java", path: srcPath.servicePullPath },
254
- controller: { name: "controller.java", path: srcPath.controllerPullPath },
255
- javascript: { name: "react.jsx", path: srcPath.javascriptPullPath },
256
- };
257
-
258
- const selectedFiles = Object.entries(fileMap)
259
- .filter(([key]) => apply[key])
260
- .map(([_, { name, path }]) => ({ name, path }));
261
-
262
- const params = await Promise.all(
263
- selectedFiles.map(async ({ name, path }) => ({
264
- path,
265
- contents: await fetch(`/api/templates/${name}`).then(res => res.text()),
266
- }))
267
- );
268
-
269
- console.log(params);
270
-
271
- api.post(`/api/source/generateRealFile`, { list: params });
272
- };
273
-
274
-
275
152
  #generateTmplFile = async (promptFile, generateFileName, params) => {
276
153
 
277
154
  let src = await this.#invoke(promptFile, params);
@@ -373,191 +250,8 @@ export class IdeAi
373
250
  };
374
251
 
375
252
 
376
- #modifySource = async (userPrompt, apply, progressMessageInstance) => {
377
-
378
- const el = ninegrid.querySelector("nx-side-menu-item.active");
379
- if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
380
-
381
- const href = el.getAttribute("href");
382
- const title = el.getAttribute("title");
383
-
384
- console.log(el, href, title);
385
-
386
- const srcPath = this.#getSourcePath(href);
387
- console.log(srcPath);
388
-
389
-
390
- /**
391
- * {
392
- * "package": "ide.assi.be.tmpla",
393
- * "namespace": "ide.assi.be.tmpla.docmanager",
394
- * "baseClass": "DocManager",
395
- * "resultType": "ide.assi.core.utils.CamelCaseMap",
396
- * "mybatis": "tmpla/DocManagerMapper.xml",
397
- * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
398
- * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
399
- * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
400
- * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
401
- * }
402
- */
403
- const src = await api.post("/api/source/read", srcPath);
404
- //console.log(src);
405
-
406
- /**
407
- const response = await fetch(srcPath.javascript);
408
- src.javascript = await response.text();*/
409
-
410
- //console.log(src);
411
- //const template = await fetch(path).then(res => res.text());
412
- /*
413
- arr.push({
414
- //menuId: elem.getAttribute("menu-id"),
415
- url: elem.getAttribute("href"),
416
- title: elem.getAttribute("title"),
417
- })*/
418
-
419
-
420
-
421
-
422
-
423
- const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
424
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
425
- progressMessageInstance.updateProgress('prepare2', 'completed');
426
-
427
- console.log(where);
428
-
429
- //const srcPath = this.#getSourcePath(where.menu.url);
430
-
431
- console.log(srcPath);
432
-
433
- const columnInfo = await this.#getColumnInfo(where.table);
434
-
435
- let mybatisXmlSource;
436
- if (apply.mybatis) {
437
- mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/U.BuildMyBatisMapper.txt", "mybatis.xml", {
438
- userPrompt: userPrompt,
439
- originSrc: src.mybatis,
440
- resultType: srcPath.resultType,
441
- namespace: srcPath.namespace,
442
- tableDefinitions: JSON.stringify(columnInfo),
443
- });
444
- //this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
445
- progressMessageInstance.updateProgress('mybatis', 'completed');
446
- }
447
- else {
448
- mybatisXmlSource = src.mybatis;
449
- }
450
-
451
- let serviceSrc;
452
- if (apply.service) {
453
- serviceSrc = await this.#generateTmplFile("/prompts/meta/U.BuildService.txt", "service.java", {
454
- userPrompt: userPrompt,
455
- originSrc: src.service,
456
- baseClass: srcPath.baseClass,
457
- myBatisPath: srcPath.mybatis,
458
- namespace: srcPath.namespace,
459
- package: srcPath.package + ".service",
460
- mybatisXmlSource: mybatisXmlSource,
461
- });
462
- //this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
463
- progressMessageInstance.updateProgress('service', 'completed');
464
- }
465
- else {
466
- serviceSrc = src.service;
467
- }
468
-
469
- let controllerSrc;
470
- if (apply.controller) {
471
- controllerSrc = await this.#generateTmplFile("/prompts/meta/U.BuildController.txt", "controller.java", {
472
- userPrompt: userPrompt,
473
- originSrc: src.controller,
474
- baseClass: srcPath.baseClass,
475
- menuUrl: where.menu.url,
476
- package: srcPath.package + ".controller",
477
- serviceSource: serviceSrc,
478
- });
479
- //this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
480
- progressMessageInstance.updateProgress('controller', 'completed');
481
- }
482
- else {
483
- controllerSrc = src.controller;
484
- }
485
-
486
- let jsSrc;
487
- if (apply.javascript) {
488
- jsSrc = await this.#generateTmplFile("/prompts/meta/U.BuildReactJsx.txt", "react.jsx", {
489
- userPrompt: userPrompt,
490
- mybatis: srcPath.mybatis,
491
- originSrc: src.javascript,
492
- menuUrl: where.menu.url,
493
- menuName: where.menu.name,
494
- baseClass: srcPath.baseClass,
495
- mybatisXmlSource: mybatisXmlSource,
496
- controllerSource: controllerSrc,
497
- tableDefinitions: JSON.stringify(columnInfo),
498
- });
499
- //this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
500
- progressMessageInstance.updateProgress('javascript', 'completed');
501
- }
502
- else {
503
- jsSrc = src.javascript;
504
- }
505
-
506
- //await this.#generateRealFile(srcPath, apply);
507
-
508
- const returnSrc = [];
509
-
510
- const mapping = {
511
- mybatis: {
512
- path: srcPath.mybatisPullPath,
513
- src: mybatisXmlSource,
514
- },
515
- service: {
516
- path: srcPath.servicePullPath,
517
- src: serviceSrc,
518
- },
519
- controller: {
520
- path: srcPath.controllerPullPath,
521
- src: controllerSrc,
522
- },
523
- javascript: {
524
- path: srcPath.javascriptPullPath,
525
- src: jsSrc,
526
- }
527
- };
528
-
529
- for (const key in apply) {
530
- if (apply[key]) {
531
- returnSrc.push({
532
- [key]: {
533
- asis: src[key],
534
- tobe: mapping[key].src,
535
- tobePath: mapping[key].path,
536
- }
537
- });
538
- }
539
- }
540
-
541
- console.log(returnSrc);
542
-
543
- return returnSrc;
544
- };
545
-
546
253
  #generateSource = async (what, userPrompt, apply, progressMessageInstance) => {
547
254
 
548
- /**
549
- const el = ninegrid.querySelector("nx-side-menu-item.active");
550
- if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
551
-
552
- const href = el.getAttribute("href");
553
- const title = el.getAttribute("title");
554
-
555
- console.log(el, href, title);
556
-
557
- const srcPath = this.#getSourcePath(href);
558
- console.log(srcPath);
559
- */
560
-
561
255
  let where;
562
256
  let href;
563
257
 
@@ -565,7 +259,7 @@ console.log(el, href, title);
565
259
  where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
566
260
  href = where.menu.url;
567
261
  }
568
- else if (what === "U1") {
262
+ else if (["U1","U2","C2"].includes(what)) {
569
263
  const el = ninegrid.querySelector("nx-side-menu-item.active");
570
264
  if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
571
265
 
@@ -637,18 +331,60 @@ console.log(el, href, title);
637
331
  }
638
332
 
639
333
  if (apply.javascript) {
640
- generatedSource.javascriptFrom = await this.#generateTmplFile(this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all.")), "react.jsx", {
641
- userPrompt: userPrompt,
642
- mybatis: srcPath.mybatis,
643
- originSrc: src.javascriptFrom,
644
- menuUrl: where.menu.url,
645
- menuName: where.menu.name,
646
- baseClass: srcPath.baseClass,
647
- mybatisXmlSource: generatedSource.mybatis,
648
- controllerSource: generatedSource.controller,
649
- tableDefinitions: JSON.stringify(columnInfo),
650
- });
651
- //this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
334
+
335
+ const mainfiles = this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all."));
336
+ const subfiles = this.prompt.react.filter(item => item.includes(".sub.") || item.includes(".all."));
337
+
338
+ if (["C1","U1"].includes(what)) {
339
+ generatedSource.javascriptFrom = await this.#generateTmplFile(mainfiles, "reactFrom.jsx", {
340
+ userPrompt: userPrompt,
341
+ mybatis: srcPath.mybatis,
342
+ originSrc: src.javascriptFrom,
343
+ menuUrl: where.menu.url,
344
+ menuName: where.menu.name,
345
+ baseClass: srcPath.baseClass,
346
+ mybatisXmlSource: generatedSource.mybatis,
347
+ controllerSource: generatedSource.controller,
348
+ tableDefinitions: JSON.stringify(columnInfo),
349
+ });
350
+ }
351
+ else { // "C2", "U2"
352
+ const pathArray = srcPath.javascriptTo.split("/");
353
+ const javascriptFileTo = pathArray.pop();
354
+
355
+ generatedSource.javascriptFrom = await this.#generateTmplFile(mainfiles, "reactFrom.jsx", {
356
+ userPrompt: userPrompt,
357
+ mybatis: srcPath.mybatis,
358
+ originSrc: src.javascriptFrom,
359
+ menuUrl: where.menu.url,
360
+ menuName: where.menu.name,
361
+ baseClass: srcPath.baseClass,
362
+ classFrom: srcPath.classFrom, // 화면연결시 필요
363
+ classTo: srcPath.classTo, // 화면연결시 필요
364
+ emptyIndex: srcPath.emptyIndex, // 화면연결시 필요
365
+ activeIndex: srcPath.activeIndex, // 화면연결시 필요
366
+ javascriptFileTo: javascriptFileTo, // 화면연결시 필요
367
+ mybatisXmlSource: generatedSource.mybatis,
368
+ controllerSource: generatedSource.controller,
369
+ tableDefinitions: JSON.stringify(columnInfo),
370
+ });
371
+
372
+ generatedSource.javascriptTo = await this.#generateTmplFile(subfiles, "reactTo.jsx", {
373
+ userPrompt: userPrompt,
374
+ mybatis: srcPath.mybatis,
375
+ originSrc: src.javascriptTo,
376
+ menuUrl: where.menu.url,
377
+ menuName: where.menu.name,
378
+ baseClass: srcPath.baseClass,
379
+ className: srcPath.classTo,
380
+ emptyIndex: srcPath.emptyIndex,
381
+ activeIndex: srcPath.activeIndex,
382
+ mybatisXmlSource: generatedSource.mybatis,
383
+ controllerSource: generatedSource.controller,
384
+ tableDefinitions: JSON.stringify(columnInfo),
385
+ });
386
+ }
387
+
652
388
  progressMessageInstance.updateProgress('javascript', 'completed');
653
389
  }
654
390
 
@@ -686,188 +422,7 @@ console.log(el, href, title);
686
422
  }
687
423
 
688
424
  for (const key in apply) {
689
- if (apply[key]) {
690
- returnSrc.push({
691
- [key]: {
692
- asis: src[key],
693
- tobe: mapping[key].src,
694
- tobePath: mapping[key].path,
695
- }
696
- });
697
- }
698
- }
699
-
700
- console.log(returnSrc);
701
-
702
- return returnSrc;
703
- };
704
-
705
- #generateListSource = async (userPrompt, apply, progressMessageInstance) => {
706
-
707
- /**
708
- const el = ninegrid.querySelector("nx-side-menu-item.active");
709
- if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
710
-
711
- const href = el.getAttribute("href");
712
- const title = el.getAttribute("title");
713
-
714
- console.log(el, href, title);
715
-
716
- const srcPath = this.#getSourcePath(href);
717
- console.log(srcPath);
718
- */
719
-
720
-
721
- const where = await this.#where(userPrompt, this.#getMenuInfo(), await this.#getTableList());
722
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
723
-
724
- console.log(where);
725
-
726
- const srcPath = this.#getSourcePath(where.menu.url);
727
- console.log(srcPath);
728
-
729
-
730
- /**
731
- * {
732
- * "package": "ide.assi.be.tmpla",
733
- * "namespace": "ide.assi.be.tmpla.docmanager",
734
- * "baseClass": "DocManager",
735
- * "resultType": "ide.assi.core.utils.CamelCaseMap",
736
- * "mybatis": "tmpla/DocManagerMapper.xml",
737
- * "mybatisPullPath": "ide-assi-be/src/main/resources/mapper/tmpla/DocManagerMapper.xml",
738
- * "controllerPullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/controller/DocManagerController.java",
739
- * "servicePullPath": "ide-assi-be/src/main/java/ide/assi/be/tmpla/service/DocManagerService.java",
740
- * "javascriptPullPath": "ide-assi-fe-vite-react-js/src/views/tmpla/doc-manager.jsx"
741
- * }
742
- */
743
- const src = await api.post("/api/source/read", srcPath);
744
- //console.log(src);
745
-
746
- /**
747
- const response = await fetch(srcPath.javascript);
748
- src.javascript = await response.text();*/
749
-
750
- //console.log(src);
751
- //const template = await fetch(path).then(res => res.text());
752
- /*
753
- arr.push({
754
- //menuId: elem.getAttribute("menu-id"),
755
- url: elem.getAttribute("href"),
756
- title: elem.getAttribute("title"),
757
- })*/
758
-
759
-
760
-
761
-
762
-
763
- //const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
764
- //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
765
- progressMessageInstance.updateProgress('prepare2', 'completed');
766
-
767
- //console.log(where);
768
-
769
- //const srcPath = this.#getSourcePath(where.menu.url);
770
-
771
-
772
-
773
- const columnInfo = await this.#getColumnInfo(where.table);
774
-
775
- let mybatisXmlSource;
776
- if (apply.mybatis) {
777
- mybatisXmlSource = await this.#generateTmplFile("/prompts/meta/U.BuildMyBatisMapper.txt", "mybatis.xml", {
778
- userPrompt: userPrompt,
779
- originSrc: src.mybatis,
780
- resultType: srcPath.resultType,
781
- namespace: srcPath.namespace,
782
- tableDefinitions: JSON.stringify(columnInfo),
783
- });
784
- //this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
785
- progressMessageInstance.updateProgress('mybatis', 'completed');
786
- }
787
- else {
788
- mybatisXmlSource = src.mybatis;
789
- }
790
-
791
- let serviceSrc;
792
- if (apply.service) {
793
- serviceSrc = await this.#generateTmplFile("/prompts/meta/U.BuildService.txt", "service.java", {
794
- userPrompt: userPrompt,
795
- originSrc: src.service,
796
- baseClass: srcPath.baseClass,
797
- myBatisPath: srcPath.mybatis,
798
- namespace: srcPath.namespace,
799
- package: srcPath.package + ".service",
800
- mybatisXmlSource: mybatisXmlSource,
801
- });
802
- //this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
803
- progressMessageInstance.updateProgress('service', 'completed');
804
- }
805
- else {
806
- serviceSrc = src.service;
807
- }
808
-
809
- let controllerSrc;
810
- if (apply.controller) {
811
- controllerSrc = await this.#generateTmplFile("/prompts/meta/U.BuildController.txt", "controller.java", {
812
- userPrompt: userPrompt,
813
- originSrc: src.controller,
814
- baseClass: srcPath.baseClass,
815
- menuUrl: where.menu.url,
816
- package: srcPath.package + ".controller",
817
- serviceSource: serviceSrc,
818
- });
819
- //this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
820
- progressMessageInstance.updateProgress('controller', 'completed');
821
- }
822
- else {
823
- controllerSrc = src.controller;
824
- }
825
-
826
- let jsSrc;
827
- if (apply.javascript) {
828
- jsSrc = await this.#generateTmplFile(this.prompt.react.filter(item => item.includes(".main.") || item.includes(".all.")), "react.jsx", {
829
- userPrompt: userPrompt,
830
- mybatis: srcPath.mybatis,
831
- originSrc: src.javascript,
832
- menuUrl: where.menu.url,
833
- menuName: where.menu.name,
834
- baseClass: srcPath.baseClass,
835
- mybatisXmlSource: mybatisXmlSource,
836
- controllerSource: controllerSrc,
837
- tableDefinitions: JSON.stringify(columnInfo),
838
- });
839
- //this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
840
- progressMessageInstance.updateProgress('javascript', 'completed');
841
- }
842
- else {
843
- jsSrc = src.javascript;
844
- }
845
-
846
- //await this.#generateRealFile(srcPath, apply);
847
-
848
- const returnSrc = [];
849
-
850
- const mapping = {
851
- mybatis: {
852
- path: srcPath.mybatisPullPath,
853
- src: mybatisXmlSource,
854
- },
855
- service: {
856
- path: srcPath.servicePullPath,
857
- src: serviceSrc,
858
- },
859
- controller: {
860
- path: srcPath.controllerPullPath,
861
- src: controllerSrc,
862
- },
863
- javascript: {
864
- path: srcPath.javascriptPullPath,
865
- src: jsSrc,
866
- }
867
- };
868
-
869
- for (const key in apply) {
870
- if (apply[key]) {
425
+ if (apply[key] && mapping[key].src) {
871
426
  returnSrc.push({
872
427
  [key]: {
873
428
  asis: src[key],
@@ -1279,34 +834,29 @@ console.log(el, href, title);
1279
834
  const progressMessageInstance = elAiChat.addProgress(initialProgressData);
1280
835
 
1281
836
  const what = await this.#what(userPrompt);
1282
- //this.#parent.addMessage("명령을 이해했습니다.");
1283
837
  progressMessageInstance.updateProgress('prepare1', 'completed');
1284
838
 
1285
- if (what === "C1") {
839
+ if (["C1","C2"].includes(what)) {
1286
840
  if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) {
1287
841
  //return "소스 생성하실려면 변경대상 소스를 모두 선택하세요.";
1288
842
  }
1289
- //await this.#createSource(userPrompt, apply);
1290
- //return await this.#modifySource(userPrompt, apply, progressMessageInstance);
843
+ }
844
+
845
+ if (what === "C1") {
1291
846
  return await this.#generateSource(what, userPrompt, apply, progressMessageInstance);
1292
847
  }
1293
848
  else if (what === "C2") {
1294
- if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) {
1295
- //return "소스 생성하실려면 변경대상 소스를 모두 선택하세요.";
1296
- }
1297
- //await this.#createSource(userPrompt, apply);
1298
- return await this.#generateDetailSource(userPrompt, apply, progressMessageInstance);
849
+ return await this.#generateSource(what, userPrompt, apply, progressMessageInstance);
1299
850
  }
1300
851
  else if (what === "U1") {
1301
852
  // .list-wrapper 또는 .detail-wrapper-* 중에서 .active 클래스를 가진 첫 번째 요소를 찾습니다.
1302
853
  const el = document.querySelector(".list-wrapper.active");
1303
854
 
1304
855
  if (el) {
1305
- //return await this.#modifySource(userPrompt, apply, progressMessageInstance);
1306
856
  return await this.#generateSource(what, userPrompt, apply, progressMessageInstance);
1307
857
  }
1308
858
  else {
1309
- return await this.#modifyDetailSource(userPrompt, apply, progressMessageInstance);
859
+ return await this.#generateSource("U2", userPrompt, apply, progressMessageInstance);
1310
860
  }
1311
861
  }
1312
862
  }