Conversation
📝 WalkthroughWalkthroughAdds WebFetch tool support across models, factory parsers (tool_use_result-aware), HTML/Markdown formatters and renderer hooks, CSS styles, tests, and a new renderer-authoring guide. Changes
Sequence Diagram(s)(omitted) Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
awesome feature, are there any blockers? |
daaain
left a comment
There was a problem hiding this comment.
Haven't got a chance to test, but code structure looks good!
|
@lifeinchords don't think there are any blockers, the branch will need to be rebased after the WebSearch tool rendering PR got merged, but nothing big. If you have a few minutes, you can check out the branch and re-render some of your logs using it and see if it does what you expect and post if you have any feedback. |
|
@daaain Looks great! 🚀
|
Implement rendering support for the WebFetch tool: - Add WebFetchInput (url, prompt) and WebFetchOutput models - Create parser that uses toolUseResult for rich metadata (HTTP status, bytes, duration) - Add HTML formatter with metadata badge and collapsible markdown result - Add Markdown formatter with code fence and collapsible output - Add comprehensive tests (20 test cases) The implementation follows existing tool renderer patterns and uses the extended parser signature for tools that need access to toolUseResult. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add metadata line to format_WebFetchOutput (status, size, duration) - Truncate long URLs (>60 chars) in title_WebFetchInput with ellipsis - Add tests for new behavior Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add CSS rules for webfetch-* classes (prompt, meta, status, size, duration) - Change markdown output to use plain blockquote instead of collapsible (WebFetch results are AI summaries, not raw content) - Update tests to reflect simplified markdown structure Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comprehensive guide covering the full pipeline: models, factories, HTML/Markdown formatters, and testing. Includes patterns for both simple tools and those requiring toolUseResult metadata. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
32c47bf to
9986f5e
Compare
The .tool_result .collapsible-code rule had margin-top: -2.5em which pulled the collapsible section up, causing WebFetch metadata badges (status, size, duration) to overlap with the line count indicator. Add override for .webfetch-result.collapsible-code to reset margin-top to 0. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Global styles had h1 { text-align: center; } which affected markdown
rendered in WebFetch results. Override with left alignment for h1 within
.webfetch-result.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
|
Looks great, thanks! |


Summary
Add rendering support for the WebFetch tool:
Test plan
just test)Summary by CodeRabbit
New Features
Style
Documentation
Tests
✏️ Tip: You can customize this high-level summary in your review settings.