-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Labels
Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.Someone is actively working on this. Should link to a PR soon.bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Description
Description
The insert_content tool fails when attempting to insert content into files that don't exist yet. This happens both when trying to append (line=0) and when trying to insert at the beginning (line=1).
Version Information
- App Version: v3.17.1
- API Provider: Anthropic
- Model: Claude 3.7 Sonnet
Expected Behavior
The insert_content tool should be able to create missing files when:
- Appending content (line=0)
- Inserting at the beginning (line=1)
Similar to how write_to_file creates missing files and directories.
Actual Behavior
The tool returns an error: "File does not exist at path: [filepath]"
Steps to Reproduce
- Try to use
insert_contenton a non-existent file with line=0 (append) - Try to use
insert_contenton a non-existent file with line=1 (insert at beginning)
Error Messages
File does not exist at path: /home/ewheeler/src/roo/Roo2/test_nonexistent_append.txt
The specified file could not be found. Please verify the file path and try again.
Additional Context
This limitation reduces the flexibility of the insert_content tool. Users must first create empty files with write_to_file before they can use insert_content, which adds unnecessary steps to the workflow.
dosubot
Metadata
Metadata
Assignees
Labels
Issue - In ProgressSomeone is actively working on this. Should link to a PR soon.Someone is actively working on this. Should link to a PR soon.bugSomething isn't workingSomething isn't workingenhancementNew feature or requestNew feature or request
Type
Projects
Status
Done