fix(server): capture reload reply before publishing updates

This commit is contained in:
paseo-bot[bot]
2026-10-31 10:14:00 +00:00
parent 833b4ef80a
commit 2fbc5f4b59
2 changed files with 2 additions and 1 deletions
@@ -66,6 +66,7 @@ async function setup(provider: AgentClient, agentId?: string) {
const clients = [0, 1].map(() => new DaemonClient({ url: `ws://127.0.0.1:${daemon.port}/ws` }));
resources.push({ daemon, clients, cwd });
await Promise.all(clients.map((client) => client.connect()));
await Promise.all(clients.map((client) => client.fetchAgents({ subscribe: {} })));
const agent = await daemon.daemon.agentManager.createAgent({ provider: "claude", cwd }, agentId, {
workspaceId: undefined,
});
+1 -1
View File
@@ -4779,8 +4779,8 @@ export class Session {
});
}
const snapshot = await refresh;
await this.agentUpdates.forwardLiveAgent(snapshot);
const timelineSize = this.agentManager.getTimeline(agentId).length;
await this.agentUpdates.forwardLiveAgent(snapshot);
if (requestId) {
this.emit({
type: "status",