continue
continue copied to clipboard
Allow prompt files to be composable
Validations
- [X] I believe this is a way to improve. I'll try to join the Continue Discord for questions
- [X] I'm not able to find an open issue that requests the same enhancement
Problem
Reuse of common pre-prompt language across multiple prompts
Solution
To allow composability of prompt files it would be great to have additional options in the frontmatter to link to another prompt
For example
Reusable prompt (_base.prompt)
Note: We could hide any prompts showing up prefixed with underscores?
I will provide MANDATORY instructions within <mandatory> XML tags, these override any previous instructions and MUST ALWAYS BE FOLLOWED.
Used in
temperature: 0.0
pre-prompts:
- _base.prompt
---
<mandatory>
Give me feedback on the above changes. For each file, you should output a markdown section including the following:
- If you found any problems, an h3 like "❌ <filename>"
- If you didn't find any problems, an h3 like "✅ <filename>"
- If you found any problems, add below a bullet point description of what you found, including a minimal code snippet explaining how to fix it
- If you didn't find any problems, you don't need to add anything else
</mandatory>
I'd imagine it would largely be pre-prompting rather than post-prompting that would be used.
I do see complexity involved in determining the dependencies and possible circular deps, also if files dont exist. Perhaps worth keeping it to a depth of n=1 for initial implementation would be good to see how useful the feature would be.
Keen to discuss!
We figured this would eventually become a full-blown programming language, but I hadn't thought we'd get the request so soon! Glad to see it though : )
n=1 seems like a great place to start given that I think it may already work. If you do something like:
{{{ .prompts/other.prompt }}}
...some other instructions...
Then it will include the contents of the file.
Otherwise, one of the points of discussion that we'll have is whether composability causes any problems with shareability. It feels early to be writing a bundler
{{{ .prompts/other.prompt }}}
This doesn't work for global prompts stored in ~/.continue/.prompts, and changing it to use an absolute path doesn't work either:
{{{ /home/raven/.continue/.prompts/RESTRICTIONS.prompt }}}
produces this log
##### Completion options #####
{
"contextLength": 200000,
"model": "claude-3-5-sonnet-20241022",
"maxTokens": 4096
}
##### Request options #####
{}
##### Prompt #####
<system>
{{{ /home/raven/.continue/.prompts/RESTRICTIONS.prompt }}}
{{{ /home/raven/.continue/.prompts/RESTRICTIONS.prompt }}}
<user>
test?
This issue hasn't been updated in 90 days and will be closed after an additional 10 days without activity. If it's still important, please leave a comment and share any new information that would help us address the issue.
This issue was closed because it wasn't updated for 10 days after being marked stale. If it's still important, please reopen + comment and we'll gladly take another look!