@nine-lab/nine-mu 0.1.145 → 0.1.146

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nine-lab/nine-mu",
3
- "version": "0.1.145",
3
+ "version": "0.1.146",
4
4
  "description": "AI-Driven Full-Stack Code Fabrication Engine",
5
5
  "type": "module",
6
6
  "main": "./dist/nine-mu.umd.js",
@@ -1,6 +1,6 @@
1
1
  import { Client } from "@modelcontextprotocol/sdk/client/index.js";
2
2
  import { WebSocketClientTransport } from "@modelcontextprotocol/sdk/client/websocket.js";
3
- import { trace, api, nine } from "@nine-lab/nine-util";
3
+ import { trace } from "@nopeer";
4
4
 
5
5
  export class NineChatManager {
6
6
  #mcpClient;
@@ -121,18 +121,30 @@ export class NineChatManager {
121
121
  trace.log(`[Status]: ${msg}`);
122
122
  }
123
123
 
124
+ async #callTool(toolName, args = {}) {
125
+
126
+ this.#updateStatus("AI 분석 중...");
127
+
128
+ this.#mcpClient.callTool({ name: toolName, arguments: args })
129
+ .then((res) => {
130
+ trace.log(res);
131
+ //this.#updateStatus("✅ MCP Connected");
132
+ })
133
+ .catch((err) => {
134
+ trace.error(err);
135
+ this.#updateStatus("에러 발생");
136
+ throw err;
137
+ });
138
+ }
139
+
124
140
  handleChatSubmit = async el => {
125
141
 
126
142
  trace.log(this.#mcpClient);
127
143
 
128
- const response = await this.#mcpClient.callTool({
129
- name: "ask_nine_engine",
130
- arguments: {
131
- prompt: el.value.trim(),
132
- routes: [] // 현재 화면의 메뉴 정보
133
- }
134
- });
135
-
136
- console.log(response);
144
+ this.#callTool("system-brain", {
145
+ user_input : el.value.trim(),
146
+ routes : routes,
147
+ current_path : "/group_member/student_management",
148
+ })
137
149
  }
138
150
  }