@nine-lab/nine-mu 0.1.145 → 0.1.147

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, _getSourcePath, _service, _routes, _diffPopup, _packageName, _routesPath, _connectorUrl, _mcpClient2, _manager, _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;
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, _mcpClient2, _manager, _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;
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() {
@@ -13512,16 +13512,13 @@ class NineChatManager {
13512
13512
  // UI에 메시지를 뿌려줄 콜백 추가
13513
13513
  __privateAdd(this, _owner);
13514
13514
  __publicField(this, "handleChatSubmit", async (el) => {
13515
- trace$1.log(__privateGet(this, _mcpClient));
13516
- const response = await __privateGet(this, _mcpClient).callTool({
13517
- name: "ask_nine_engine",
13518
- arguments: {
13519
- prompt: el.value.trim(),
13520
- routes: []
13521
- // 현재 화면의 메뉴 정보
13522
- }
13515
+ trace.log(__privateGet(this, _mcpClient));
13516
+ const routes = [];
13517
+ __privateMethod(this, _NineChatManager_instances, callTool_fn).call(this, "system-brain", {
13518
+ user_input: el.value.trim(),
13519
+ routes,
13520
+ current_path: "/group_member/student_management"
13523
13521
  });
13524
- console.log(response);
13525
13522
  });
13526
13523
  __privateSet(this, _owner, owner);
13527
13524
  __privateSet(this, _onAction, callbacks.onAction);
@@ -13552,7 +13549,7 @@ class NineChatManager {
13552
13549
  if (__privateGet(this, _onAction)) __privateGet(this, _onAction).call(this, result);
13553
13550
  __privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "준비 완료");
13554
13551
  } catch (err) {
13555
- trace$1.error("❌ Ask Error:", err);
13552
+ trace.error("❌ Ask Error:", err);
13556
13553
  __privateMethod(this, _NineChatManager_instances, pushMessage_fn).call(this, "assistant", "분석 중 오류가 발생했습니다.");
13557
13554
  __privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "에러 발생");
13558
13555
  }
@@ -13585,11 +13582,11 @@ connect_fn = async function() {
13585
13582
  name: "nine-mu-client",
13586
13583
  version: "1.0.0"
13587
13584
  }, { capabilities: { tools: {} } }));
13588
- trace$1.log(__privateGet(this, _mcpClient));
13585
+ trace.log(__privateGet(this, _mcpClient));
13589
13586
  __privateGet(this, _mcpClient).connect(transport).then(() => {
13590
13587
  __privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "✅ MCP Connected");
13591
13588
  }).catch((err) => {
13592
- trace$1.error("❌ MCP 연결 실패", err);
13589
+ trace.error("❌ MCP 연결 실패", err);
13593
13590
  __privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "❌ Connection Failed");
13594
13591
  });
13595
13592
  };
@@ -13611,7 +13608,17 @@ pushMessage_fn = function(role, content2, result = null) {
13611
13608
  };
13612
13609
  updateStatus_fn = function(msg) {
13613
13610
  if (__privateGet(this, _onStatus)) __privateGet(this, _onStatus).call(this, msg);
13614
- trace$1.log(`[Status]: ${msg}`);
13611
+ trace.log(`[Status]: ${msg}`);
13612
+ };
13613
+ callTool_fn = async function(toolName, args = {}) {
13614
+ __privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "AI 분석 중...");
13615
+ __privateGet(this, _mcpClient).callTool({ name: toolName, arguments: args }).then((res) => {
13616
+ trace.log(res);
13617
+ }).catch((err) => {
13618
+ trace.error(err);
13619
+ __privateMethod(this, _NineChatManager_instances, updateStatus_fn).call(this, "에러 발생");
13620
+ throw err;
13621
+ });
13615
13622
  };
13616
13623
  class NineMuService {
13617
13624
  constructor(connectorUrl) {
@@ -13816,7 +13823,7 @@ render_fn = function() {
13816
13823
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
13817
13824
  this.shadowRoot.innerHTML = `
13818
13825
  <style>
13819
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.144"}/dist/css/nine-mu.css";
13826
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.146"}/dist/css/nine-mu.css";
13820
13827
  ${customImport}
13821
13828
  </style>
13822
13829
  <div class="wrapper">
@@ -40034,7 +40041,7 @@ class NineDiff extends HTMLElement {
40034
40041
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40035
40042
  this.shadowRoot.innerHTML = `
40036
40043
  <style>
40037
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.144"}/dist/css/nine-mu.css";
40044
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.146"}/dist/css/nine-mu.css";
40038
40045
  ${customImport}
40039
40046
  </style>
40040
40047
 
@@ -40144,7 +40151,7 @@ render_fn2 = function() {
40144
40151
  const customImport = this.getAttribute("css-path") ? `@import "${this.getAttribute("css-path")}";` : "";
40145
40152
  this.shadowRoot.innerHTML = `
40146
40153
  <style>
40147
- @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.144"}/dist/css/nine-mu.css";
40154
+ @import "https://cdn.jsdelivr.net/npm/@nine-lab/nine-mu@${"0.1.146"}/dist/css/nine-mu.css";
40148
40155
  ${customImport}
40149
40156
  </style>
40150
40157
 
@@ -40183,7 +40190,7 @@ handleCancel_fn = function() {
40183
40190
  };
40184
40191
  customElements.define("nine-diff-popup", NineDiffPopup);
40185
40192
  const NineMu = {
40186
- version: "0.1.144",
40193
+ version: "0.1.146",
40187
40194
  init: (config2) => {
40188
40195
  trace$1.log("🛠️ Nine-Mu Engine initialized", config2);
40189
40196
  }