ide-assi 0.449.0 → 0.452.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.
@@ -202114,7 +202114,7 @@ class IdeAi
202114
202114
  await this.#generateRealFile(srcPath, apply);
202115
202115
  };
202116
202116
 
202117
- #modifySource = async (userPrompt, apply) => {
202117
+ #modifySource = async (userPrompt, apply, progressMessageInstance) => {
202118
202118
 
202119
202119
  const el = ninegrid.querySelector("nx-side-menu-item.active");
202120
202120
  if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
@@ -202155,57 +202155,13 @@ class IdeAi
202155
202155
  title: elem.getAttribute("title"),
202156
202156
  })*/
202157
202157
 
202158
- const initialProgressData = [
202159
- { id: '1', message: '메뉴와 테이블을 검색중입니다', completedMessage: '관련 메뉴와 테이블을 찾았습니다.' }
202160
- ];
202161
- if (apply.mybatis) {
202162
- initialProgressData.push({ id: '2', message: 'MyBatis 소스파일을 생성중입니다', completedMessage: 'MyBatis 소스파일을 생성했습니다.' });
202163
- }
202164
- if (apply.service) {
202165
- initialProgressData.push({ id: '3', message: 'Java(Service) 소스파일을 생성중입니다', completedMessage: 'Java(Service) 소스파일을 생성했습니다.' });
202166
- }
202167
-
202168
- if (apply.controller) {
202169
- initialProgressData.push({ id: '4', message: 'Java(Controller) 소스파일을 생성중입니다', completedMessage: 'Java(Controller) 소스파일을 생성했습니다.' });
202170
- }
202171
-
202172
- if (apply.javascript) {
202173
- initialProgressData.push({ id: '5', message: 'Jsx(React) 소스파일을 생성중입니다', completedMessage: 'Jsx(React) 소스파일을 생성했습니다.' });
202174
- }
202175
-
202176
- const elAiChat = this.#parent.shadowRoot.querySelector("nx-ai-chat");
202177
- const progressMessageInstance = elAiChat.addProgress(initialProgressData);
202178
-
202179
-
202180
- // 2. 시간이 지난 후, 특정 단계의 완료를 알림
202181
- // 예를 들어, 3초 후에 분석 완료
202182
- setTimeout(() => {
202183
- if (progressMessageInstance) {
202184
- progressMessageInstance.updateProgress('1', 'completed');
202185
- console.log("분석 완료 메시지 업데이트");
202186
- }
202187
- }, 3000);
202188
-
202189
- // 예를 들어, 6초 후에 설계 완료
202190
- setTimeout(() => {
202191
- if (progressMessageInstance) {
202192
- progressMessageInstance.updateProgress('2', 'completed');
202193
- console.log("설계 완료 메시지 업데이트");
202194
- }
202195
- }, 6000);
202196
-
202197
- // 모든 단계가 완료된 후, 일반 AI 메시지 추가 (선택 사항)
202198
- setTimeout(() => {
202199
- elAiChat.add("ai", "모든 작업이 성공적으로 완료되었습니다!", [], []);
202200
- }, 9000);
202201
-
202202
-
202203
202158
 
202204
202159
 
202205
202160
 
202206
202161
 
202207
202162
  const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
202208
- this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
202163
+ //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
202164
+ progressMessageInstance.updateProgress('prepare2', 'completed');
202209
202165
 
202210
202166
  console.log(where);
202211
202167
 
@@ -202224,7 +202180,8 @@ class IdeAi
202224
202180
  namespace: srcPath.namespace,
202225
202181
  tableDefinitions: columnInfo,
202226
202182
  });
202227
- this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
202183
+ //this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
202184
+ progressMessageInstance.updateProgress('mybatis', 'completed');
202228
202185
  }
202229
202186
  else {
202230
202187
  mybatisXmlSource = src.mybatis;
@@ -202241,7 +202198,8 @@ class IdeAi
202241
202198
  package: srcPath.package + ".service",
202242
202199
  mybatisXmlSource: mybatisXmlSource,
202243
202200
  });
202244
- this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
202201
+ //this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
202202
+ progressMessageInstance.updateProgress('service', 'completed');
202245
202203
  }
202246
202204
  else {
202247
202205
  serviceSrc = src.service;
@@ -202258,6 +202216,7 @@ class IdeAi
202258
202216
  serviceSource: serviceSrc,
202259
202217
  });
202260
202218
  this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
