Skip to content

chore: remove dead _ToolOutput, _JsOutput, _SanitizedOutput classes - #2337

Open
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-dead-tooloutput-jsoutput-sanitizedout-c6f215
Open

chore: remove dead _ToolOutput, _JsOutput, _SanitizedOutput classes#2337
detail-app[bot] wants to merge 1 commit into
mainfrom
detail/dead-code/chore-remove-dead-tooloutput-jsoutput-sanitizedout-c6f215

Conversation

@detail-app

@detail-app detail-app Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Description

Removes the unused _ToolOutput, _JsOutput (and its sanitize()/create() methods), and _SanitizedOutput classes from agents/src/voice/generation.ts.

Changes Made

  • Removed _ToolOutput (~9 lines) — deprecated in favor of ToolOutput
  • Removed _SanitizedOutput (~28 lines) — its only consumer was _JsOutput.sanitize()
  • Removed _JsOutput class including sanitize() and static create() (~83 lines) — deprecated in favor of ToolExecutionOutput/createToolOutput

Context

These three classes formed a self-contained cluster with zero production call-sites (and zero test references) anywhere in agents/ or plugins/. Their sole former consumer (performToolExecutions) was migrated to the new ToolOutput/ToolExecutionOutput/createToolOutput API 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 (including isValidToolOutput validation, which remains used by the live createToolOutput and was retained). None of the three classes are re-exported from the public package API.

History

Pre-Review Checklist

  • Build passes: All builds (lint, typecheck, tests) pass locally
  • AI-generated code reviewed: Removed unnecessary comments and ensured code quality
  • Changes explained: All changes are properly documented and justified above
  • Scope appropriate: All changes relate to the PR title

Testing

  • All tests pass (pnpm vitest run on generation/agent_activity/tool_output_commit/running_tool_placeholders suites — 97 tests)
  • pnpm build in agents/ succeeds

Additional Notes

The three // TODO(brian): remove ... comments are removed along with the classes. No imports became unused as a result (isToolError, isStopResponse, isAgentHandoff, isValidToolOutput are all still consumed by the live createToolOutput).


Dead Code PRs can be configured here.

@detail-app
detail-app Bot requested a review from a team as a code owner August 24, 2026 20:23
@changeset-bot

changeset-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 6d32f61

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

0 participants