-
Notifications
You must be signed in to change notification settings - Fork 3.5k
feat: support uses
blocks locally
#7686
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
Conversation
@uinstinct yes, it should support both |
What I'd personally really love is slugified local references (like Alternatively, relative paths with (It's possible the above is out of scope, and if so, the current behavior in this PR can be worked into something similar, albeit a bit clunkier and more fragile, but it's definitely a solid start. 👍🏼 ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@uinstinct let's find an approach that allows using hub slugs in the same assistant. I think you can handle it at the registry level
const sections = ["models", "mcpServers", "prompts", "rules"] as const; | ||
return sections.some( | ||
(section) => | ||
Array.isArray(assistant[section]) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe all this type checking should be unnecessary since we use zod to load the YAML. Might requires some nullable checks but otherwise should be typesafe
if (maybeHasLocalUsesBlocks(config)) { | ||
const registryClient = await getRegistryClient(); | ||
const unrolled = await unrollBlocks( | ||
config as any, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove any type casting
|
||
// If overrideConfigYaml still contains any local uses blocks, unroll them here | ||
type MinimalAssistantSections = { | ||
models?: any[]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no any types needed
@ShaunaGordon I think we could easily add the relative path from ~/.continue relative folder if ends in .yml/.yaml! |
Closing in favor of #7723 |
Description
Add support for having local
uses
block in config.yaml defined withfile://path/to/file
resolves CON-3869
closes #5943
closes #6107
AI Code Review
@continue-general-review
or@continue-detailed-review
Checklist
Screen recording or screenshot
feat.mp4
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Summary by cubic
Support local file includes in config.yaml via file:// uses blocks, so assistants can load models, MCP servers, prompts, and rules from nearby files. Addresses CON-3869; closes #5943 and #6107.