@nine-lab/nine-mu 0.1.175 → 0.1.177

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
@@ -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 _mcpClient, _onAction, _onStatus, _onMessage, _owner, _NineChatManager_instances, connect_fn, fetchRoutes_fn, pushMessage_fn, updateStatus_fn, callTool_fn, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _manager, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn, _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 _mcpClient, _onAction, _onStatus, _onMessage, _owner, _routeUrl, _NineChatManager_instances, connect_fn, fetchRoutes_fn, pushMessage_fn, updateStatus_fn, callTool_fn, getRoutes_fn, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _manager, _$nineChatMessage, _NineChat_instances, initInteractions_fn, initActions_fn, render_fn, _makeMenuHandler, _sourceGenHandler, _showDiff, _asisEditorView, _tobeEditorView, _asisEditorEl, _tobeEditorEl, _languageCompartment, _isScrollSyncActive, _initCodeMirror, _setupScrollSync, _applyDiffDecorations, _dialog, _diffView, _asisBackup, _host, _NineDiffPopup_instances, render_fn2, handleConfirm_fn, handleCancel_fn, _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 } from "@nine-lab/nine-util";
14
14
  class Trace extends trace$1.constructor {
15
15
  constructor() {
@@ -13511,8 +13511,10 @@ class NineChatManager {
13511
13511
  __privateAdd(this, _onMessage);
13512
13512
  // UI에 메시지를 뿌려줄 콜백 추가
13513
13513
  __privateAdd(this, _owner);
13514
+ __privateAdd(this, _routeUrl);
13514
13515
  __publicField(this, "handleChatSubmit", async (el) => {
13515
- const routes = [];
13516
+ const routes = __privateMethod(this, _NineChatManager_instances, getRoutes_fn).call(this);
13517
+ trace.log(routes);
13516
13518
  return await __privateMethod(this, _NineChatManager_instances, callTool_fn).call(this, "system-brain", {
13517
13519
  user_input: el.value.trim(),
13518
13520
  routes,
@@ -13520,6 +13522,7 @@ class NineChatManager {
13520
13522
  });
13521
13523
  });
13522
13524
  __privateSet(this, _owner, owner);
13525
+ __privateSet(this, _routeUrl, __privateGet(this, _owner).getAttribute("route-url"));
13523
13526
  __privateSet(this, _onAction, callbacks.onAction);
13524
13527
  __privateSet(this, _onStatus, callbacks.onStatus);
13525
13528
  __privateSet(this, _onMessage, callbacks.onMessage);
@@ -13572,6 +13575,7 @@ _onAction = new WeakMap();
13572
13575
  _onStatus = new WeakMap();
13573
13576
  _onMessage = new WeakMap();
13574
13577
  _owner = new WeakMap();
13578
+ _routeUrl = new WeakMap();
13575
13579
  _NineChatManager_instances = new WeakSet();
13576
13580
  connect_fn = async function() {
13577
13581
  if (__privateGet(this, _mcpClient)) return;
@@ -13612,6 +13616,13 @@ updateStatus_fn = function(msg) {
13612
13616
  callTool_fn = async function(toolName, args = {}) {
13613
13617
  return __privateGet(this, _mcpClient).callTool({ name: toolName, arguments: args });
13614
13618
  };
13619
+ getRoutes_fn = async function(toolName, args = {}) {
13620
+ const res = await fetch(__privateGet(this, _routeUrl));
13621
+ if (!res.ok) {
13622
+ throw new Error(`HTTP error! status: ${res.status}`);
13623
+ }
13624
+ return await res.json();
13625
+ };
13615
13626
  class NineMuService {
13616
13627
  constructor(connectorUrl) {
13617
13628
  __privateAdd(this, _getSourcePath, (menuUrl) => {
@@ -13819,7 +13830,7 @@ render_fn = function() {
13819
13830
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
13820
13831
  this.shadowRoot.innerHTML = `
13821
13832
  <style>
13822
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.174"}/dist/css/nine-mu.css";
13833
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.176"}/dist/css/nine-mu.css";
13823
13834
  ${customImport}
13824
13835
  </style>
13825
13836
  <div class="wrapper">
@@ -40038,7 +40049,7 @@ class NineDiff extends HTMLElement {
40038
40049
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40039
40050
  this.shadowRoot.innerHTML = `
40040
40051
  <style>
40041
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.174"}/dist/css/nine-mu.css";
40052
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.176"}/dist/css/nine-mu.css";
40042
40053
  ${customImport}
40043
40054
  </style>
40044
40055
 
@@ -40148,7 +40159,7 @@ render_fn2 = function() {
40148
40159
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40149
40160
  this.shadowRoot.innerHTML = `
40150
40161
  <style>
40151
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.174"}/dist/css/nine-mu.css";
40162
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.176"}/dist/css/nine-mu.css";
40152
40163
  ${customImport}
40153
40164
  </style>
40154
40165
 
@@ -40475,7 +40486,7 @@ class ChatMessageBody extends HTMLElement {
40475
40486
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40476
40487
  this.shadowRoot.innerHTML = `
40477
40488
  <style>
40478
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.174"}/dist/css/nine-mu.css";
40489
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.176"}/dist/css/nine-mu.css";
40479
40490
  ${customImport}
40480
40491
  </style>
40481
40492
 
@@ -40569,7 +40580,7 @@ if (!customElements.get("nine-chat-progress")) {
40569
40580
  customElements.define("nine-chat-progress", ProgressMessage);
40570
40581
  }
40571
40582
  const NineMu = {
40572
- version: "0.1.174",
40583
+ version: "0.1.176",
40573
40584
  init: (config2) => {
40574
40585
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
40575
40586
  }