xiaozuoassistant 0.1.54 → 0.1.55
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.
|
@@ -18,5 +18,10 @@ export class AgentManager {
|
|
|
18
18
|
getAllAgents() {
|
|
19
19
|
return Array.from(this.agents.values());
|
|
20
20
|
}
|
|
21
|
+
updateAllConfigs() {
|
|
22
|
+
for (const agent of this.agents.values()) {
|
|
23
|
+
agent.updateConfig();
|
|
24
|
+
}
|
|
25
|
+
}
|
|
21
26
|
}
|
|
22
27
|
export const agentManager = AgentManager.getInstance();
|
|
@@ -49,6 +49,9 @@ export class MemoryManager {
|
|
|
49
49
|
// structured info from the message. For MVP, we skip automatic extraction here
|
|
50
50
|
// but provide the API for the Brain to call explicitly.
|
|
51
51
|
}
|
|
52
|
+
updateClients() {
|
|
53
|
+
this.vector.updateClient();
|
|
54
|
+
}
|
|
52
55
|
async createRun(sessionId, userContent, runId) {
|
|
53
56
|
return this.shortTerm.createRun(sessionId, userContent, runId);
|
|
54
57
|
}
|
package/dist/server/index.js
CHANGED
|
@@ -250,6 +250,9 @@ app.post('/api/config', async (req, res) => {
|
|
|
250
250
|
saveConfig(newConfig);
|
|
251
251
|
// 如果 LLM 配置变了,更新 Brain
|
|
252
252
|
brain.updateClient();
|
|
253
|
+
// 同步更新所有 Agent 与向量记忆客户端(否则仍会用旧 apiKey)
|
|
254
|
+
agentManager.updateAllConfigs();
|
|
255
|
+
memory.updateClients();
|
|
253
256
|
// 如果定时任务配置变了,重启 Scheduler
|
|
254
257
|
if (restartScheduler) {
|
|
255
258
|
initScheduler();
|
package/package.json
CHANGED