202219
+ progressMessageInstance.updateProgress('controller', 'completed');
202261
202220
  }
202262
202221
  else {
202263
202222
  controllerSrc = src.controller;
@@ -202274,11 +202233,13 @@ class IdeAi
202274
202233
  tableDefinitions: columnInfo,
202275
202234
  });
202276
202235
  this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
202236
+ progressMessageInstance.updateProgress('javascript', 'completed');
202277
202237
  }
202278
202238
  else {
202279
202239
  src.javascript;
202280
202240
  }
202281
202241
  //console.log(src.javascript);
202242
+ //progressMessageInstance.updateProgress('javascript', 'completed');
202282
202243
 
202283
202244
  await this.#generateRealFile(srcPath, apply);
202284
202245
  };
@@ -202287,16 +202248,63 @@ class IdeAi
202287
202248
 
202288
202249
  this.#createModel();
202289
202250
 
202251
+ const initialProgressData = [
202252
+ { id: 'prepare1', message: '명령을 해석중입니다.', completedMessage: '명령을 해석했습니다.' },
202253
+ { id: 'prepare2', message: '메뉴와 테이블을 검색중입니다', completedMessage: '관련 메뉴와 테이블을 찾았습니다.' },
202254
+ ];
202255
+ if (apply.mybatis) {
202256
+ initialProgressData.push({ id: 'mybatis', message: 'MyBatis 소스파일을 생성중입니다', completedMessage: 'MyBatis 소스파일을 생성했습니다.' });
202257
+ }
202258
+ if (apply.service) {
202259
+ initialProgressData.push({ id: 'service', message: 'Java(Service) 소스파일을 생성중입니다', completedMessage: 'Java(Service) 소스파일을 생성했습니다.' });
202260
+ }
202261
+
202262
+ if (apply.controller) {
202263
+ initialProgressData.push({ id: 'controller', message: 'Java(Controller) 소스파일을 생성중입니다', completedMessage: 'Java(Controller) 소스파일을 생성했습니다.' });
202264
+ }
202265
+
202266
+ if (apply.javascript) {
202267
+ initialProgressData.push({ id: 'javascript', message: 'Jsx(React) 소스파일을 생성중입니다', completedMessage: 'Jsx(React) 소스파일을 생성했습니다.' });
202268
+ }
202269
+
202270
+ const elAiChat = this.#parent.shadowRoot.querySelector("nx-ai-chat");
202271
+ const progressMessageInstance = elAiChat.addProgress(initialProgressData);
202272
+
202273
+ /**
202274
+ // 2. 시간이 지난 후, 특정 단계의 완료를 알림
202275
+ // 예를 들어, 3초 후에 분석 완료
202276
+ setTimeout(() => {
202277
+ if (progressMessageInstance) {
202278
+ progressMessageInstance.updateProgress('1', 'completed');
202279
+ console.log("분석 완료 메시지 업데이트");
202280
+ }
202281
+ }, 3000);
202282
+
202283
+ // 예를 들어, 6초 후에 설계 완료
202284
+ setTimeout(() => {
202285
+ if (progressMessageInstance) {
202286
+ progressMessageInstance.updateProgress('2', 'completed');
202287
+ console.log("설계 완료 메시지 업데이트");
202288
+ }
202289
+ }, 6000);
202290
+
202291
+ // 모든 단계가 완료된 후, 일반 AI 메시지 추가 (선택 사항)
202292
+ setTimeout(() => {
202293
+ elAiChat.add("ai", "모든 작업이 성공적으로 완료되었습니다!", [], []);
202294
+ }, 9000);
202295
+ */
202296
+
202290
202297
  const what = await this.#what(userPrompt);
202291
- this.#parent.addMessage("명령을 이해했습니다.");
202298
+ //this.#parent.addMessage("명령을 이해했습니다.");
202299
+ progressMessageInstance.updateProgress('prepare1', 'completed');
202292
202300
 
202293
202301
  if (what === "1") {
202294
202302
  if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) ;
202295
202303
  //await this.#createSource(userPrompt, apply);
202296
- await this.#modifySource(userPrompt, apply);
202304
+ await this.#modifySource(userPrompt, apply, progressMessageInstance);
202297
202305
  }
202298
202306
  else if (what === "2") {
202299
- await this.#modifySource(userPrompt, apply);
202307
+ await this.#modifySource(userPrompt, apply, progressMessageInstance);
202300
202308
  }
