continue
continue copied to clipboard
Can't reference local block inside ~/.continue folder using relative filepath
Before submitting your bug report
- [x] I believe this is a bug. I'll try to join the Continue Discord for questions
- [x] I'm not able to find an open issue that reports the same bug
- [x] I've seen the troubleshooting guide on the Continue Docs
Relevant environment info
- OS: macOS
- Continue version: 1.0.21
- IDE version: JetBrains
Description
This bug should be easy to fix.
I've tried to reference local block as:
docs:
- uses: ./blocks/docs/new-doc.yaml
But it fails with message Assistant includes blocks that don't exist.
After playing around it, reading logs and source code I've discovered the following:
Failed to unroll block ./blocks/docs/new-doc.yaml: ENOENT: no such file or directory, open 'Users/name/.continue/blocks/docs/new-doc.yaml'
This file exists and full path to it will work. But notice that abs file path misses leading slash.
I think that the issue is in the following code:
https://github.com/continuedev/continue/blob/00911c6055f8c23f08bcb12065ed2c5b04bc7209/core/config/yaml/loadYaml.ts#L113
Note, that getCleanUriPath with strip leading slash from packageIdentifier.filePath. Hope this will help. Can't wait to use relative paths for better organized workflow)
To reproduce
No response
Log output
Failed to unroll block ./blocks/docs/new-doc.yaml: ENOENT: no such file or directory, open 'Users/name/.continue/blocks/docs/new-doc.yaml'