@nine-lab/nine-mu 0.1.213 β†’ 0.1.215

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,20 @@ 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
+ trace.log(rawText);
17396
+ const parsedData = JSON.parse(rawText);
17397
+ trace.log(parsedData);
17398
+ const aiMessage = parsedData.message || "μ²˜λ¦¬κ°€ μ™„λ£Œλ˜μ—ˆμŠ΅λ‹ˆλ‹€.";
17399
+ trace.log(aiMessage);
17400
+ __privateGet(this, _manager).addChatHistory(aiMessage);
17401
+ __privateGet(this, _$nineChatMessage).add("ai", aiMessage);
17402
+ } catch (err2) {
17403
+ trace.error(err2);
17404
+ const fallbackMessage = ((_d = (_c = result == null ? void 0 : result.content) == null ? void 0 : _c[0]) == null ? void 0 : _d.text) || "응닡 데이터λ₯Ό ν•΄μ„ν•˜μ§€ λͺ»ν–ˆμŠ΅λ‹ˆλ‹€.";
17405
+ __privateGet(this, _$nineChatMessage).add("ai", fallbackMessage);
17406
+ }
17395
17407
  }
17396
17408
  }
17397
17409
  });
@@ -17401,7 +17413,7 @@ render_fn = function() {
17401
17413
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
17402
17414
  this.shadowRoot.innerHTML = `
17403
17415
  <style>
17404
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.212"}/dist/css/nine-mu.css";
17416
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.214"}/dist/css/nine-mu.css";
17405
17417
  ${customImport}
17406
17418
  </style>
17407
17419
  <div class="wrapper">
@@ -43620,7 +43632,7 @@ class NineDiff extends HTMLElement {
43620
43632
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43621
43633
  this.shadowRoot.innerHTML = `
43622
43634
  <style>
43623
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.212"}/dist/css/nine-mu.css";
43635
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.214"}/dist/css/nine-mu.css";
43624
43636
  ${customImport}
43625
43637
  </style>
43626
43638
 
@@ -43730,7 +43742,7 @@ render_fn2 = function() {
43730
43742
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
43731
43743
  this.shadowRoot.innerHTML = `
43732
43744
  <style>
43733
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.212"}/dist/css/nine-mu.css";
43745
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.214"}/dist/css/nine-mu.css";
43734
43746
  ${customImport}
43735
43747
  </style>
43736
43748
 
@@ -44057,7 +44069,7 @@ class ChatMessageBody extends HTMLElement {
44057
44069
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
44058
44070
  this.shadowRoot.innerHTML = `
44059
44071
  <style>
44060
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.212"}/dist/css/nine-mu.css";
44072
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.214"}/dist/css/nine-mu.css";
44061
44073
  ${customImport}
44062
44074
  </style>
44063
44075
 
@@ -44151,7 +44163,7 @@ if (!customElements.get("nine-chat-progress")) {
44151
44163
  customElements.define("nine-chat-progress", ProgressMessage);
44152
44164
  }
44153
44165
  const NineMu = {
44154
- version: "0.1.212",
44166
+ version: "0.1.214",
44155
44167
  init: (config2) => {
44156
44168
  trace$1.log("πŸ› οΈ Nine-Mu Engine initialized", config2);
44157
44169
  }