202301
202309
 
202302
202310
  return "OK";
@@ -202110,7 +202110,7 @@ class IdeAi
202110
202110
  await this.#generateRealFile(srcPath, apply);
202111
202111
  };
202112
202112
 
202113
- #modifySource = async (userPrompt, apply) => {
202113
+ #modifySource = async (userPrompt, apply, progressMessageInstance) => {
202114
202114
 
202115
202115
  const el = ninegrid.querySelector("nx-side-menu-item.active");
202116
202116
  if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
@@ -202151,57 +202151,13 @@ class IdeAi
202151
202151
  title: elem.getAttribute("title"),
202152
202152
  })*/
202153
202153
 
202154
- const initialProgressData = [
202155
- { id: '1', message: '메뉴와 테이블을 검색중입니다', completedMessage: '관련 메뉴와 테이블을 찾았습니다.' }
202156
- ];
202157
- if (apply.mybatis) {
202158
- initialProgressData.push({ id: '2', message: 'MyBatis 소스파일을 생성중입니다', completedMessage: 'MyBatis 소스파일을 생성했습니다.' });
202159
- }
202160
- if (apply.service) {
202161
- initialProgressData.push({ id: '3', message: 'Java(Service) 소스파일을 생성중입니다', completedMessage: 'Java(Service) 소스파일을 생성했습니다.' });
202162
- }
202163
-
202164
- if (apply.controller) {
202165
- initialProgressData.push({ id: '4', message: 'Java(Controller) 소스파일을 생성중입니다', completedMessage: 'Java(Controller) 소스파일을 생성했습니다.' });
202166
- }
202167
-
202168
- if (apply.javascript) {
202169
- initialProgressData.push({ id: '5', message: 'Jsx(React) 소스파일을 생성중입니다', completedMessage: 'Jsx(React) 소스파일을 생성했습니다.' });
202170
- }
202171
-
202172
- const elAiChat = this.#parent.shadowRoot.querySelector("nx-ai-chat");
202173
- const progressMessageInstance = elAiChat.addProgress(initialProgressData);
202174
-
202175
-
202176
- // 2. 시간이 지난 후, 특정 단계의 완료를 알림
202177
- // 예를 들어, 3초 후에 분석 완료
202178
- setTimeout(() => {
202179
- if (progressMessageInstance) {
202180
- progressMessageInstance.updateProgress('1', 'completed');
202181
- console.log("분석 완료 메시지 업데이트");
202182
- }
202183
- }, 3000);
202184
-
202185
- // 예를 들어, 6초 후에 설계 완료
202186
- setTimeout(() => {
202187
- if (progressMessageInstance) {
202188
- progressMessageInstance.updateProgress('2', 'completed');
202189
- console.log("설계 완료 메시지 업데이트");
202190
- }
202191
- }, 6000);
202192
-
202193
- // 모든 단계가 완료된 후, 일반 AI 메시지 추가 (선택 사항)
202194
- setTimeout(() => {
202195
- elAiChat.add("ai", "모든 작업이 성공적으로 완료되었습니다!", [], []);
202196
- }, 9000);
202197
-
202198
-
202199
202154
 
202200
202155
 
202201
202156
 
202202
202157
 
202203
202158
  const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
202204
- this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
202159
+ //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
202160
+ progressMessageInstance.updateProgress('prepare2', 'completed');
202205
202161
 
202206
202162
  console.log(where);
202207
202163
 
@@ -202220,7 +202176,8 @@ class IdeAi
202220
202176
  namespace: srcPath.namespace,
202221
202177
  tableDefinitions: columnInfo,
202222
202178
  });
202223
- this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
202179
+ //this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
202180
+ progressMessageInstance.updateProgress('mybatis', 'completed');
202224
202181
  }
202225
202182
  else {
202226
202183
  mybatisXmlSource = src.mybatis;
@@ -202237,7 +202194,8 @@ class IdeAi
202237
202194
  package: srcPath.package + ".service",
202238
202195
  mybatisXmlSource: mybatisXmlSource,
202239
202196
  });
202240
- this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
202197
+ //this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
202198
+ progressMessageInstance.updateProgress('service', 'completed');
202241
202199
  }
202242
202200
  else {
202243
202201
  serviceSrc = src.service;
@@ -202254,6 +202212,7 @@ class IdeAi
202254
202212
  serviceSource: serviceSrc,
202255
202213
  });
