@nine-lab/nine-mu 0.1.169 → 0.1.171
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 +12 -15
- package/dist/nine-mu.js.map +1 -1
- package/dist/nine-mu.umd.js +1 -1
- package/dist/nine-mu.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/components/NineChat.js +6 -6
- package/src/components/NineChatManager.js +2 -21
package/package.json
CHANGED
|
@@ -90,18 +90,18 @@ export class NineChat extends HTMLElement {
|
|
|
90
90
|
});
|
|
91
91
|
|
|
92
92
|
// 3. nine.safe로 매니저 로직 실행
|
|
93
|
-
const [
|
|
93
|
+
const [result, err] = await nine.safe(this.#manager.handleChatSubmit(target));
|
|
94
|
+
target.removeAttribute('disabled');
|
|
94
95
|
|
|
95
96
|
if (err) {
|
|
96
97
|
console.error("Manager 실행 에러:", err);
|
|
97
98
|
// 필요 시 'ing' 메시지 제거 및 사용자 알림
|
|
98
99
|
this.shadowRoot.querySelectorAll("nx-ai-ing-message").forEach(el => el.remove());
|
|
99
|
-
|
|
100
|
+
} else {
|
|
101
|
+
console.log(result);
|
|
102
|
+
//this.#$nineChatMessage.add("me", userInput);
|
|
103
|
+
this.#$nineChatMessage.add("ai", result.message); // 로딩 상태
|
|
100
104
|
}
|
|
101
|
-
|
|
102
|
-
console.log(target);
|
|
103
|
-
|
|
104
|
-
target.removeAttribute('disabled');
|
|
105
105
|
}
|
|
106
106
|
});
|
|
107
107
|
}
|
|
@@ -122,36 +122,17 @@ export class NineChatManager {
|
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
async #callTool(toolName, args = {}) {
|
|
125
|
-
|
|
126
|
-
this.#updateStatus("AI 분석 중...");
|
|
127
|
-
|
|
128
|
-
const response = this.#mcpClient.callTool({ name: toolName, arguments: args });
|
|
129
|
-
|
|
130
|
-
return response;
|
|
131
|
-
/**
|
|
132
|
-
.then((res) => {
|
|
133
|
-
trace.log(res);
|
|
134
|
-
//this.#updateStatus("✅ MCP Connected");
|
|
135
|
-
})
|
|
136
|
-
.catch((err) => {
|
|
137
|
-
trace.error(err);
|
|
138
|
-
this.#updateStatus("에러 발생");
|
|
139
|
-
throw err;
|
|
140
|
-
}); */
|
|
125
|
+
return this.#mcpClient.callTool({ name: toolName, arguments: args });
|
|
141
126
|
}
|
|
142
127
|
|
|
143
128
|
handleChatSubmit = async el => {
|
|
144
129
|
|
|
145
|
-
trace.log(this.#mcpClient);
|
|
146
|
-
|
|
147
130
|
const routes = [];
|
|
148
131
|
|
|
149
|
-
|
|
132
|
+
return await this.#callTool("system-brain", {
|
|
150
133
|
user_input : el.value.trim(),
|
|
151
134
|
routes : routes,
|
|
152
135
|
current_path : "/group_member/student_management",
|
|
153
136
|
});
|
|
154
|
-
|
|
155
|
-
return response;
|
|
156
137
|
}
|
|
157
138
|
}
|