@nine-lab/nine-mu 0.1.327 → 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, _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, _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() {
@@ -17162,18 +17162,18 @@ _NotificationHandler_instances = new WeakSet();
17162
17162
  * [분리 비즈니스 로직 1] 로깅 및 UI 메시지 출력 제어
17163
17163
  */
17164
17164
  handleLoggingMessage_fn = function(params) {
17165
+ var _a2, _b;
17165
17166
  const { message, data, logger } = params;
17166
17167
  if (message) {
17167
17168
  __privateGet(this, _owner).addMessage("ai", message);
17168
17169
  __privateGet(this, _owner).addMessage("ing", "");
17169
17170
  }
17170
- const runAction = {
17171
+ (_b = (_a2 = {
17171
17172
  "generate-menu-completed": () => __privateGet(this, _generateMenu).call(this, data),
17172
17173
  "generate-source-brain": () => __privateGet(this, _generateSource).call(this, data),
17173
17174
  "modify-source-brain": () => __privateGet(this, _collectModifySource).call(this, data),
17174
17175
  "modify-source-brain-completed": () => __privateGet(this, _openDiffPopup).call(this)
17175
- }[logger];
17176
- runAction == null ? void 0 : runAction();
17176
+ })[logger]) == null ? void 0 : _b.call(_a2);
17177
17177
  };
17178
17178
  _collectModifySource = new WeakMap();
17179
17179
  _openDiffPopup = new WeakMap();
@@ -17444,37 +17444,11 @@ class NineChat extends HTMLElement {
17444
17444
  __publicField(this, "addMessage", (who, message) => {
17445
17445
  __privateGet(this, _$nineChatMessage).add(who, message);
17446
17446
  });
17447
- __privateAdd(this, _makeMenuHandler, async (e) => {
17448
- const prompt = await nine$1.prompt("메뉴생성시 필요한 AI 프롬프트를 입력하세요.").rgb();
17449
- if (prompt === null || prompt === void 0) return;
17450
- const res = await api.post(`/nine-mu/source/readFile`, { path: __privateGet(this, _routesPath) });
17451
- trace.log(res);
17452
- if (!res || !(res == null ? void 0 : res.contents)) return;
17453
- const jsonRoutes = (res == null ? void 0 : res.contents) ? JSON.parse(res == null ? void 0 : res.contents) : {};
17454
- trace.log(jsonRoutes);
17455
- const res2 = await api.post(`${__privateGet(this, _connectorUrl)}/api/source/missing`, {
17456
- routes: jsonRoutes,
17457
- prompt
17458
- });
17459
- if (res2.success && (res2 == null ? void 0 : res2.tasks)) {
17460
- __privateGet(this, _showDiff).call(this, jsonRoutes, res2 == null ? void 0 : res2.tasks, "json");
17461
- }
17462
- });
17463
17447
  __privateAdd(this, _sourceGenHandler, async (e) => {
17464
17448
  const routes = await __privateGet(this, _manager).getRoutes();
17465
17449
  const response = await __privateGet(this, _manager).analyzeUnmappedRoutes(routes);
17466
17450
  trace.log(response);
17467
17451
  });
17468
- __privateAdd(this, _showDiff, (asis, tobe, lang) => {
17469
- const oldPopup = this.shadowRoot.querySelector("nine-menu-diff-popup");
17470
- if (oldPopup) {
17471
- oldPopup.remove();
17472
- }
17473
- const $diffPopup = document.createElement("nine-menu-diff-popup");
17474
- const container = this.shadowRoot.querySelector(".wrapper") || this.shadowRoot;
17475
- container.appendChild($diffPopup);
17476
- $diffPopup.popup().data(asis, tobe, lang);
17477
- });
17478
17452
  this.attachShadow({ mode: "open" });
17479
17453
  }
17480
17454
  get config() {
@@ -17507,7 +17481,7 @@ _$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;
@@ -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);
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) {
17553
17526
  __privateGet(this, _manager).addChatHistory(parsed.message);
17554
17527
  __privateGet(this, _$nineChatMessage).add("ai", parsed.message);
17555
- const asis = await __privateGet(this, _manager).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.326"}/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.326"}/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.326"}/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.326"}/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.326"}/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.326",
44462
+ version: "0.1.327",
44497
44463
  init: (config2) => {
44498
44464
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
44499
44465
  }