202256
202214
  this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
202215
+ progressMessageInstance.updateProgress('controller', 'completed');
202257
202216
  }
202258
202217
  else {
202259
202218
  controllerSrc = src.controller;
@@ -202270,11 +202229,13 @@ class IdeAi
202270
202229
  tableDefinitions: columnInfo,
202271
202230
  });
202272
202231
  this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
202232
+ progressMessageInstance.updateProgress('javascript', 'completed');
202273
202233
  }
202274
202234
  else {
202275
202235
  src.javascript;
202276
202236
  }
202277
202237
  //console.log(src.javascript);
202238
+ //progressMessageInstance.updateProgress('javascript', 'completed');
202278
202239
 
202279
202240
  await this.#generateRealFile(srcPath, apply);
202280
202241
  };
@@ -202283,16 +202244,63 @@ class IdeAi
202283
202244
 
202284
202245
  this.#createModel();
202285
202246
 
202247
+ const initialProgressData = [
202248
+ { id: 'prepare1', message: '명령을 해석중입니다.', completedMessage: '명령을 해석했습니다.' },
202249
+ { id: 'prepare2', message: '메뉴와 테이블을 검색중입니다', completedMessage: '관련 메뉴와 테이블을 찾았습니다.' },
202250
+ ];
202251
+ if (apply.mybatis) {
202252
+ initialProgressData.push({ id: 'mybatis', message: 'MyBatis 소스파일을 생성중입니다', completedMessage: 'MyBatis 소스파일을 생성했습니다.' });
202253
+ }
202254
+ if (apply.service) {
202255
+ initialProgressData.push({ id: 'service', message: 'Java(Service) 소스파일을 생성중입니다', completedMessage: 'Java(Service) 소스파일을 생성했습니다.' });
202256
+ }
202257
+
202258
+ if (apply.controller) {
202259
+ initialProgressData.push({ id: 'controller', message: 'Java(Controller) 소스파일을 생성중입니다', completedMessage: 'Java(Controller) 소스파일을 생성했습니다.' });
202260
+ }
202261
+
202262
+ if (apply.javascript) {
202263
+ initialProgressData.push({ id: 'javascript', message: 'Jsx(React) 소스파일을 생성중입니다', completedMessage: 'Jsx(React) 소스파일을 생성했습니다.' });
202264
+ }
202265
+
202266
+ const elAiChat = this.#parent.shadowRoot.querySelector("nx-ai-chat");
202267
+ const progressMessageInstance = elAiChat.addProgress(initialProgressData);
202268
+
202269
+ /**
202270
+ // 2. 시간이 지난 후, 특정 단계의 완료를 알림
202271
+ // 예를 들어, 3초 후에 분석 완료
202272
+ setTimeout(() => {
202273
+ if (progressMessageInstance) {
202274
+ progressMessageInstance.updateProgress('1', 'completed');
202275
+ console.log("분석 완료 메시지 업데이트");
202276
+ }
202277
+ }, 3000);
202278
+
202279
+ // 예를 들어, 6초 후에 설계 완료
202280
+ setTimeout(() => {
202281
+ if (progressMessageInstance) {
202282
+ progressMessageInstance.updateProgress('2', 'completed');
202283
+ console.log("설계 완료 메시지 업데이트");
202284
+ }
202285
+ }, 6000);
202286
+
202287
+ // 모든 단계가 완료된 후, 일반 AI 메시지 추가 (선택 사항)
202288
+ setTimeout(() => {
202289
+ elAiChat.add("ai", "모든 작업이 성공적으로 완료되었습니다!", [], []);
202290
+ }, 9000);
202291
+ */
202292
+
202286
202293
  const what = await this.#what(userPrompt);
202287
- this.#parent.addMessage("명령을 이해했습니다.");
202294
+ //this.#parent.addMessage("명령을 이해했습니다.");
202295
+ progressMessageInstance.updateProgress('prepare1', 'completed');
202288
202296
 
202289
202297
  if (what === "1") {
202290
202298
  if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) ;
202291
202299
  //await this.#createSource(userPrompt, apply);
202292
- await this.#modifySource(userPrompt, apply);
202300
+ await this.#modifySource(userPrompt, apply, progressMessageInstance);
202293
202301
  }
202294
202302
  else if (what === "2") {
202295
- await this.#modifySource(userPrompt, apply);
202303
+ await this.#modifySource(userPrompt, apply, progressMessageInstance);
202296
202304
  }
