Add progress updates documentation for tool calls (AIT-312)#3167
Add progress updates documentation for tool calls (AIT-312)#3167
Conversation
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the
WalkthroughAdded comprehensive documentation section on delivering progress updates for long-running tool calls in the AI Transport messaging guide. Explains two approaches: Messages for discrete updates and LiveObjects for continuous numeric progress, with code examples and usage guidance. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/pages/docs/ai-transport/messaging/tool-calls.mdx`:
- Around line 360-386: The subscription callback in channel.subscribe uses
toolCallId from message.extras.headers without checking for its presence, which
can cause toolProgress entries to be stored under undefined and collide; update
the callback in channel.subscribe to early-return when toolCallId is
null/undefined (or otherwise falsy) before calling toolProgress.set/get/delete
or renderProgressBar/renderCompleted so all cases ('tool_call', 'tool_progress',
'tool_result') safely skip processing when toolCallId is missing.
GregHolmes
left a comment
There was a problem hiding this comment.
I've made a few suggestions, my only other question would be, should we add Python and Java code snippets where appropriate too? There's this PR which has just been merged containing updates to all the code snippets in the AIT docs to also have Java and Python. #3154 What do you think?
|
|
||
| You can deliver progress updates using two approaches: | ||
|
|
||
| - **Messages**: Best for discrete status updates and milestone events |
There was a problem hiding this comment.
| - **Messages**: Best for discrete status updates and milestone events | |
| - Messages: Best for discrete status updates and milestone events |
|
|
||
| ### Choosing the right approach <a id="progress-choosing"/> | ||
|
|
||
| Choose **messages** when: |
There was a problem hiding this comment.
| Choose **messages** when: | |
| Choose messages when: |
|
I believe @ttypic will be adding Java and Python code snippets here. |
0a1240f to
c9cd667
Compare
Add comprehensive documentation for streaming progress updates during long-running tool execution, addressing AIT-312. Changes: - Add "Progress updates" section to tool-calls.mdx - Document progress updates via Messages (discrete events) - Document progress updates via LiveObjects (state synchronization) - Include complete setup and initialization examples - Provide guidance on choosing between approaches - Show combined approach using both Messages and LiveObjects The documentation covers: - Publishing progress updates with toolCallId correlation - Subscribing to progress updates on the client - LiveObjects setup with LiveCounter and LiveMap - Use cases for each approach - Complete code examples with proper imports
…es in messaging docs
c9cd667 to
f0d322d
Compare
Description
Add
Progress updatessection which details the two approaches(messages & LiveObjects) and provides details and comparisons of the two approaches. Claude assisted but verified the code samples and writing.Review App
Copilot Summary
This pull request adds comprehensive documentation on how to implement progress updates for long-running tool calls in the messaging system. It introduces two main approaches—using messages and LiveObjects—for reporting and tracking tool execution progress, with detailed code examples and guidance on when to use each method.
Progress updates documentation:
Progress via messages:
tool_progressmessages, demonstrating how to correlate updates with specific tool calls and update the UI accordingly.Progress via LiveObjects:
Guidance and best practices:
Checklist
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.