-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Add invokable rule support to cli #8077
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
|
|
✅ Review Complete Likely cause: Expired CONTINUE_API_KEY or missing continuedev/review-bot assistant 📋 View workflow logs for details. |
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 issues found across 4 files
| const ruleObj = rule as any; | ||
| return { | ||
| name: ruleObj.name || "", | ||
| description: ruleObj.description || "", | ||
| category: "assistant" as const, |
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.
Some Concerns x Clarifying Question 🤔
I can understand that this (rules) mostly firsthand would be coming from the continue-hub, which means the name x command just might seem unique but incases where we are reading invokable from local...
- How do we handle conflicts in same slash-command???
- Well yes, since you cannot have 2 files with same name in local, there might not be conflict... but what happens when a rule from the continue-hub meets with an invokable one in local???
- Think what also happens when a systemCommand, assistantCommand conflicts an invokableRuleCommand?
I'm looking forward to having invokablePromptsCommand support though (see #8080), this where I figure the different init slash command...
- One's a system prompt in the IDE extension that "Initialize Codebase"
- Thee other's the slash command that "creates the AGENTS.md file" in the continue-cli
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.
@babblebey this is not a problem (yet) because we currently do not support local commands in the CLI. That said, there is an implicit order of resolution that goes roughly like this:
- System commands (highest priority)
- Assistant prompts
- Invokable rules (lowest priority)
I believe it is a part of our roadmap to also add local slash commands to the CLI, and when that moment comes we may need to come up with a better resolution system.
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.
It's not a problem until its a problem 😉
Good to know... and I definitely look forward to the local prompt support though... It give that feel of portability of continue with projects.
| if (!rule || typeof rule === "string") { | ||
| return false; | ||
| } | ||
| const ruleObj = rule 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.
Can avoid any type with RuleObject type or using zod schema from config-yaml
|
🎉 This PR is included in version 1.26.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.24.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.2.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Add invokable rule support to cli
AI Code Review
@continue-reviewChecklist
Screen recording or screenshot
[ When applicable, please include a short screen recording or screenshot - this makes it much easier for us as contributors to review and understand your changes. See this PR as a good example. ]
Tests
[ What tests were added or updated to ensure the changes work as expected? ]
Summary by cubic
Adds invokable rule support to the CLI so users can run assistant rules with invokable: true as slash commands (e.g., /review). The slash command menu now lists these rules.