@nine-lab/nine-mu 0.1.213 β†’ 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,7 +17169,6 @@ connect_fn = async function() {
17169
17169
  // πŸ‘ˆ 껍데기 ν†΅κ³Όμš© μ»€μŠ€ν…€ μŠ€ν‚€λ§ˆ
17170
17170
  (notification) => {
17171
17171
  trace.log(notification);
17172
- trace.log(this);
17173
17172
  __privateGet(this, _owner).addMessage("ai", notification.params.message);
17174
17173
  __privateGet(this, _owner).addMessage("ing", "");
17175
17174
  }
@@ -17371,6 +17370,7 @@ initInteractions_fn = function() {
17371
17370
  // --- [κ·Έλ£Ή 2: Action] μ—”ν„°ν‚€ μž…λ ₯ μ‹œ μ„œλΉ„μŠ€ 호좜 ---
17372
17371
  initActions_fn = function() {
17373
17372
  this.shadowRoot.querySelector("#q").addEventListener("keypress", async (e) => {
17373
+ var _a2, _b, _c, _d;
17374
17374
  if (e.key === "Enter" && !e.shiftKey) {
17375
17375
  e.preventDefault();
17376
17376
  const target = e.target;
@@ -17390,8 +17390,16 @@ initActions_fn = function() {
17390
17390
  __privateGet(this, _$nineChatMessage).add("ai", err.message || "μ•Œ 수 μ—†λŠ” 였λ₯˜κ°€ λ°œμƒν–ˆμŠ΅λ‹ˆλ‹€. λ‹€μ‹œ μ‹œλ„ν•΄μ£Όμ„Έμš”.");
17391
17391
  } else {
17392
17392
  trace.log(result);
17393
- __privateGet(this, _manager).addChatHistory(result.message);
17394
- __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
+ }
17395
17403
  }
17396
17404
  }
17397
17405
  });
@@ -17401,7 +17409,7 @@ render_fn = function() {
17401
17409
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
17402
17410
  this.shadowRoot.innerHTML = `
17403
17411
  <style>
17404
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.212"}/dist/css/nine-mu.css";
17412
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.213"}/dist/css/nine-mu.css";
17405
17413
  ${customImport}
17406
17414
  </style>
17407
17415
  <div class="wrapper">
@@ -43620,7 +43628,7 @@ class NineDiff extends HTMLElement {
43620
43628
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43621
43629
  this.shadowRoot.innerHTML = `
43622
43630
  <style>
43623
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.212"}/dist/css/nine-mu.css";
43631
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.213"}/dist/css/nine-mu.css";
43624
43632
  ${customImport}
43625
43633
  </style>
43626
43634
 
@@ -43730,7 +43738,7 @@ render_fn2 = function() {
43730
43738
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43731
43739
  this.shadowRoot.innerHTML = `
43732
43740
  <style>
43733
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.212"}/dist/css/nine-mu.css";
43741
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.213"}/dist/css/nine-mu.css";
43734
43742
  ${customImport}
43735
43743
  </style>
43736
43744
 
@@ -44057,7 +44065,7 @@ class ChatMessageBody extends HTMLElement {
44057
44065
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44058
44066
  this.shadowRoot.innerHTML = `
44059
44067
  <style>
44060
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.212"}/dist/css/nine-mu.css";
44068
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.213"}/dist/css/nine-mu.css";
44061
44069
  ${customImport}
44062
44070
  </style>
44063
44071
 
@@ -44151,7 +44159,7 @@ if (!customElements.get("nine-chat-progress")) {
44151
44159
  customElements.define("nine-chat-progress", ProgressMessage);
44152
44160
  }
44153
44161
  const NineMu = {
44154
- version: "0.1.212",
44162
+ version: "0.1.213",
44155
44163
  init: (config2) => {
44156
44164
  trace$1.log("πŸ› οΈ Nine-Mu Engine initialized", config2);
44157
44165
  }