202297
202305
 
202298
202306
  return "OK";
@@ -390,7 +390,7 @@ export class IdeAi
390
390
  await this.#generateRealFile(srcPath, apply);
391
391
  };
392
392
 
393
- #modifySource = async (userPrompt, apply) => {
393
+ #modifySource = async (userPrompt, apply, progressMessageInstance) => {
394
394
 
395
395
  const el = ninegrid.querySelector("nx-side-menu-item.active");
396
396
  if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
@@ -431,57 +431,13 @@ export class IdeAi
431
431
  title: elem.getAttribute("title"),
432
432
  })*/
433
433
 
434
- const initialProgressData = [
435
- { id: '1', message: '메뉴와 테이블을 검색중입니다', completedMessage: '관련 메뉴와 테이블을 찾았습니다.' }
436
- ];
437
- if (apply.mybatis) {
438
- initialProgressData.push({ id: '2', message: 'MyBatis 소스파일을 생성중입니다', completedMessage: 'MyBatis 소스파일을 생성했습니다.' });
439
- }
440
- if (apply.service) {
441
- initialProgressData.push({ id: '3', message: 'Java(Service) 소스파일을 생성중입니다', completedMessage: 'Java(Service) 소스파일을 생성했습니다.' });
442
- }
443
-
444
- if (apply.controller) {
445
- initialProgressData.push({ id: '4', message: 'Java(Controller) 소스파일을 생성중입니다', completedMessage: 'Java(Controller) 소스파일을 생성했습니다.' });
446
- }
447
-
448
- if (apply.javascript) {
449
- initialProgressData.push({ id: '5', message: 'Jsx(React) 소스파일을 생성중입니다', completedMessage: 'Jsx(React) 소스파일을 생성했습니다.' });
450
- }
451
-
452
- const elAiChat = this.#parent.shadowRoot.querySelector("nx-ai-chat");
453
- const progressMessageInstance = elAiChat.addProgress(initialProgressData);
454
-
455
-
456
- // 2. 시간이 지난 후, 특정 단계의 완료를 알림
457
- // 예를 들어, 3초 후에 분석 완료
458
- setTimeout(() => {
459
- if (progressMessageInstance) {
460
- progressMessageInstance.updateProgress('1', 'completed');
461
- console.log("분석 완료 메시지 업데이트");
462
- }
463
- }, 3000);
464
-
465
- // 예를 들어, 6초 후에 설계 완료
466
- setTimeout(() => {
467
- if (progressMessageInstance) {
468
- progressMessageInstance.updateProgress('2', 'completed');
469
- console.log("설계 완료 메시지 업데이트");
470
- }
471
- }, 6000);
472
-
473
- // 모든 단계가 완료된 후, 일반 AI 메시지 추가 (선택 사항)
474
- setTimeout(() => {
475
- elAiChat.add("ai", "모든 작업이 성공적으로 완료되었습니다!", [], []);
476
- }, 9000);
477
-
478
-
479
434
 
480
435
 
481
436
 
482
437
 
483
438
  const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
484
- this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
439
+ //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
440
+ progressMessageInstance.updateProgress('prepare2', 'completed');
485
441
 
486
442
  console.log(where);
487
443
 
@@ -500,7 +456,8 @@ export class IdeAi
500
456
  namespace: srcPath.namespace,
501
457
  tableDefinitions: columnInfo,
502
458
  });
503
- this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
459
+ //this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
460
+ progressMessageInstance.updateProgress('mybatis', 'completed');
504
461
  }
505
462
  else {
506
463
  mybatisXmlSource = src.mybatis;
@@ -517,7 +474,8 @@ export class IdeAi
517
474
  package: srcPath.package + ".service",
518
475
  mybatisXmlSource: mybatisXmlSource,
519
476
  });
520
- this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
477
+ //this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
478
+ progressMessageInstance.updateProgress('service', 'completed');
521
479
  }
522
480
  else {
523
481
  serviceSrc = src.service;
@@ -534,6 +492,7 @@ export class IdeAi
534
492
  serviceSource: serviceSrc,
535
493
  });
536
494
  this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
495
+ progressMessageInstance.updateProgress('controller', 'completed');
537
496
  }
538
497
  else {
539
498
  controllerSrc = src.controller;
@@ -552,11 +511,13 @@ export class IdeAi
552
511
  tableDefinitions: columnInfo,
553
512
  });
