Repository navigation
refactor(core): drop url and format from webfetch output - #64534
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Looks good. The tests pass and the type check is clean. Nothing in the repo reads the removed fields: the TUI, session UI and ACP all take the URL from the tool's input, and contentType stays in metadata.
Public API: the webfetch tool's structured output, as seen by Code Mode programs and plugin hooks, goes from { url, contentType, format, output } to { contentType, output }. This is not backwards compatible for any program or plugin that reads output.url or output.format; they need to read the call's input instead. What the model reads and the metadata are unchanged.
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.
Issue for this PR
No issue.
Type of change
What does this PR do?
webfetch's structured output repeated two input values back to the caller. A Code Mode program or plugin hook already has them, so they're dropped:
What the model reads is unchanged: on a direct call it only ever sees the page text, and
contentTypestays in metadata for the UI. This matches the earlier cleanups of the skill and websearch results.How did you verify your code works?
bun test test/tool-webfetch.test.ts(91 pass) andbun run typecheck:tscinpackages/core.Checklist
Added by the opencode bot (AI-generated).
Public API: removes
urlandformatfrom the webfetch tool's structured output seen by Code Mode and plugin hooks (not backwards compatible for code that reads them; they need the call's input instead)