@nine-lab/nine-mu 0.1.222 โ 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/package.json
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
|
|
|
@@ -112,7 +112,7 @@ export class NineChatManager {
|
|
|
112
112
|
return this.#mcpClient.callTool({ name: toolName, arguments: args });
|
|
113
113
|
}
|
|
114
114
|
|
|
115
|
-
async
|
|
115
|
+
async getRoutes(toolName, args = {}) {
|
|
116
116
|
|
|
117
117
|
const res = await fetch(this.#routeUrl);
|
|
118
118
|
return res.ok ? await res.json() : [];
|
|
@@ -143,7 +143,7 @@ export class NineChatManager {
|
|
|
143
143
|
return await this.#callTool("system-brain", {
|
|
144
144
|
user_input : userInput,
|
|
145
145
|
chat_history: formattedHistory,
|
|
146
|
-
routes : await this
|
|
146
|
+
routes : await this.getRoutes(),
|
|
147
147
|
current_path : currentPath,
|
|
148
148
|
});
|
|
149
149
|
}
|