554
513
  this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
514
+ progressMessageInstance.updateProgress('javascript', 'completed');
555
515
  }
556
516
  else {
557
517
  jsSrc = src.javascript;
558
518
  }
559
519
  //console.log(src.javascript);
520
+ //progressMessageInstance.updateProgress('javascript', 'completed');
560
521
 
561
522
  await this.#generateRealFile(srcPath, apply);
562
523
  };
@@ -565,18 +526,65 @@ export class IdeAi
565
526
 
566
527
  this.#createModel();
567
528
 
529
+ const initialProgressData = [
530
+ { id: 'prepare1', message: '명령을 해석중입니다.', completedMessage: '명령을 해석했습니다.' },
531
+ { id: 'prepare2', message: '메뉴와 테이블을 검색중입니다', completedMessage: '관련 메뉴와 테이블을 찾았습니다.' },
532
+ ];
533
+ if (apply.mybatis) {
534
+ initialProgressData.push({ id: 'mybatis', message: 'MyBatis 소스파일을 생성중입니다', completedMessage: 'MyBatis 소스파일을 생성했습니다.' });
535
+ }
536
+ if (apply.service) {
537
+ initialProgressData.push({ id: 'service', message: 'Java(Service) 소스파일을 생성중입니다', completedMessage: 'Java(Service) 소스파일을 생성했습니다.' });
538
+ }
539
+
540
+ if (apply.controller) {
541
+ initialProgressData.push({ id: 'controller', message: 'Java(Controller) 소스파일을 생성중입니다', completedMessage: 'Java(Controller) 소스파일을 생성했습니다.' });
542
+ }
543
+
544
+ if (apply.javascript) {
545
+ initialProgressData.push({ id: 'javascript', message: 'Jsx(React) 소스파일을 생성중입니다', completedMessage: 'Jsx(React) 소스파일을 생성했습니다.' });
546
+ }
547
+
548
+ const elAiChat = this.#parent.shadowRoot.querySelector("nx-ai-chat");
549
+ const progressMessageInstance = elAiChat.addProgress(initialProgressData);
550
+
551
+ /**
552
+ // 2. 시간이 지난 후, 특정 단계의 완료를 알림
553
+ // 예를 들어, 3초 후에 분석 완료
554
+ setTimeout(() => {
555
+ if (progressMessageInstance) {
556
+ progressMessageInstance.updateProgress('1', 'completed');
557
+ console.log("분석 완료 메시지 업데이트");
558
+ }
559
+ }, 3000);
560
+
561
+ // 예를 들어, 6초 후에 설계 완료
562
+ setTimeout(() => {
563
+ if (progressMessageInstance) {
564
+ progressMessageInstance.updateProgress('2', 'completed');
565
+ console.log("설계 완료 메시지 업데이트");
566
+ }
567
+ }, 6000);
568
+
569
+ // 모든 단계가 완료된 후, 일반 AI 메시지 추가 (선택 사항)
570
+ setTimeout(() => {
571
+ elAiChat.add("ai", "모든 작업이 성공적으로 완료되었습니다!", [], []);
572
+ }, 9000);
573
+ */
574
+
568
575
  const what = await this.#what(userPrompt);
569
- this.#parent.addMessage("명령을 이해했습니다.");
576
+ //this.#parent.addMessage("명령을 이해했습니다.");
577
+ progressMessageInstance.updateProgress('prepare1', 'completed');
570
578
 
571
579
  if (what === "1") {
572
580
  if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) {
573
581
  //return "소스 생성하실려면 변경대상 소스를 모두 선택하세요.";
574
582
  }
575
583
  //await this.#createSource(userPrompt, apply);
576
- await this.#modifySource(userPrompt, apply);
584
+ await this.#modifySource(userPrompt, apply, progressMessageInstance);
577
585
  }
578
586
  else if (what === "2") {
579
- await this.#modifySource(userPrompt, apply);
587
+ await this.#modifySource(userPrompt, apply, progressMessageInstance);
580
588
  }
581
589
 
582
590
  return "OK";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ide-assi",
3
3
  "type": "module",
4
- "version": "0.449.0",
4
+ "version": "0.452.0",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
7
7
  "exports": {
@@ -390,7 +390,7 @@ export class IdeAi
390
390
  await this.#generateRealFile(srcPath, apply);
391
391
  };
392
392
 
