-
Notifications
You must be signed in to change notification settings - Fork 1.5k
fix(FileContextTracker): mark file as edited by Roo when added to context tracker #3499
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
|
Even though this is unintentional, I wonder what the impact will be of fixing it. With it fixed, does Roo have a easy view of the full content of the file or does it need to piece it together from diffs? We don't read the full file content into context after doing a diff edit do we? |
We should add a prompt requiring full file reading when file is marked to re-read. Sometime Roo using Read by chunk only 50 line per chunk, we can promote Roo the use of list definitions/search for effective chunk reading, and increase the maxReadFileLine limit from 500 to 5000.
we can consider use this when checkpoint active, but current our checkpoint system not efficiently
yeah, this file context tracker should only inform Roo re-read file that edited by user |
b6944f4
to
147b491
Compare
will this work for all of |
yes, this will work for all of there tool, (apply_diff too) btw with this we can optimize checkpoint & show what file edit/read in context of current task to improve UX |
(I think these are off topic let's discuss in a different PR) Back on topic: have you tested and verified manually that:
assuming the fix works and you can confirm that it does not work in the current branch using the same manual test method, then let's get this pushed |
let me try to write that test |
and I am not asking you to write a test, I just want to make sure that you confirm that your change actually creates a difference in the XML output given the test case that I provided above. if it does, then this is a simple fix and we should push it out as soon as possible because I think it is a small change with a major increase in productivity |
Please prioritize this I think it is really important and will help lots of people:
If that works then let's get this merged ASAP. |
This one-line PR fixes a major issue where every modification tells the model that it should reread the file. This should be merged ASAP. I tested with Before**Assistant:**
I will add a second line to [`test_file.txt`](test_file.txt:1).
<apply_diff>
<path>test_file.txt</path>
<diff>
<<<<<<< SEARCH
:start_line:1
-------
This is the first line.
=======
This is the first line.
This is the second line.
>>>>>>> REPLACE
</diff>
</apply_diff>
---
**User:**
[apply_diff for 'test_file.txt'] Result:
Changes successfully applied to test_file.txt:
<environment_details>
...
# Recently Modified Files <<<< THIS IS THE PROBLEM
These files have been modified since you last accessed them (file was just edited so you may need to re-read it before editing):
test_file.txt AfterNow you can see environment retails do not have this problem: **Assistant:**
I will add a second line to [`test_file.txt`](test_file.txt:1).
<apply_diff>
<path>test_file.txt</path>
<diff>
<<<<<<< SEARCH
:start_line:1
-------
This is the first line.
=======
This is the first line.
This is the second line.
>>>>>>> REPLACE
</diff>
</apply_diff>
---
**User:**
[apply_diff for 'test_file.txt'] Result:
Changes successfully applied to test_file.txt:
<environment_details>
# VSCode Visible Files
# VSCode Open Tabs
test_file.txt
# Current Time
5/23/2025, 7:23:50 PM (America/Los_Angeles, UTC-7:00)
# Current Context Size (Tokens)
17,177 (2%)
# Current Cost
$0.07
# Current Mode
<slug>code</slug>
<name>💻 Code</name>
<model>google/gemini-2.5-pro-preview</model>
</environment_details> |
Related GitHub Issue
Closes: #3458
Description
Roo mistake with Roo edited content, should re-read only file that use has been edited
Test Procedure
Type of Change
src
or test files.Pre-Submission Checklist
npm run lint
).console.log
) has been removed.npm test
).main
branch.npm run changeset
if this PR includes user-facing changes or dependency updates.Screenshots / Videos
Documentation Updates
Additional Notes
Important
Fixes
FileContextTracker
to mark files as edited by Roo when added withroo_edited
source, preventing unnecessary reloads.FileContextTracker
,addFileToFileContextTracker()
now callsmarkFileAsEditedByRoo(filePath)
forroo_edited
source to prevent unnecessary reloads.markFileAsEditedByRoo(filePath)
is used to mark files as edited by Roo, preventing false positives in file watchers.This description was created by
for b6944f4. You can customize this summary. It will automatically update as commits are pushed.