@nine-lab/nine-mu 0.1.326 → 0.1.328

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.
@@ -248,169 +248,6 @@
248
248
  }
249
249
 
250
250
 
251
- :host(nx-ai-message) {
252
- display: flex;
253
- justify-content: flex-start;
254
- padding: 5px;
255
- flex-direction: column;
256
-
257
- .chat-message {
258
- max-width: 70%;
259
- border-radius: 8px;
260
- font-size: 14px;
261
- background-color: #fff;
262
- color: black;
263
- align-self: flex-start;
264
- text-align: left;
265
- position: relative;
266
- box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.15);
267
- text-overflow: ellipsis;
268
- padding: 8px 16px;
269
- display: flex;
270
- align-items: center;
271
-
272
- div.message {
273
- display: contents;
274
- -webkit-line-clamp: 3;
275
- -webkit-box-orient: vertical;
276
- overflow: hidden;
277
- padding: 0;
278
- flex-grow: 1;
279
- /* 줄바꿈 강제 적용 */
280
- /**word-wrap: break-word;*/ /* 긴 단어를 줄바꿈 */
281
- overflow-wrap: anywhere; /* 텍스트 길이에 따라 자동 줄바꿈 */
282
- white-space: normal; /* 공백 처리 */
283
- }
284
-
285
- span.more {
286
- display: none;
287
- right: 4px;
288
- bottom: 0px;
289
- font-size: 9px;
290
- font-weight: 700;
291
-
292
- a {
293
- position: relative;
294
- color: green;
295
- text-decoration: none;
296
- }
297
-
298
- a::after {
299
- content: "";
300
- position: absolute;
301
- left: 0;
302
- bottom: -2px;
303
- width: 100%;
304
- height: 2px;
305
- background-color: green;
306
- transform: scaleX(0);
307
- transition: transform 0.3s ease-in-out;
308
- }
309
-
310
- a:hover::after {
311
- transform: scaleX(1);
312
- }
313
- }
314
- }
315
-
316
- .grid {
317
- margin-top: 8px;
318
- }
319
-
320
- .chat-menu {
321
- display: flex;
322
- justify-content: space-between; /* 좌우 정렬 */
323
- align-items: center; /* 세로 중앙 정렬 */
324
- width: 100%;
325
- margin-top: 2px;
326
-
327
- .left-menu{
328
- display: flex;
329
- gap: 4px;
330
-
331
- .filter.disabled, .database.disabled {
332
- pointer-events: none;
333
- color: #ccc;
334
- }
335
-
336
- .filter, .database, .excel, .maximize {
337
- margin-left: 0;
338
- cursor: pointer;
339
- color: #999;
340
- width: 16px;
341
- height: 16px;
342
- background-repeat: no-repeat;
343
- background-position: center;
344
- background-size: auto;
345
- }
346
-
347
- .filter svg {
348
- color: #999;
349
- }
350
-
351
- .filter:hover, .database:hover, .excel:hover, .maximize:hover {
352
- color: green;
353
- }
354
-
355
- .filter {
356
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="gray" viewBox="0 0 16 16"><path d="M1.5 1.5A.5.5 0 0 1 2 1h12a.5.5 0 0 1 .5.5v2a.5.5 0 0 1-.128.334L10 8.692V13.5a.5.5 0 0 1-.342.474l-3 1A.5.5 0 0 1 6 14.5V8.692L1.628 3.834A.5.5 0 0 1 1.5 3.5zm1 .5v1.308l4.372 4.858A.5.5 0 0 1 7 8.5v5.306l2-.666V8.5a.5.5 0 0 1 .128-.334L13.5 3.308V2z"/></svg>');
357
- }
358
- .database {
359
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="gray" viewBox="0 0 16 16"><path d="M4.318 2.687C5.234 2.271 6.536 2 8 2s2.766.27 3.682.687C12.644 3.125 13 3.627 13 4c0 .374-.356.875-1.318 1.313C10.766 5.729 9.464 6 8 6s-2.766-.27-3.682-.687C3.356 4.875 3 4.373 3 4c0-.374.356-.875 1.318-1.313M13 5.698V7c0 .374-.356.875-1.318 1.313C10.766 8.729 9.464 9 8 9s-2.766-.27-3.682-.687C3.356 7.875 3 7.373 3 7V5.698c.271.202.58.378.904.525C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777A5 5 0 0 0 13 5.698M14 4c0-1.007-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1s-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4v9c0 1.007.875 1.755 1.904 2.223C4.978 15.71 6.427 16 8 16s3.022-.289 4.096-.777C13.125 14.755 14 14.007 14 13zm-1 4.698V10c0 .374-.356.875-1.318 1.313C10.766 11.729 9.464 12 8 12s-2.766-.27-3.682-.687C3.356 10.875 3 10.373 3 10V8.698c.271.202.58.378.904.525C4.978 9.71 6.427 10 8 10s3.022-.289 4.096-.777A5 5 0 0 0 13 8.698m0 3V13c0 .374-.356.875-1.318 1.313C10.766 14.729 9.464 15 8 15s-2.766-.27-3.682-.687C3.356 13.875 3 13.373 3 13v-1.302c.271.202.58.378.904.525C4.978 12.71 6.427 13 8 13s3.022-.289 4.096-.777c.324-.147.633-.323.904-.525"/></svg>');
360
- }
361
- .excel {
362
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="gray" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M14 4.5V14a2 2 0 0 1-2 2h-1v-1h1a1 1 0 0 0 1-1V4.5h-2A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v9H2V2a2 2 0 0 1 2-2h5.5zM6.472 15.29a1.2 1.2 0 0 1-.111-.449h.765a.58.58 0 0 0 .254.384q.106.073.25.114.143.041.319.041.246 0 .413-.07a.56.56 0 0 0 .255-.193.5.5 0 0 0 .085-.29.39.39 0 0 0-.153-.326q-.152-.12-.462-.193l-.619-.143a1.7 1.7 0 0 1-.539-.214 1 1 0 0 1-.351-.367 1.1 1.1 0 0 1-.123-.524q0-.366.19-.639.19-.272.527-.422.338-.15.777-.149.457 0 .78.152.324.153.5.41.18.255.2.566h-.75a.56.56 0 0 0-.12-.258.6.6 0 0 0-.247-.181.9.9 0 0 0-.369-.068q-.325 0-.513.152a.47.47 0 0 0-.184.384q0 .18.143.3a1 1 0 0 0 .405.175l.62.143q.326.075.566.211a1 1 0 0 1 .375.358q.135.222.135.56 0 .37-.188.656a1.2 1.2 0 0 1-.539.439q-.351.158-.858.158-.381 0-.665-.09a1.4 1.4 0 0 1-.478-.252 1.1 1.1 0 0 1-.29-.375m-2.945-3.358h-.893L1.81 13.37h-.036l-.832-1.438h-.93l1.227 1.983L0 15.931h.861l.853-1.415h.035l.85 1.415h.908L2.253 13.94zm2.727 3.325H4.557v-3.325h-.79v4h2.487z"/></svg>');
363
- }
364
- .maximize {
365
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="gray" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M5.828 10.172a.5.5 0 0 0-.707 0l-4.096 4.096V11.5a.5.5 0 0 0-1 0v3.975a.5.5 0 0 0 .5.5H4.5a.5.5 0 0 0 0-1H1.732l4.096-4.096a.5.5 0 0 0 0-.707m4.344 0a.5.5 0 0 1 .707 0l4.096 4.096V11.5a.5.5 0 1 1 1 0v3.975a.5.5 0 0 1-.5.5H11.5a.5.5 0 0 1 0-1h2.768l-4.096-4.096a.5.5 0 0 1 0-.707m0-4.344a.5.5 0 0 0 .707 0l4.096-4.096V4.5a.5.5 0 1 0 1 0V.525a.5.5 0 0 0-.5-.5H11.5a.5.5 0 0 0 0 1h2.768l-4.096 4.096a.5.5 0 0 0 0 .707m-4.344 0a.5.5 0 0 1-.707 0L1.025 1.732V4.5a.5.5 0 0 1-1 0V.525a.5.5 0 0 1 .5-.5H4.5a.5.5 0 0 1 0 1H1.732l4.096 4.096a.5.5 0 0 1 0 .707"/></svg>');
366
- }
367
- }
368
- }
369
- }
370
-
371
-
372
- :host(nx-ai-ing-message) {
373
- display: flex;
374
- justify-content: flex-start;
375
- padding: 0;
376
-
377
- .chat-message {
378
- padding: 0px 8px;
379
- color: #999;
380
- align-self: flex-start;
381
- text-align: left;
382
- position: relative;
383
- font-size: 32px;
384
- font-weight: bold;
385
- }
386
- }
387
-
388
-
389
- :host(nx-ai-my-message) {
390
- display: flex;
391
- justify-content: flex-end;
392
- padding: 5px;
393
-
394
- .chat-message {
395
- max-width: 70%;
396
- padding: 8px 16px;
397
- border-radius: 8px;
398
- font-size: 14px;
399
- background-color: #fef01b;
400
- text-align: left;
401
- color: #333;
402
- align-self: flex-end;
403
- position: relative;
404
- box-shadow: 1px 1px 4px rgba(0, 0, 0, 0.15);
405
- }
406
- }
407
-
408
- :host(nx-ai-chat) {
409
- width: 100%;
410
- height: 100%;
411
- overflow: scroll;
412
- }
413
-
414
251
 
