@nine-lab/nine-mu 0.1.207 β 0.1.209
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 +20 -11
- 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 +17 -11
package/package.json
CHANGED
|
@@ -67,26 +67,32 @@ export class NineChatManager {
|
|
|
67
67
|
{ method: "logging/setLevel", params: { level: "info" } },
|
|
68
68
|
z.object({})
|
|
69
69
|
);
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
70
|
+
} catch (e) {}
|
|
71
|
+
|
|
72
|
+
// 2οΈβ£ [MCP μ¬λμ μ±κ³΅ ν] μΈλΆ μ€ν€λ§ λμ , λ΄λΆ κ²μ¦κΈ°κ° λ± μ’μνλ ꡬ쑰λ₯Ό μ§μ λμ Έμ€λλ€.
|
|
73
|
+
// μ΄λ κ² νλ©΄ 'Schema is missing a method literal' μλ¬λ μ λκ³ , λ°μ΄ν°λ 100% ν΅κ³Όν©λλ€.
|
|
74
|
+
const customNotificationSchema = z.object({
|
|
75
|
+
method: z.literal("notifications/logging/message"), // π κ²μ¦κΈ°κ° μ°Ύλ 리ν°λ΄ λ± λͺ
μ!
|
|
76
|
+
params: z.object({
|
|
77
|
+
level: z.string(),
|
|
78
|
+
logger: z.string(),
|
|
79
|
+
message: z.string()
|
|
80
|
+
})
|
|
81
|
+
});
|
|
74
82
|
|
|
75
|
-
|
|
76
|
-
// 2οΈβ£ [MCP μ κ³΅λ² λ³΅κ·] λλμ΄ μ μ μ€ν€λ§μ νΈλ€λ¬ κ΅¬μ‘°λ‘ λΉλΉνκ² λ±λ‘ν©λλ€!
|
|
77
83
|
this.#mcpClient.setNotificationHandler(
|
|
78
|
-
|
|
84
|
+
customNotificationSchema, // π κ»λ°κΈ° ν΅κ³Όμ© 컀μ€ν
μ€ν€λ§
|
|
79
85
|
(notification) => {
|
|
80
86
|
try {
|
|
81
|
-
trace.log("π [MCP
|
|
87
|
+
trace.log("π [MCP μμ§ μ°ν μ±κ³΅] μλ¦Ό λμ°©:", notification);
|
|
82
88
|
|
|
83
89
|
const logData = JSON.parse(notification.params.message);
|
|
84
90
|
if (logData.type === "BRAIN_DECISION") {
|
|
85
|
-
//
|
|
86
|
-
|
|
91
|
+
// λλμ΄ MCP μ μ νΈλ€λ¬λ₯Ό νκ³ UIμ μμ°©!
|
|
92
|
+
// this.#pushMessage('assistant', logData.message);
|
|
87
93
|
}
|
|
88
94
|
} catch (e) {
|
|
89
|
-
trace.warn("μλ¦Ό λ΄λΆ
|
|
95
|
+
trace.warn("μλ¦Ό λ΄λΆ νμ± μλ¬:", e);
|
|
90
96
|
}
|
|
91
97
|
}
|
|
92
98
|
);
|