feat: 提升 WebFetch 网页正文提取与模型可消费性#77
Merged
Merged
Conversation
Codecov Report❌ Patch coverage is 📢 Thoughts on this report? Let us know! |
minorcell
pushed a commit
that referenced
this pull request
May 16, 2026
fix(repository): normalize backslashes in git HEAD blob spec
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
本次改动在不破坏
TUI -> Runtime -> Provider -> Tools主链路的前提下,重构了webfetch,让它从“返回原始 HTTP Body”提升为“返回更适合模型消费的网页文本内容”。主要改动
webfetch增加工具级配置:tools.webfetch.max_response_bytestools.webfetch.supported_content_typeswebfetchwebfetch执行流程,拆分为:script、style、noscript、svg、canvas、head、template<title>时一并返回urlstatuscontent_typetruncatedtitle预期收益
webfetch更符合 Agent 工具定位测试验证
已补充并更新以下测试:
internal/tools/webfetchinternal/configinternal/app执行验证:
go test ./...close #78