chore: remove dead _ToolOutput, _JsOutput, _SanitizedOutput classes - #2337
Open
detail-app[bot] wants to merge 1 commit into
Open
Conversation
|
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.
Description
Removes the unused
_ToolOutput,_JsOutput(and itssanitize()/create()methods), and_SanitizedOutputclasses fromagents/src/voice/generation.ts.Changes Made
_ToolOutput(~9 lines) — deprecated in favor ofToolOutput_SanitizedOutput(~28 lines) — its only consumer was_JsOutput.sanitize()_JsOutputclass includingsanitize()and staticcreate()(~83 lines) — deprecated in favor ofToolExecutionOutput/createToolOutputContext
These three classes formed a self-contained cluster with zero production call-sites (and zero test references) anywhere in
agents/orplugins/. Their sole former consumer (performToolExecutions) was migrated to the newToolOutput/ToolExecutionOutput/createToolOutputAPI over a year ago in PR #549, at which point the author (Brian Yin) added explicit// TODO(brian): remove this class in favor of ...annotations above each one — not as aspirational future-use notes, but bound to the same migration commit. The API replacement (createToolOutput) preserves the same sanitization behavior (includingisValidToolOutputvalidation, which remains used by the livecreateToolOutputand was retained). None of the three classes are re-exported from the public package API.History
Pre-Review Checklist
Testing
pnpm vitest runon generation/agent_activity/tool_output_commit/running_tool_placeholders suites — 97 tests)pnpm buildinagents/succeedsAdditional Notes
The three
// TODO(brian): remove ...comments are removed along with the classes. No imports became unused as a result (isToolError,isStopResponse,isAgentHandoff,isValidToolOutputare all still consumed by the livecreateToolOutput).Dead Code PRs can be configured here.