@nine-lab/nine-mu 0.1.227 → 0.1.229

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,6 +1,6 @@
1
1
  {
2
2
  "name": "@nine-lab/nine-mu",
3
- "version": "0.1.227",
3
+ "version": "0.1.229",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -8,7 +8,6 @@ import { WebSocketClientTransport } from "@modelcontextprotocol/sdk/client/webso
8
8
  export class NineChat extends HTMLElement {
9
9
  #service = null;
10
10
  #routes = [];
11
- #diffPopup;
12
11
  #packageName;
13
12
  #routesPath;
14
13
  #connectorUrl;
@@ -185,10 +184,9 @@ export class NineChat extends HTMLElement {
185
184
  </div>
186
185
  </div>
187
186
  <div class="expand-icon"></div>
188
- <nine-diff-popup></nine-diff-popup>
189
187
  `;
190
188
 
191
- this.#diffPopup = this.shadowRoot.querySelector('nine-diff-popup');
189
+ //this.#diffPopup = this.shadowRoot.querySelector('nine-diff-popup');
192
190
 
193
191
  this.#$nineChatMessage = this.shadowRoot.querySelector("nine-chat-message");
194
192
  }
@@ -241,7 +239,22 @@ export class NineChat extends HTMLElement {
241
239
  }
242
240
 
243
241
  #showDiff = (asis, tobe, lang) => {
244
- this.#diffPopup.popup().data(asis, tobe, lang);
242
+ // 1. 혹시 잔상이 남아있을지 모르니 기존에 생성된 팝업이 있다면 강제 제거
243
+ const oldPopup = this.shadowRoot.querySelector('nine-diff-popup');
244
+ if (oldPopup) {
245
+ oldPopup.remove();
246
+ }
247
+
248
+ // 2. 동적으로 커스텀 엘리먼트 생성
249
+ const $diffPopup = document.createElement('nine-diff-popup');
250
+
251
+ // 3. 래퍼(wrapper) 안이나 shadowRoot 제일 밑바닥에 부착
252
+ const container = this.shadowRoot.querySelector('.wrapper') || this.shadowRoot;
253
+ container.appendChild($diffPopup);
254
+
255
+ // 4. 데이터 주입 및 팝업 실행
256
+ // 💡 팝업이 네이티브 <dialog> 기반이라면 .popup() 내부에서 showModal()이 실행될 겁니다.
257
+ $diffPopup.popup().data(asis, tobe, lang);
245
258
  }
246
259
  }
247
260
 
@@ -41,7 +41,7 @@ export class NineChatManager {
41
41
  }
42
42
  });
43
43
 
44
- trace.log(this.#mcpClient);
44
+ //trace.log(this.#mcpClient);
45
45
 
46
46
  this.#mcpClient.connect(transport, {timeout: 300000})
47
47
  .then( async () => {