415
252
 
416
253
 
@@ -512,147 +349,6 @@
512
349
  animation: slideRight 0.3s ease-out forwards;
513
350
  }
514
351
 
515
- :host(nine-ai-diff-popup) {
516
-
517
- div.buttons {
518
- position: absolute;
519
- right: 16px;
520
- /* width: 100px; */
521
- display: flex;
522
- flex-direction: row;
523
- justify-content: flex-end;
524
- z-index: 1;
525
- }
526
-
527
- button.save {
528
- cursor: pointer;
529
- outline: none;
530
- }
531
- }
532
-
533
- :host(nine-ai-diff) {
534
- width: 100%;
535
- height: 100%;
536
-
537
- .wrapper {
538
- display: flex;
539
- position: relative;
540
- --gap: 8px;
541
- --font-family: monospace;
542
- height: 100%;
543
- }
544
- .panel {
545
- width: 50%;
546
- border: 1px solid #ccc;
547
- --padding: 8px;
548
- overflow: auto;
549
- white-space: pre-wrap;
550
- text-align: left;
551
- display: flex;
552
- justify-content: flex-start; /* 좌측 정렬 */
553
- align-items: flex-start; /* 상단 정렬 */
554
- flex-direction: column;
555
- box-sizing: border-box;
556
- }
557
- .panel pre {
558
- margin: 0;
559
- --padding: 8px;
560
- text-align: left;
561
- white-space: pre-wrap;
562
- word-break: break-word;
563
- }
564
-
565
- .cm-editor {
566
- height: 100%;
567
- width: 100%;
568
- --padding-left: 80px;
569
- }
570
- .cm-content { /* CodeMirror 텍스트 내용을 감싸는 내부 div */
571
- }
572
- /* 각 라인에 버튼 공간 확보 */
573
-
574
- /* ideDiff.css */
575
-
576
- /* 기본적인 CodeMirror 라인 포지셔닝 */
577
- .cm-line {
578
- position: relative;
579
- --display: flex;
580
- padding-left: 18px;
581
- }
582
-
583
- /* 병합 버튼 컨테이너 */
584
- .cm-merge-button-container {
585
- position: absolute;
586
- height: 16px;
587
- width: 16px; /* 버튼 너비 고정으로 겹침 방지 */
588
- left: 2px; /* 라인 번호 영역 바로 옆에 배치. 필요에 따라 조절하세요. */
589
- top: 50%;
590
- transform: translateY(-50%);
591
- --z-index: 1; /* 다른 요소 위에 표시되도록 Z-index를 높게 설정 */
592
- display: flex;
593
- --gap: 5px;
594
- justify-content: center; /* 버튼 중앙 정렬 */
595
- }
596
-
597
- /* 병합 버튼 기본 스타일 */
598
- .cm-merge-button {
599
- --margin: 2px 0;
600
- width: 100%;
601
- border: none;
602
- border-radius: 3px;
603
- cursor: pointer;
604
- opacity: 0.7; /* 기본적으로 약간 투명하게 */
605
- transition: opacity 0.2s ease-in-out; /* 호버 시 부드러운 전환 */
606
- background-repeat: no-repeat;
607
- background-position: center;
608
- background-size: auto;
609
- }
610
-
611
- /* 호버 시 버튼 불투명도 증가 */
612
- .cm-merge-button:hover {
613
- opacity: 1;
614
- background-color: #e0e0e0;
615
- }
616
-
617
- /* AI 추천을 현재 소스에 '적용'하는 버튼 (오른쪽 TOBE 에디터에 붙음) */
618
- .cm-merge-button.accept {
619
- background-color: #4CAF50; /* 녹색 */
620
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-arrow-left-short" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M12 8a.5.5 0 0 1-.5.5H5.707l2.147 2.146a.5.5 0 0 1-.708.708l-3-3a.5.5 0 0 1 0-.708l3-3a.5.5 0 1 1 .708.708L5.707 7.5H11.5a.5.5 0 0 1 .5.5"/></svg>');
621
- }
622
-
623
- /* AI의 삭제를 현재 소스 기준으로 '되돌리는' 버튼 (왼쪽 ASIS 에디터에 붙음) */
624
- .cm-merge-button.revert {
625
- background-color: #f44336; /* 빨간색 */
626
- background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" class="bi bi-x" viewBox="0 0 16 16"><path d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708"/></svg>');
627
- }
628
-
629
- /* 삽입된 라인 (AI 추천 소스에 새로 추가된 라인) 배경색 및 경계선 */
630
- .cm-inserted-line-bg {
631
- background-color: #e6ffed; /* 연한 녹색 */
632
- --border-left: 3px solid #66bb6a; /* 진한 녹색 */
633
- }
634
-
635
- /* 삭제된 라인 (현재 소스에서 AI가 삭제한 것으로 판단된 라인) 배경색 및 경계선 */
636
- .cm-deleted-line-bg {
637
- background-color: #ffebe9; /* 연한 빨간색 */
638
- --border-left: 3px solid #ef5350; /* 진한 빨간색 */
639
- }
640
-
641
- /* CodeMirror 선택 영역 배경색 */
642
- .cm-selectionBackground {
643
- background-color: #d7d4f9 !important; /* 보라색 계열 */
644
- }
645
-
646
- /* 텍스트 선택 시 배경색 (브라우저 기본 선택색 재정의) */
647
- .cm-editor ::selection {
648
- background-color: #d7d4f9 !important;
649
- color: inherit !important; /* 텍스트 색상은 유지 */
650
- }
651
- .cm-editor::-moz-selection { /* Firefox를 위한 접두사 */
652
- background-color: #d7d4f9 !important;
653
- color: inherit !important;
654
- }
655
- }
656
352
 
