@nine-lab/nine-mu 0.1.212 β†’ 0.1.214

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/dist/nine-mu.js CHANGED
@@ -17169,8 +17169,8 @@ connect_fn = async function() {
17169
17169
  // πŸ‘ˆ 껍데기 ν†΅κ³Όμš© μ»€μŠ€ν…€ μŠ€ν‚€λ§ˆ
17170
17170
  (notification) => {
17171
17171
  trace.log(notification);
17172
- trace.log(this.add);
17173
- this.add("ai", notification.params.message);
17172
+ __privateGet(this, _owner).addMessage("ai", notification.params.message);
17173
+ __privateGet(this, _owner).addMessage("ing", "");
17174
17174
  }
17175
17175
  );
17176
17176
  }).catch((err) => {
@@ -17289,6 +17289,9 @@ class NineChat extends HTMLElement {
17289
17289
  __privateAdd(this, _connectorUrl);
17290
17290
  __privateAdd(this, _manager);
17291
17291
  __privateAdd(this, _$nineChatMessage);
17292
+ __publicField(this, "addMessage", (who, message) => {
17293
+ __privateGet(this, _$nineChatMessage).add(who, message);
17294
+ });
17292
17295
  __privateAdd(this, _makeMenuHandler, async (e) => {
17293
17296
  const prompt = await nine.prompt("λ©”λ‰΄μƒμ„±μ‹œ ν•„μš”ν•œ AI ν”„λ‘¬ν”„νŠΈλ₯Ό μž…λ ₯ν•˜μ„Έμš”.").rgb();
17294
17297
  if (prompt === null || prompt === void 0) return;
@@ -17367,6 +17370,7 @@ initInteractions_fn = function() {
17367
17370
  // --- [κ·Έλ£Ή 2: Action] μ—”ν„°ν‚€ μž…λ ₯ μ‹œ μ„œλΉ„μŠ€ 호좜 ---
17368
17371
  initActions_fn = function() {
17369
17372
  this.shadowRoot.querySelector("#q").addEventListener("keypress", async (e) => {
17373
+ var _a2, _b, _c, _d;
17370
17374
  if (e.key === "Enter" && !e.shiftKey) {
17371
17375
  e.preventDefault();
17372
17376
  const target = e.target;
@@ -17386,8 +17390,16 @@ initActions_fn = function() {
17386
17390
  __privateGet(this, _$nineChatMessage).add("ai", err.message || "μ•Œ 수 μ—†λŠ” 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. λ‹€μ‹œ μ‹œλ„ν•΄μ£Όμ„Έμš”.");
17387
17391
  } else {
17388
17392
  trace.log(result);
17389
- __privateGet(this, _manager).addChatHistory(result.message);
17390
- __privateGet(this, _$nineChatMessage).add("ai", result.message);
17393
+ try {
17394
+ const rawText = (_b = (_a2 = result == null ? void 0 : result.content) == null ? void 0 : _a2[0]) == null ? void 0 : _b.text;
17395
+ const parsedData = JSON.parse(rawText);
17396
+ const aiMessage = parsedData.message || "μ²˜λ¦¬κ°€ μ™„λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.";
17397
+ __privateGet(this, _manager).addChatHistory(aiMessage);
17398
+ __privateGet(this, _$nineChatMessage).add("ai", aiMessage);
17399
+ } catch (parseErr) {
17400
+ const fallbackMessage = ((_d = (_c = result == null ? void 0 : result.content) == null ? void 0 : _c[0]) == null ? void 0 : _d.text) || "응닡 데이터λ₯Ό ν•΄μ„ν•˜μ§€ λͺ»ν–ˆμŠ΅λ‹ˆλ‹€.";
17401
+ __privateGet(this, _$nineChatMessage).add("ai", fallbackMessage);
17402
+ }
17391
17403
  }
17392
17404
  }
17393
17405
  });
@@ -17397,7 +17409,7 @@ render_fn = function() {
17397
17409
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
17398
17410
  this.shadowRoot.innerHTML = `
17399
17411
  <style>
17400
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.211"}/dist/css/nine-mu.css";
17412
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.213"}/dist/css/nine-mu.css";
17401
17413
  ${customImport}
17402
17414
  </style>
17403
17415
  <div class="wrapper">
@@ -43616,7 +43628,7 @@ class NineDiff extends HTMLElement {
43616
43628
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43617
43629
  this.shadowRoot.innerHTML = `
43618
43630
  <style>
43619
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.211"}/dist/css/nine-mu.css";
43631
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.213"}/dist/css/nine-mu.css";
43620
43632
  ${customImport}
43621
43633
  </style>
43622
43634
 
@@ -43726,7 +43738,7 @@ render_fn2 = function() {
43726
43738
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43727
43739
  this.shadowRoot.innerHTML = `
43728
43740
  <style>
43729
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.211"}/dist/css/nine-mu.css";
43741
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.213"}/dist/css/nine-mu.css";
43730
43742
  ${customImport}
43731
43743
  </style>
43732
43744
 
@@ -44053,7 +44065,7 @@ class ChatMessageBody extends HTMLElement {
44053
44065
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44054
44066
  this.shadowRoot.innerHTML = `
44055
44067
  <style>
44056
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.211"}/dist/css/nine-mu.css";
44068
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.213"}/dist/css/nine-mu.css";
44057
44069
  ${customImport}
44058
44070
  </style>
44059
44071
 
@@ -44147,7 +44159,7 @@ if (!customElements.get("nine-chat-progress")) {
44147
44159
  customElements.define("nine-chat-progress", ProgressMessage);
44148
44160
  }
44149
44161
  const NineMu = {
44150
- version: "0.1.211",
44162
+ version: "0.1.213",
44151
44163
  init: (config2) => {
44152
44164
  trace$1.log("πŸ› οΈ Nine-Mu Engine initialized", config2);
44153
44165
  }