fix(rpc): respect stdout backpressure

closes #4897
This commit is contained in:
Armin Ronacher
2026-05-24 11:28:02 +02:00
parent fc51a40d02
commit d0d1d8edca
6 changed files with 134 additions and 80 deletions

View File

@@ -81,7 +81,7 @@ interface AgentSession {
followUp(text: string): Promise<void>;
// Subscribe to events (returns unsubscribe function)
subscribe(listener: (event: AgentSessionEvent) => void): () => void;
subscribe(listener: (event: AgentSessionEvent) => void | Promise<void>): () => void;
// Session info
sessionFile: string | undefined;
@@ -191,7 +191,7 @@ interface PromptOptions {
images?: ImageContent[];
streamingBehavior?: "steer" | "followUp";
source?: InputSource;
preflightResult?: (success: boolean) => void;
preflightResult?: (success: boolean) => void | Promise<void>;
}
```