Skip to content

Conversation

@daniel-lxs
Copy link
Member

@daniel-lxs daniel-lxs commented Dec 2, 2025

Summary

This PR removes the insert_content tool from both native tool calls and XML protocol.

Changes

Deleted Files

  • src/core/prompts/tools/insert-content.ts - XML tool description
  • src/core/prompts/tools/native-tools/insert_content.ts - Native tool definition
  • src/core/tools/InsertContentTool.ts - Tool implementation
  • src/core/tools/__tests__/insertContentTool.spec.ts - Tool tests

Modified Files

  • packages/types/src/tool.ts - Removed insert_content from toolNames array
  • src/shared/tools.ts - Removed NativeToolArgs, InsertCodeBlockToolUse interface, TOOL_DISPLAY_NAMES, and TOOL_GROUPS entries
  • src/core/prompts/tools/index.ts - Removed import and tool description mapping
  • src/core/prompts/tools/native-tools/index.ts - Removed import and array entry
  • src/core/prompts/sections/rules.ts - Removed insert_content editing instructions
  • src/core/prompts/sections/capabilities.ts - Removed from editing tools example array
  • src/core/prompts/responses.ts - Updated file guidance messages
  • src/core/assistant-message/presentAssistantMessage.ts - Removed import and tool handling case
  • src/core/assistant-message/NativeToolCallParser.ts - Removed parsing cases

Updated Test Files

  • src/shared/__tests__/modes.spec.ts
  • src/core/prompts/__tests__/mode-aware-sections.spec.ts
  • src/core/prompts/__tests__/sections.spec.ts
  • src/core/prompts/tools/__tests__/filter-tools-for-mode.spec.ts
  • src/core/task/__tests__/native-tools-filtering.spec.ts
  • Updated 12 snapshot files

Testing

  • ✅ TypeScript compilation passes
  • ✅ All 4460 tests pass

Important

The PR removes the insert_content tool from the codebase, updating various files and tests to eliminate its usage.

  • Deleted Files:
    • insert-content.ts in src/core/prompts/tools/, src/core/prompts/tools/native-tools/, src/core/tools/, and src/core/tools/__tests__/.
  • Modified Files:
    • tool.ts: Removed insert_content from toolNames.
    • tools.ts: Removed NativeToolArgs, InsertCodeBlockToolUse, TOOL_DISPLAY_NAMES, and TOOL_GROUPS entries.
    • index.ts in src/core/prompts/tools/ and src/core/prompts/tools/native-tools/: Removed import and tool description mapping.
    • rules.ts and capabilities.ts: Removed insert_content references.
    • presentAssistantMessage.ts and NativeToolCallParser.ts: Removed handling and parsing cases.
  • Updated Test Files:
    • modes.spec.ts, mode-aware-sections.spec.ts, sections.spec.ts, filter-tools-for-mode.spec.ts, native-tools-filtering.spec.ts: Removed insert_content references.
    • Updated 12 snapshot files.
  • Testing:
    • ✅ TypeScript compilation passes
    • ✅ All 4460 tests pass

This description was created by Ellipsis for c72e263. You can customize this summary. It will automatically update as commits are pushed.

@roomote
Copy link
Contributor

roomote bot commented Dec 2, 2025

Rooviewer Clock   See task on Roo Cloud

All previously flagged issues have been resolved. No new issues found.

  • Delete E2E test file: apps/vscode-e2e/src/suite/tools/insert-content.test.ts
  • Remove "insertContent" from ClineSayTool type union in src/shared/ExtensionMessage.ts:377
  • Remove "insertContent" from isWriteToolAction array in src/core/auto-approval/tools.ts:4
Previous reviews

Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues.

@hannesrudolph hannesrudolph added the Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. label Dec 2, 2025
- Remove insert_content from toolNames array in packages/types/src/tool.ts
- Remove NativeToolArgs, InsertCodeBlockToolUse interface, TOOL_DISPLAY_NAMES, and TOOL_GROUPS entries
- Delete insert-content.ts XML tool description and native tool definition files
- Remove tool handling from presentAssistantMessage.ts and NativeToolCallParser.ts
- Delete InsertContentTool.ts implementation and test file
- Update system prompt sections (rules, capabilities, responses) to remove references
- Update all affected test files
@daniel-lxs daniel-lxs force-pushed the remove-insert-content-tool branch from f30051f to bf0b60e Compare December 2, 2025 20:25
@daniel-lxs daniel-lxs marked this pull request as ready for review December 2, 2025 21:06
@daniel-lxs daniel-lxs requested review from cte, jr and mrubens as code owners December 2, 2025 21:06
@dosubot dosubot bot added the size:XL This PR changes 500-999 lines, ignoring generated files. label Dec 2, 2025
@roomote
Copy link
Contributor

roomote bot commented Dec 2, 2025

Rooviewer Clock   Follow along on Roo Cloud

Reviewing your PR now. I'll share feedback in a few minutes!

@daniel-lxs daniel-lxs moved this from Triage to PR [Needs Review] in Roo Code Roadmap Dec 2, 2025
@hannesrudolph hannesrudolph added PR - Needs Review and removed Issue/PR - Triage New issue. Needs quick review to confirm validity and assign labels. labels Dec 2, 2025
@roomote
Copy link
Contributor

roomote bot commented Dec 3, 2025

Fixaroo Clock   See task on Roo Cloud

Fixed the reported issues. All local checks passed.

View commit | Revert commit

@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Dec 3, 2025
@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Dec 3, 2025
@mrubens mrubens merged commit ce22901 into main Dec 3, 2025
16 checks passed
@mrubens mrubens deleted the remove-insert-content-tool branch December 3, 2025 21:33
@github-project-automation github-project-automation bot moved this from New to Done in Roo Code Roadmap Dec 3, 2025
@github-project-automation github-project-automation bot moved this from PR [Needs Review] to Done in Roo Code Roadmap Dec 3, 2025
@mrubens mrubens mentioned this pull request Dec 4, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer PR - Needs Review size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants