Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions src/loop/claude-sdk-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,9 @@ class ClaudeSdkClient {
if (!isValidNdjson(text)) {
return;
}
// Fan out frontend-originated NDJSON so observer UIs can render
// user prompts that may not be echoed back by Claude.
this.broadcastToFrontends(text);
Comment thread
axeldelafosse marked this conversation as resolved.
this.ws?.send(text);
}

Expand Down Expand Up @@ -589,12 +592,15 @@ class ClaudeSdkClient {
}

private sendUserMessage(content: string): void {
this.sendJson({
const payload = {
type: "user",
message: { role: "user", content },
parent_tool_use_id: null,
session_id: this.sessionId,
});
};
const raw = `${JSON.stringify(payload)}\n`;
this.broadcastToFrontends(raw);
Comment thread
axeldelafosse marked this conversation as resolved.
this.ws?.send(raw);
}

private async runTurnExclusive(
Expand Down