Skip to content

Commit 12624f1

Browse files
committed
docs(ai-agents): correct the tool comment to match SDK behavior
chat.toStreamTextOptions merges skill tools and sets streamText's tools; it does not itself detect HITL approval. Reword the inline comment to state only what the option does.
1 parent 67c23e3 commit 12624f1

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

docs/guides/ai-agents/chat-agent.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,9 +63,9 @@ export const myChat = chat.agent({
6363
tools: { getCurrentTime },
6464
run: async ({ messages, tools, signal }) => {
6565
return streamText({
66-
// Pass tools INTO toStreamTextOptions (not separately to streamText):
67-
// this is what detects tool calls needing HITL approval and merges any
68-
// auto-injected skill tools. It sets streamText's `tools` for you.
66+
// Pass tools INTO toStreamTextOptions (not separately to streamText): it
67+
// merges them with any auto-injected skill tools and sets streamText's
68+
// `tools`. Passing tools separately after the spread drops the skill tools.
6969
...chat.toStreamTextOptions({ tools }),
7070
model: anthropic("claude-sonnet-4-5"),
7171
messages,

0 commit comments

Comments
 (0)