@nine-lab/nine-mu 0.1.221 → 0.1.223
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/css/nine-mu.css +1 -1
- package/dist/nine-mu.js +16 -14
- 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/public/css/nine-mu.css +1 -1
- package/src/components/NineChat.js +4 -2
- package/src/components/NineChatManager.js +4 -3
package/package.json
CHANGED
package/public/css/nine-mu.css
CHANGED
|
@@ -105,7 +105,7 @@ export class NineChat extends HTMLElement {
|
|
|
105
105
|
try {
|
|
106
106
|
// 💡 [핵심] MCP 규격의 content[0].text에서 스트링을 추출합니다.
|
|
107
107
|
const rawText = result?.content?.[0]?.text;
|
|
108
|
-
trace.log(rawText);
|
|
108
|
+
//trace.log(rawText);
|
|
109
109
|
// 텍스트를 JSON 객체로 파싱
|
|
110
110
|
const parsed = JSON.parse(rawText);
|
|
111
111
|
|
|
@@ -116,9 +116,11 @@ export class NineChat extends HTMLElement {
|
|
|
116
116
|
//"source-missing"
|
|
117
117
|
//trace.log(parsed.data);
|
|
118
118
|
|
|
119
|
+
const currRoutes = await this.#$nineChatMessage.getRoutes();
|
|
120
|
+
|
|
119
121
|
if (parsed?.action?.selected_tool === "source-missing") {
|
|
120
122
|
nine.alert("메뉴 정리를 위한 라우터 정보 저장 화면으로 이동합니다.").then(res => {
|
|
121
|
-
this.#showDiff(
|
|
123
|
+
this.#showDiff(currRoutes, parsed.data, "json");
|
|
122
124
|
});
|
|
123
125
|
}
|
|
124
126
|
|
|
@@ -38,7 +38,8 @@ export class NineChatManager {
|
|
|
38
38
|
capabilities: {
|
|
39
39
|
tools: {},
|
|
40
40
|
logging: {}
|
|
41
|
-
}
|
|
41
|
+
},
|
|
42
|
+
timeout: 300000 // 5분
|
|
42
43
|
});
|
|
43
44
|
|
|
44
45
|
trace.log(this.#mcpClient);
|
|
@@ -111,7 +112,7 @@ export class NineChatManager {
|
|
|
111
112
|
return this.#mcpClient.callTool({ name: toolName, arguments: args });
|
|
112
113
|
}
|
|
113
114
|
|
|
114
|
-
async
|
|
115
|
+
async getRoutes(toolName, args = {}) {
|
|
115
116
|
|
|
116
117
|
const res = await fetch(this.#routeUrl);
|
|
117
118
|
return res.ok ? await res.json() : [];
|
|
@@ -142,7 +143,7 @@ export class NineChatManager {
|
|
|
142
143
|
return await this.#callTool("system-brain", {
|
|
143
144
|
user_input : userInput,
|
|
144
145
|
chat_history: formattedHistory,
|
|
145
|
-
routes : await this
|
|
146
|
+
routes : await this.getRoutes(),
|
|
146
147
|
current_path : currentPath,
|
|
147
148
|
});
|
|
148
149
|
}
|