docs(agent): update steering docs for deferred tool execution closes #2330

This commit is contained in:
Mario Zechner
2026-03-18 03:49:16 +01:00
parent 16a010fd21
commit 8a8e2a8049
8 changed files with 21 additions and 19 deletions

View File

@@ -78,7 +78,7 @@ interface AgentSession {
prompt(text: string, options?: PromptOptions): Promise<void>;
// Queue messages during streaming
steer(text: string): Promise<void>; // Interrupt: delivered after current tool, skips remaining
steer(text: string): Promise<void>; // Queue for delivery after the current assistant turn finishes its tool calls
followUp(text: string): Promise<void>; // Wait: delivered only when agent finishes
// Subscribe to events (returns unsubscribe function)
@@ -150,7 +150,7 @@ await session.prompt("After you're done, also check X", { streamingBehavior: "fo
For explicit queueing during streaming:
```typescript
// Interrupt the agent (delivered after current tool, skips remaining tools)
// Queue a steering message for delivery after the current assistant turn finishes its tool calls
await session.steer("New instruction");
// Wait for agent to finish (delivered only when agent stops)