Skip to content
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

New Setting: Post Edit Delay #1171

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

mrkmg
Copy link

@mrkmg mrkmg commented Feb 25, 2025

Description

Add a new setting: Post Edit Delay.

This new setting will force Roo to wait some number of second after any file edit. This can be useful for a number of reasons, like giving the user time to see what was changed before Roo moves on (and give a chance to stop the task), or allow language servers time to catch up (which should happen automatically but some misbehave [I am looking at you C#]).

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Added the new setting and tested in VSCode validating the following:

  • Setting is available in settings page
  • Setting persists between sessions
  • Delay is being triggered after file edits

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • (not needed) I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

N/A

Related Issues

N/A

Reviewers

@mrkmg mrkmg requested review from mrubens and cte as code owners February 25, 2025 05:21
Copy link

changeset-bot bot commented Feb 25, 2025

🦋 Changeset detected

Latest commit: ee7be50

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
roo-cline Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. enhancement New feature or request labels Feb 25, 2025
@mrubens
Copy link
Collaborator

mrubens commented Feb 25, 2025

Thanks for the PR! Is it different than this existing setting though?

Screenshot 2025-02-25 at 2 58 02 AM

@mrkmg
Copy link
Author

mrkmg commented Feb 25, 2025

I totally didn't see that setting... oh my gosh how silly of me.

I have just tested it and it appears to operate slightly differently.

Looking at it's implementation, it is being used in ChatView.tsx:

It behaves by delaying clicking the "Save" button by up to 5 seconds.

I have found the C# vscode extension is kind of crap, and it really wants the file "saved" before it will parse it correctly. When Roo uses write_to_file the C# extension has a straight up heart attack. I have even had it completely bork on me, leave phantom errors in its state, and cause Roo to go haywire trying to fix ghost errors.

The solution I have here delays reading the environment details by up to 60 seconds, after the "next call" has been initiated. This is well after the "save" click.

I guess.. it is duplicated functionality and Roo probably doesn't need both options.

I do think the existing option could probably have its timespan extended though. 5s isn't long enough for the user to see what happened and make any decisions. With my flow with Roo, I like it to be automatic, but give me enough time to react if I see Roo starts to do something I do not want it to do.

Thoughts @mrubens?

@mrkmg
Copy link
Author

mrkmg commented Feb 25, 2025

Maybe we could split the difference and have the existing setting happen after the "Save" is clicked, but before the next request starts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request size:M This PR changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants