continue icon indicating copy to clipboard operation
continue copied to clipboard

Can't reference local block inside ~/.continue folder using relative filepath

Open TelpeNight opened this issue 4 months ago • 0 comments

Before submitting your bug report

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'

TelpeNight avatar Jun 13 '25 02:06 TelpeNight