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

Chunking retrieval strategies aren't using consistent filepathing #2378

Open Patrick-Erichsen opened 1 month ago

Patrick-Erichsen commented 1 month ago

Before submitting your bug report

Relevant environment info

- OS:
- Continue:
- IDE:
- Model:
- config.json:

Description

It appears that some chunks are stored with an absolute path, and some are stored with a relative path. At the last, this is causing issues in the context items peek, where certain files without an absolute path can't be opened. It seems like this is happening primarily with root level files, e.g. a package.json, but not always. There are some cases I've noticed where a root level file does open.

To reproduce

  1. Add a breakpoint here to see the filepath when you click on a context item: https://github.com/continuedev/continue/blob/e0911b5d628cf2af1753f516835852e1ef6c817e/gui/src/components/mainInput/ContextItemsPeek.tsx#L83
  2. Use an @codebase in Chat with this text: "What is in our package.json"
  3. Try clicking on the package.json context item in the peek
  4. Confirm that it doesn't open

Log output

No response