@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 +25 -18
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +3 -3
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NineChatManager.js +23 -9
package/package.json
CHANGED
|
@@ -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
|
|
3
|
+
import { trace } from "@nopeer";
|
|
4
4
|
|
|
5
5
|
export class NineChatManager {
|
|
6
6
|
#mcpClient;
|
|
@@ -121,18 +121,32 @@ 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
|
|
129
|
-
name: "ask_nine_engine",
|
|
130
|
-
arguments: {
|
|
131
|
-
prompt: el.value.trim(),
|
|
132
|
-
routes: [] // 현재 화면의 메뉴 정보
|
|
133
|
-
}
|
|
134
|
-
});
|
|
144
|
+
const routes = [];
|
|
135
145
|
|
|
136
|
-
|
|
146
|
+
this.#callTool("system-brain", {
|
|
147
|
+
user_input : el.value.trim(),
|
|
148
|
+
routes : routes,
|
|
149
|
+
current_path : "/group_member/student_management",
|
|
150
|
+
})
|
|
137
151
|
}
|
|
138
152
|
}
|