-
Notifications
You must be signed in to change notification settings - Fork 2.8k
refactor: remove insert_content tool #9751
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
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
Contributor
All previously flagged issues have been resolved. No new issues found.
Mention @roomote in a comment to request specific changes to this pull request or fix all unresolved issues. |
- 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
f30051f to
bf0b60e
Compare
Contributor
Reviewing your PR now. I'll share feedback in a few minutes! |
Contributor
Fixed the reported issues. All local checks passed. |
mrubens
approved these changes
Dec 3, 2025
Merged
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.
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.
Summary
This PR removes the
insert_contenttool from both native tool calls and XML protocol.Changes
Deleted Files
src/core/prompts/tools/insert-content.ts- XML tool descriptionsrc/core/prompts/tools/native-tools/insert_content.ts- Native tool definitionsrc/core/tools/InsertContentTool.ts- Tool implementationsrc/core/tools/__tests__/insertContentTool.spec.ts- Tool testsModified Files
packages/types/src/tool.ts- Removedinsert_contentfromtoolNamesarraysrc/shared/tools.ts- RemovedNativeToolArgs,InsertCodeBlockToolUseinterface,TOOL_DISPLAY_NAMES, andTOOL_GROUPSentriessrc/core/prompts/tools/index.ts- Removed import and tool description mappingsrc/core/prompts/tools/native-tools/index.ts- Removed import and array entrysrc/core/prompts/sections/rules.ts- Removedinsert_contentediting instructionssrc/core/prompts/sections/capabilities.ts- Removed from editing tools example arraysrc/core/prompts/responses.ts- Updated file guidance messagessrc/core/assistant-message/presentAssistantMessage.ts- Removed import and tool handling casesrc/core/assistant-message/NativeToolCallParser.ts- Removed parsing casesUpdated Test Files
src/shared/__tests__/modes.spec.tssrc/core/prompts/__tests__/mode-aware-sections.spec.tssrc/core/prompts/__tests__/sections.spec.tssrc/core/prompts/tools/__tests__/filter-tools-for-mode.spec.tssrc/core/task/__tests__/native-tools-filtering.spec.tsTesting
Important
The PR removes the
insert_contenttool from the codebase, updating various files and tests to eliminate its usage.insert-content.tsinsrc/core/prompts/tools/,src/core/prompts/tools/native-tools/,src/core/tools/, andsrc/core/tools/__tests__/.tool.ts: Removedinsert_contentfromtoolNames.tools.ts: RemovedNativeToolArgs,InsertCodeBlockToolUse,TOOL_DISPLAY_NAMES, andTOOL_GROUPSentries.index.tsinsrc/core/prompts/tools/andsrc/core/prompts/tools/native-tools/: Removed import and tool description mapping.rules.tsandcapabilities.ts: Removedinsert_contentreferences.presentAssistantMessage.tsandNativeToolCallParser.ts: Removed handling and parsing cases.modes.spec.ts,mode-aware-sections.spec.ts,sections.spec.ts,filter-tools-for-mode.spec.ts,native-tools-filtering.spec.ts: Removedinsert_contentreferences.This description was created by
for c72e263. You can customize this summary. It will automatically update as commits are pushed.