continuedev / continue

⏩ Continue is the leading open-source AI code assistant. You can connect any models and any context to build custom autocomplete and chat experiences inside VS Code and JetBrains
https://docs.continue.dev/
Apache License 2.0
19.25k stars 1.66k forks source link

continueignore doesn't override gitignore #2889

Open richardbowman opened 4 days ago

richardbowman commented 4 days ago

Before submitting your bug report

Relevant environment info

- OS: Windows 11 / WSL2 (Ubuntu 22.04.3 LTS (GNU/Linux 5.15.153.1-microsoft-standard-WSL2 x86_64)
- Continue version: Latest pre-release (11/12/2024)
- IDE version:
- Model:
- config.json:

Description

I've got a directory of generated assets that are set to .gitignore:

schemas

That I want Continue's context to use. I've created a .continueignore file with:

!schemas

But this seems to have no effect.

To reproduce

No response

Log output

No response

sestinj commented 2 days ago

Hm yeah this is an interesting use case I hadn't thought of. I think that given our proclivity to leave the indexing logic stable as possible I might not immediately try and tackle this, but if you were interested in attempting a PR I'd be open to reviewing. It should be reasonably straightforward to verify the behavior with our tests

Out of curiosity, are these SQL database schemas?

richardbowman commented 2 days ago

In my case, they are GraphQL schemas. I'll see if I can get a version working. Any off the cuff notes on code areas to point me at?

On Thu, Nov 14, 2024 at 10:54 AM Nate Sesti @.***> wrote:

Hm yeah this is an interesting use case I hadn't thought of. I think that given our proclivity to leave the indexing logic stable as possible I might not immediately try and tackle this, but if you were interested in attempting a PR I'd be open to reviewing. It should be reasonably straightforward to verify the behavior with our tests

Out of curiosity, are these SQL database schemas?

— Reply to this email directly, view it on GitHub https://github.com/continuedev/continue/issues/2889#issuecomment-2476942321, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAL7ANCIV4C4J5FK33GXIDL2ATIVNAVCNFSM6AAAAABRUXVIWKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDINZWHE2DEMZSGE . You are receiving this because you authored the thread.Message ID: @.***>

sestinj commented 2 days ago

Yeah it's the walkDir function that is relevant: https://github.com/continuedev/continue/blob/39a8e158cf737910cd4950d947bb5e439ec7de6d/core/indexing/walkDir.ts#L17

Most importantly start with a few new test cases in walkDir.test.ts, that should make life a lot easier.

I also want to call out that there was a previous attempt at this, and I'd closed it because there was quite a lot of diff and it wasn't tested super rigorously. My benchmark for this is very high confidence from both tests and minimal changes that no critical behavior will drift.