657
353
  @keyframes slide {
658
354
  0% { left: -40%; }
package/dist/nine-mu.js CHANGED
@@ -9,7 +9,7 @@ var __privateGet = (obj, member, getter) => (__accessCheck(obj, member, "read fr
9
9
  var __privateAdd = (obj, member, value) => member.has(obj) ? __typeError("Cannot add the same private member more than once") : member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
10
10
  var __privateSet = (obj, member, value, setter) => (__accessCheck(obj, member, "write to private field"), setter ? setter.call(obj, value) : member.set(obj, value), value);
11
11
  var __privateMethod = (obj, member, method) => (__accessCheck(obj, member, "access private method"), method);
12
- var _owner, _manager, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _openRouteDiffPopup, _generateSource, _generateMenu, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager2, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _isDirty, _initialAsisSrc, _initialTobeSrc, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _checkDirtyState, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
12
+ var _owner, _collectedFiles, _NotificationHandler_instances, handleLoggingMessage_fn, _collectModifySource, _openDiffPopup, _openRouteDiffPopup, _generateSource, _generateMenu, _mcpClient, _onAction, _onStatus, _onMessage, _owner2, _routeUrl, _chatHistory, _notiHandler, _NineChatManager_instances, connect_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _packageName, _routesPath, _connectorUrl, _manager, _config, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _sourceGenHandler, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _isDirty, _initialAsisSrc, _initialTobeSrc, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _checkDirtyState, _setupScrollSync, _applyDiffDecorations, _dialog, _tabContainer, _fileList, _host, _NineDiffPopup_instances, renderScaffolding_fn, handleConfirmAll_fn, handleCancel_fn, _dialog2, _diffView, _asisBackup, _host2, _NineMenuDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn2, _message, _data, _unique, _init, _message2, _init2, _progressData, _progressElements, _animationIntervals, _ProgressMessage_instances, updateCurrentActiveProgress_fn, renderProgress_fn, updateProgressItemVisuals_fn, startAnimation_fn, updateProgressItem_fn, _renderer, _init3;
13
13
  import { trace as trace$1, api, nine as nine$1 } from "@nine-lab/nine-util";
14
14
  class Trace extends trace$1.constructor {
15
15
  constructor() {
@@ -17080,7 +17080,6 @@ class NotificationHandler {
17080
17080
  constructor(owner) {
17081
17081
  __privateAdd(this, _NotificationHandler_instances);
17082
17082
  __privateAdd(this, _owner);
17083
- __privateAdd(this, _manager);
17084
17083
  __privateAdd(this, _collectedFiles, []);
17085
17084
  /**
17086
17085
  * 레이어별로 순차 도착하는 파일들을 유실 없이 배열 버퍼에 수집
@@ -17137,7 +17136,7 @@ class NotificationHandler {
17137
17136
  const hasUpdated = data.some((item) => item.action === "UPDATE");
17138
17137
  const hasDeleted = data.some((item) => item.action === "DELETE");
17139
17138
  if (hasUpdated || hasCreated || hasDeleted) {
17140
- const asis = await __privateGet(this, _manager).getRoutes();
17139
+ const asis = await __privateGet(this, _owner).manager.getRoutes();
17141
17140
  nine.alert("메뉴 정리를 위한 라우터 정보 저장 화면으로 이동합니다.").then((res) => {
17142
17141
  const tobe = (data || []).filter((item) => item.action !== "DELETE").map(({ isNew, action, ...rest }) => rest);
17143
17142
  __privateGet(this, _openRouteDiffPopup).call(this, asis, tobe, "json");
@@ -17145,7 +17144,6 @@ class NotificationHandler {
17145
17144
  }
17146
17145
  });
17147
17146
  __privateSet(this, _owner, owner);
17148
- __privateSet(this, _manager, new NineChatManager(owner));
17149
17147
  }
17150
17148
  /**
17151
17149
  * MCP로부터 수신된 날것의 노티파이 데이터를 정석대로 라우팅하는 메인 메서드
@@ -17158,25 +17156,24 @@ class NotificationHandler {
17158
17156
  }
17159
17157
  }
17160
17158
  _owner = new WeakMap();
17161
- _manager = new WeakMap();
17162
17159
  _collectedFiles = new WeakMap();
17163
17160
  _NotificationHandler_instances = new WeakSet();
17164
17161
  /**
17165
17162
  * [분리 비즈니스 로직 1] 로깅 및 UI 메시지 출력 제어
17166
17163
  */
17167
17164
  handleLoggingMessage_fn = function(params) {
17165
+ var _a2, _b;
17168
17166
  const { message, data, logger } = params;
17169
17167
  if (message) {
17170
17168
  __privateGet(this, _owner).addMessage("ai", message);
17171
17169
  __privateGet(this, _owner).addMessage("ing", "");
17172
17170
  }
17173
- const runAction = {
17171
+ (_b = (_a2 = {
17174
17172
  "generate-menu-completed": () => __privateGet(this, _generateMenu).call(this, data),
17175
17173
  "generate-source-brain": () => __privateGet(this, _generateSource).call(this, data),
17176
17174
  "modify-source-brain": () => __privateGet(this, _collectModifySource).call(this, data),
17177
17175
  "modify-source-brain-completed": () => __privateGet(this, _openDiffPopup).call(this)
17178
- }[logger];
17179
- runAction == null ? void 0 : runAction();
17176
+ })[logger]) == null ? void 0 : _b.call(_a2);
17180
17177
  };
17181
17178
  _collectModifySource = new WeakMap();
17182
17179
  _openDiffPopup = new WeakMap();
@@ -17441,43 +17438,17 @@ class NineChat extends HTMLElement {
17441
17438
  __privateAdd(this, _packageName);
17442
17439
  __privateAdd(this, _routesPath);
17443
17440
  __privateAdd(this, _connectorUrl);
17444
- __privateAdd(this, _manager2);
17441
+ __privateAdd(this, _manager);
17445
17442
  __privateAdd(this, _config);
17446
17443
  __privateAdd(this, _$nineChatMessage);
17447
17444
  __publicField(this, "addMessage", (who, message) => {
17448
17445
  __privateGet(this, _$nineChatMessage).add(who, message);
17449
17446
  });
17450
- __privateAdd(this, _makeMenuHandler, async (e) => {
17451
- const prompt = await nine$1.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.").rgb();
17452
- if (prompt === null || prompt === void 0) return;
17453
- const res = await api.post(`/nine-mu/source/readFile`, { path: __privateGet(this, _routesPath) });
17454
- trace.log(res);
17455
- if (!res || !(res == null ? void 0 : res.contents)) return;
17456
- const jsonRoutes = (res == null ? void 0 : res.contents) ? JSON.parse(res == null ? void 0 : res.contents) : {};
17457
- trace.log(jsonRoutes);
17458
- const res2 = await api.post(`${__privateGet(this, _connectorUrl)}/api/source/missing`, {
17459
- routes: jsonRoutes,
17460
- prompt
17461
- });
17462
- if (res2.success && (res2 == null ? void 0 : res2.tasks)) {
17463
- __privateGet(this, _showDiff).call(this, jsonRoutes, res2 == null ? void 0 : res2.tasks, "json");
17464
- }
17465
- });
17466
17447
  __privateAdd(this, _sourceGenHandler, async (e) => {
17467
- const routes = await __privateGet(this, _manager2).getRoutes();
17468
- const response = await __privateGet(this, _manager2).analyzeUnmappedRoutes(routes);
17448
+ const routes = await __privateGet(this, _manager).getRoutes();
17449
+ const response = await __privateGet(this, _manager).analyzeUnmappedRoutes(routes);
17469
17450
  trace.log(response);
17470
17451
  });
17471
- __privateAdd(this, _showDiff, (asis, tobe, lang) => {
17472
- const oldPopup = this.shadowRoot.querySelector("nine-menu-diff-popup");
17473
- if (oldPopup) {
17474
- oldPopup.remove();
17475
- }
17476
- const $diffPopup = document.createElement("nine-menu-diff-popup");
17477
- const container = this.shadowRoot.querySelector(".wrapper") || this.shadowRoot;
17478
- container.appendChild($diffPopup);
17479
- $diffPopup.popup().data(asis, tobe, lang);
17480
- });
17481
17452
  this.attachShadow({ mode: "open" });
17482
17453
  }
17483
17454
  get config() {
@@ -17494,20 +17465,23 @@ class NineChat extends HTMLElement {
17494
17465
  __privateSet(this, _config, res);
17495
17466
  __privateGet(this, _config).packageName = __privateGet(this, _packageName);
17496
17467
  __privateSet(this, _routesPath, (res == null ? void 0 : res.userDir) + "/" + __privateGet(this, _packageName) + "/public/prompts/data/routes.json");
17497
- __privateSet(this, _manager2, new NineChatManager(this));
17468
+ __privateSet(this, _manager, new NineChatManager(this));
17469
+ }
17470
+ get manager() {
17471
+ return __privateGet(this, _manager);
17498
17472
  }
17499
17473
  }
17500
17474
  _service = new WeakMap();
17501
17475
  _packageName = new WeakMap();
17502
17476
  _routesPath = new WeakMap();
17503
17477
  _connectorUrl = new WeakMap();
17504
- _manager2 = new WeakMap();
17478
+ _manager = new WeakMap();
17505
17479
  _config = new WeakMap();
17506
17480
  _$nineChatMessage = new WeakMap();
17507
17481
  _NineChat_instances = new WeakSet();
17508
17482
  // --- [그룹 1: Interaction] 화면 토글 및 메뉴 클릭 ---
17509
17483
  initInteractions_fn = function() {
17510
- var _a2, _b;
17484
+ var _a2;
17511
17485
  const $settings = this.shadowRoot.querySelector("nine-ai-settings");
17512
17486
  const $menuIcons = this.shadowRoot.querySelectorAll("menu .menu-icon");
17513
17487
  const toggleUI = () => this.classList.toggle("collapse");
@@ -17521,13 +17495,12 @@ initInteractions_fn = function() {
17521
17495
  $settings.classList.toggle("expand", clicked.classList.contains("menu-setting"));
17522
17496
  });
17523
17497
  });
17524
- (_a2 = this.shadowRoot.querySelector(".make-menu")) == null ? void 0 : _a2.addEventListener("click", __privateGet(this, _makeMenuHandler));
17525
- (_b = this.shadowRoot.querySelector(".source-gen")) == null ? void 0 : _b.addEventListener("click", __privateGet(this, _sourceGenHandler));
17498
+ (_a2 = this.shadowRoot.querySelector(".source-gen")) == null ? void 0 : _a2.addEventListener("click", __privateGet(this, _sourceGenHandler));
17526
17499
  };
17527
17500
  // --- [그룹 2: Action] 엔터키 입력 시 서비스 호출 ---
17528
17501
  initActions_fn = function() {
17529
17502
  this.shadowRoot.querySelector("#q").addEventListener("keypress", async (e) => {
17530
- var _a2, _b, _c, _d;
17503
+ var _a2, _b;
17531
17504
  if (e.key === "Enter" && !e.shiftKey) {
17532
17505
  e.preventDefault();
17533
17506
  const target = e.target;
@@ -17536,7 +17509,7 @@ initActions_fn = function() {
17536
17509
  target.setAttribute("disabled", "disabled");
17537
17510
  __privateGet(this, _$nineChatMessage).add("me", userInput);
17538
17511
  __privateGet(this, _$nineChatMessage).add("ing", "");
17539
- const [result, err] = await nine$1.safe(__privateGet(this, _manager2).handleChatSubmit(target.value));
17512
+ const [result, err] = await nine$1.safe(__privateGet(this, _manager).handleChatSubmit(target.value));
17540
17513
  setTimeout(() => {
17541
17514
  target.value = "";
17542
17515
  });
@@ -17547,16 +17520,11 @@ initActions_fn = function() {
17547
17520
  __privateGet(this, _$nineChatMessage).add("ai", err.message || "알 수 없는 오류가 발생했습니다. 다시 시도해주세요.");
17548
17521
  } else {
17549
17522
  trace.log(result);
17550
- try {
17551
- const rawText = (_b = (_a2 = result == null ? void 0 : result.content) == null ? void 0 : _a2[0]) == null ? void 0 : _b.text;
17552
- const parsed = JSON.parse(rawText);
17553
- __privateGet(this, _manager2).addChatHistory(parsed.message);
17523
+ const rawText = (_b = (_a2 = result == null ? void 0 : result.content) == null ? void 0 : _a2[0]) == null ? void 0 : _b.text;
17524
+ const parsed = JSON.parse(rawText);
17525
+ if (parsed.message) {
17526
+ __privateGet(this, _manager).addChatHistory(parsed.message);
17554
17527
  __privateGet(this, _$nineChatMessage).add("ai", parsed.message);
17555
- const asis = await __privateGet(this, _manager2).getRoutes();
17556
- } catch (err2) {
17557
- trace.error(err2);
17558
- const fallbackMessage = ((_d = (_c = result == null ? void 0 : result.content) == null ? void 0 : _c[0]) == null ? void 0 : _d.text) || "응답 데이터를 해석하지 못했습니다.";
17559
- __privateGet(this, _$nineChatMessage).add("ai", fallbackMessage);
17560
17528
  }
17561
17529
  }
17562
17530
  }
@@ -17567,7 +17535,7 @@ render_fn = function() {
17567
17535
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
17568
17536
  this.shadowRoot.innerHTML = `
17569
17537
  <style>
17570
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.325"}/dist/css/nine-mu.css";
17538
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.327"}/dist/css/nine-mu.css";
17571
17539
  ${customImport}
17572
17540
  </style>
17573
17541
  <div class="wrapper">
@@ -17604,9 +17572,7 @@ render_fn = function() {
17604
17572
  `;
17605
17573
  __privateSet(this, _$nineChatMessage, this.shadowRoot.querySelector("nine-chat-message"));
17606
17574
  };
17607
- _makeMenuHandler = new WeakMap();
17608
17575
  _sourceGenHandler = new WeakMap();
17609
- _showDiff = new WeakMap();
17610
17576
  if (!customElements.get("nine-chat")) {
17611
17577
  customElements.define("nine-chat", NineChat);
17612
17578
  }
@@ -43819,7 +43785,7 @@ class NineDiff extends HTMLElement {
43819
43785
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43820
43786
  this.shadowRoot.innerHTML = `
43821
43787
  <style>
43822
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.325"}/dist/css/nine-mu.css";
43788
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.327"}/dist/css/nine-mu.css";
43823
43789
  ${customImport}
43824
43790
  </style>
43825
43791
 
@@ -43959,7 +43925,7 @@ renderScaffolding_fn = function() {
43959
43925
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
43960
43926
  this.shadowRoot.innerHTML = `
43961
43927
  <style>
43962
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.325"}/dist/css/nine-mu.css";
43928
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.327"}/dist/css/nine-mu.css";
43963
43929
  ${customImport}
43964
43930
  </style>
43965
43931
 
@@ -44068,7 +44034,7 @@ render_fn2 = function() {
44068
44034
  const customImport = nine$1.cssPath ? `@import "${nine$1.cssPath}/nine-mu.css";` : "";
44069
44035
  this.shadowRoot.innerHTML = `
44070
44036
  <style>
44071
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.325"}/dist/css/nine-mu.css";
44037
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.327"}/dist/css/nine-mu.css";
44072
44038
  ${customImport}
44073
44039
  </style>
44074
44040
 
@@ -44399,7 +44365,7 @@ class ChatMessageBody extends HTMLElement {
44399
44365
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44400
44366
  this.shadowRoot.innerHTML = `
44401
44367
  <style>
44402
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.325"}/dist/css/nine-mu.css";
44368
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.327"}/dist/css/nine-mu.css";
44403
44369
  ${customImport}
44404
44370
  </style>
44405
44371
 
@@ -44493,7 +44459,7 @@ if (!customElements.get("nine-chat-progress")) {
44493
44459
  customElements.define("nine-chat-progress", ProgressMessage);
44494
44460
  }
44495
44461
  const NineMu = {
44496
- version: "0.1.325",
44462
+ version: "0.1.327",
44497
44463
  init: (config2) => {
44498
44464
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
44499
44465
  }