393
- #modifySource = async (userPrompt, apply) => {
393
+ #modifySource = async (userPrompt, apply, progressMessageInstance) => {
394
394
 
395
395
  const el = ninegrid.querySelector("nx-side-menu-item.active");
396
396
  if (!el) throw new Error("관련 메뉴를 찾을 수 없습니다.");
@@ -431,57 +431,13 @@ export class IdeAi
431
431
  title: elem.getAttribute("title"),
432
432
  })*/
433
433
 
434
- const initialProgressData = [
435
- { id: '1', message: '메뉴와 테이블을 검색중입니다', completedMessage: '관련 메뉴와 테이블을 찾았습니다.' }
436
- ];
437
- if (apply.mybatis) {
438
- initialProgressData.push({ id: '2', message: 'MyBatis 소스파일을 생성중입니다', completedMessage: 'MyBatis 소스파일을 생성했습니다.' });
439
- }
440
- if (apply.service) {
441
- initialProgressData.push({ id: '3', message: 'Java(Service) 소스파일을 생성중입니다', completedMessage: 'Java(Service) 소스파일을 생성했습니다.' });
442
- }
443
-
444
- if (apply.controller) {
445
- initialProgressData.push({ id: '4', message: 'Java(Controller) 소스파일을 생성중입니다', completedMessage: 'Java(Controller) 소스파일을 생성했습니다.' });
446
- }
447
-
448
- if (apply.javascript) {
449
- initialProgressData.push({ id: '5', message: 'Jsx(React) 소스파일을 생성중입니다', completedMessage: 'Jsx(React) 소스파일을 생성했습니다.' });
450
- }
451
-
452
- const elAiChat = this.#parent.shadowRoot.querySelector("nx-ai-chat");
453
- const progressMessageInstance = elAiChat.addProgress(initialProgressData);
454
-
455
-
456
- // 2. 시간이 지난 후, 특정 단계의 완료를 알림
457
- // 예를 들어, 3초 후에 분석 완료
458
- setTimeout(() => {
459
- if (progressMessageInstance) {
460
- progressMessageInstance.updateProgress('1', 'completed');
461
- console.log("분석 완료 메시지 업데이트");
462
- }
463
- }, 3000);
464
-
465
- // 예를 들어, 6초 후에 설계 완료
466
- setTimeout(() => {
467
- if (progressMessageInstance) {
468
- progressMessageInstance.updateProgress('2', 'completed');
469
- console.log("설계 완료 메시지 업데이트");
470
- }
471
- }, 6000);
472
-
473
- // 모든 단계가 완료된 후, 일반 AI 메시지 추가 (선택 사항)
474
- setTimeout(() => {
475
- elAiChat.add("ai", "모든 작업이 성공적으로 완료되었습니다!", [], []);
476
- }, 9000);
477
-
478
-
479
434
 
480
435
 
481
436
 
482
437
 
483
438
  const where = await this.#where(`${title}에서 ${userPrompt}`, [{url: href, title: title}], await this.#getTableList());
484
- this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.")
439
+ //this.#parent.addMessage("대상 메뉴와 테이블을 찾았습니다.");
440
+ progressMessageInstance.updateProgress('prepare2', 'completed');
485
441
 
486
442
  console.log(where);
487
443
 
@@ -500,7 +456,8 @@ export class IdeAi
500
456
  namespace: srcPath.namespace,
501
457
  tableDefinitions: columnInfo,
502
458
  });
503
- this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
459
+ //this.#parent.addMessage("MyBatis 소스파일을 생성했습니다.");
460
+ progressMessageInstance.updateProgress('mybatis', 'completed');
504
461
  }
505
462
  else {
506
463
  mybatisXmlSource = src.mybatis;
@@ -517,7 +474,8 @@ export class IdeAi
517
474
  package: srcPath.package + ".service",
518
475
  mybatisXmlSource: mybatisXmlSource,
519
476
  });
520
- this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
477
+ //this.#parent.addMessage("Java(Service) 소스파일을 생성했습니다.");
478
+ progressMessageInstance.updateProgress('service', 'completed');
521
479
  }
522
480
  else {
523
481
  serviceSrc = src.service;
@@ -534,6 +492,7 @@ export class IdeAi
534
492
  serviceSource: serviceSrc,
535
493
  });
536
494
  this.#parent.addMessage("Java(Controller) 소스파일을 생성했습니다.");
495
+ progressMessageInstance.updateProgress('controller', 'completed');
537
496
  }
