-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Hack: remove line numbers from reads and diffs #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
base: main
Are you sure you want to change the base?
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 datasets read_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 datasets Content 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 <roo-code@z.ewheeler.org>
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 <roo-code@z.ewheeler.org>
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 <roo-code@z.ewheeler.org>
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 8000 others who may wish to test the behavior.
what does it do?
This branch:
apply_diff
if 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_file
start/end rangesSo, I have built this into my daily driver and will report my findings and continue to refine this.
Long term goals