-
Notifications
You must be signed in to change notification settings - Fork 2.6k
WIP: optionally omit line number from reads and apply_diff requirements #1889
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
Conversation
|
|
Here is another problem with line numbers pointed out by @hannesrudolph: Actual content in the file:- GitHub Users page showing:
- List of GitHub usernames
- Link status
- Option to create new user or link to existing user
- Pagination for large datasetsread_file content result35 | - GitHub Users page showing:
36 | - List of GitHub usernames
37 | - Link status
38 | - Option to create new user or link to existing user
39 | - Pagination for large datasetsContent match that AI tries to replace in
|
63ddbee to
a660b24
Compare
* timeouts for individual servers * changeset * remove logger * use const and descriptive function for time settings
This reverts commit 87670a3.
a660b24 to
d6fe15b
Compare
this tool does not work without line numbers
This reverts commit 41c871d.
The insert_content tool was intended for appending content only, but the code allowed arbitrary line numbers which could corrupt files. This change enforces that line_number must be 0 (append-only mode) to prevent file corruption. Signed-off-by: Eric Wheeler <[email protected]>
Add documentation showing how to use insert_content in conjunction with write_to_file to handle files that exceed output limits by breaking them into multiple append operations. Signed-off-by: Eric Wheeler <[email protected]>
Add line count check to writeToFileTool to only require apply_diff for files that are more than 25 lines long. This allows write_to_file to work on small existing files while still protecting larger files that need more careful modification. Signed-off-by: Eric Wheeler <[email protected]>
|
Hey @KJ7LNW, |
I am still working on this and I maintain it every time I rebuild my local tree for further testing. I have been using this pull request for months, and it works great, but we will need an option so users can toggle the feature, which has not yet been implemented. This pull request was created before the requirement of having an issue for each pull request, so here it is: #4008 |
|
stale |
Roo read_file/apply_diff Hackfest
Today @hannesrudolph and I we are troubleshooting strange Claude hallucinations related to line numbers and other issues. While troubleshooting that, I hacked together these few commits.
Do not merge this! --- at least not yet. I am sharing this with the community for feedback and for others who may wish to test the behavior.
what does it do?
This branch:
apply_diffif a file exists (write_to_file is denied)Background
While there are places where line numbers are useful, line numbers in file reads have a few issues:
|symbol because it interferes with the line number separator and confuses the model (just try to edit a markdown table, I dare you...)123 |There are places where line numbers are useful, here are a few:
read_filestart/end rangesSo, I have built this into my daily driver and will report my findings and continue to refine this.
Long term goals