538
497
  else {
539
498
  controllerSrc = src.controller;
@@ -552,11 +511,13 @@ export class IdeAi
552
511
  tableDefinitions: columnInfo,
553
512
  });
554
513
  this.#parent.addMessage("Jsx(React) 소스파일을 생성했습니다.");
514
+ progressMessageInstance.updateProgress('javascript', 'completed');
555
515
  }
556
516
  else {
557
517
  jsSrc = src.javascript;
558
518
  }
559
519
  //console.log(src.javascript);
520
+ //progressMessageInstance.updateProgress('javascript', 'completed');
560
521
 
561
522
  await this.#generateRealFile(srcPath, apply);
562
523
  };
@@ -565,18 +526,65 @@ export class IdeAi
565
526
 
566
527
  this.#createModel();
567
528
 
529
+ const initialProgressData = [
530
+ { id: 'prepare1', message: '명령을 해석중입니다.', completedMessage: '명령을 해석했습니다.' },
531
+ { id: 'prepare2', message: '메뉴와 테이블을 검색중입니다', completedMessage: '관련 메뉴와 테이블을 찾았습니다.' },
532
+ ];
533
+ if (apply.mybatis) {
534
+ initialProgressData.push({ id: 'mybatis', message: 'MyBatis 소스파일을 생성중입니다', completedMessage: 'MyBatis 소스파일을 생성했습니다.' });
535
+ }
536
+ if (apply.service) {
537
+ initialProgressData.push({ id: 'service', message: 'Java(Service) 소스파일을 생성중입니다', completedMessage: 'Java(Service) 소스파일을 생성했습니다.' });
538
+ }
539
+
540
+ if (apply.controller) {
541
+ initialProgressData.push({ id: 'controller', message: 'Java(Controller) 소스파일을 생성중입니다', completedMessage: 'Java(Controller) 소스파일을 생성했습니다.' });
542
+ }
543
+
544
+ if (apply.javascript) {
545
+ initialProgressData.push({ id: 'javascript', message: 'Jsx(React) 소스파일을 생성중입니다', completedMessage: 'Jsx(React) 소스파일을 생성했습니다.' });
546
+ }
547
+
548
+ const elAiChat = this.#parent.shadowRoot.querySelector("nx-ai-chat");
549
+ const progressMessageInstance = elAiChat.addProgress(initialProgressData);
550
+
551
+ /**
552
+ // 2. 시간이 지난 후, 특정 단계의 완료를 알림
553
+ // 예를 들어, 3초 후에 분석 완료
554
+ setTimeout(() => {
555
+ if (progressMessageInstance) {
556
+ progressMessageInstance.updateProgress('1', 'completed');
557
+ console.log("분석 완료 메시지 업데이트");
558
+ }
559
+ }, 3000);
560
+
561
+ // 예를 들어, 6초 후에 설계 완료
562
+ setTimeout(() => {
563
+ if (progressMessageInstance) {
564
+ progressMessageInstance.updateProgress('2', 'completed');
565
+ console.log("설계 완료 메시지 업데이트");
566
+ }
567
+ }, 6000);
568
+
569
+ // 모든 단계가 완료된 후, 일반 AI 메시지 추가 (선택 사항)
570
+ setTimeout(() => {
571
+ elAiChat.add("ai", "모든 작업이 성공적으로 완료되었습니다!", [], []);
572
+ }, 9000);
573
+ */
574
+
568
575
  const what = await this.#what(userPrompt);
569
- this.#parent.addMessage("명령을 이해했습니다.");
576
+ //this.#parent.addMessage("명령을 이해했습니다.");
577
+ progressMessageInstance.updateProgress('prepare1', 'completed');
570
578
 
571
579
  if (what === "1") {
572
580
  if (!apply.mybatis || !apply.service || !apply.controller || !apply.javascript) {
573
581
  //return "소스 생성하실려면 변경대상 소스를 모두 선택하세요.";
574
582
  }
575
583
  //await this.#createSource(userPrompt, apply);
576
- await this.#modifySource(userPrompt, apply);
584
+ await this.#modifySource(userPrompt, apply, progressMessageInstance);
577
585
  }
578
586
  else if (what === "2") {
579
- await this.#modifySource(userPrompt, apply);
587
+ await this.#modifySource(userPrompt, apply, progressMessageInstance);
580
588
  }
581
589
 
582
590
  return "OK";