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

Autopilot suggesting changes to its own files #183

Open
Zoneflow opened this issue Jun 29, 2023 · 2 comments
Open

Autopilot suggesting changes to its own files #183

Zoneflow opened this issue Jun 29, 2023 · 2 comments
Labels
Usage Support Helping a user with usage

Comments

@Zoneflow
Copy link

Describe the issue
Everything works well for me using Github Issues on my repo. In my local project though, when I use autopilot from the terminal, it tries suggesting changes to its own files (ui.jk and something in benchmarks). I believe I fixed the issue, although I ended up using too many tokens to complete the task so didn't end up reviewing all the code. It did end up making suggestions to the right files after editing getFiles.js. Not totally a support request since I suppose I solved it for myself.

Version details
AutoPilot version tested: a6af6713400b4ba64dd17f0324b6ebf5c65dfad9

Node version: v18.16.1

Expected behavior
I expected autopilot to suggest changes to the .dart files in my lib directory. Instead it only suggested changes to one file, and then wanted to make UI changes using autopilot's ui.js and something from benchmarks. I edited getFiles.js to only suggest changes for files in my lib directory. That works for me but could maybe lead to undesired behaviour for others.

@Zoneflow Zoneflow added the Usage Support Helping a user with usage label Jun 29, 2023
@codeautopilot
Copy link

codeautopilot bot commented Jun 29, 2023

Based on your description, it seems like you've found a workaround for your issue by modifying getFiles.js to limit Autopilot's suggestions to the .dart files in your lib directory. However, without seeing the actual changes you made to getFiles.js, it's hard to fully understand the implications of your solution.

While your solution works for your specific case, it might not be suitable for all users. Autopilot is designed to suggest changes to a wide range of files, not just those in a specific directory. Limiting its scope could potentially prevent it from suggesting useful changes to other parts of the codebase.

If you're comfortable sharing, could you please provide the version of getFiles.js that you modified? This would help us understand your solution better and assess whether it could be a viable option for other users experiencing similar issues.

In the meantime, you might want to consider reverting your changes to getFiles.js and instead use a .autopilotignore file to exclude specific files or directories from Autopilot's suggestions. This would allow you to prevent Autopilot from suggesting changes to its own files without limiting its scope to a specific directory. Here's an example of how you might set up your .autopilotignore file:

# .autopilotignore
ui.js
benchmarks/

This would exclude ui.js and everything in the benchmarks directory from Autopilot's suggestions.

Changes on user's lib directory

The file in the user's lib directory is empty, so there's no specific code to review or analyze. However, in general, you should look for any patterns or structures in the .dart files that might be causing Autopilot to suggest changes to its own files. If the user has already made changes to getFiles.js to limit the suggestions to the lib directory, you might want to consider whether this is a suitable solution for all users or if it could cause other issues.

Changes on getFiles.js

Since the file getFiles.js is new and doesn't contain any code, there's nothing to review or suggest changes for in this file. The user mentioned that they made changes to this file to solve their issue, but without the actual code, it's impossible to understand what changes were made and how they could affect other users. The user should be asked to provide the version of getFiles.js that they modified.


Current plan usage: 64.37%


Have feedback or need help?
Send me an email to [email protected] - my name is Fábio
Join us on Discord

@fjrdomingues
Copy link
Owner

@Zoneflow were you pointing autopilot to the right folder with
CODE_DIR=/path/to/yourfolder
?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Usage Support Helping a user with usage
Projects
None yet
Development

No branches or pull requests

2 participants