continue icon indicating copy to clipboard operation
continue copied to clipboard

Allow prompt files to be composable

Open ghandic opened this issue 1 year ago • 2 comments

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!

ghandic avatar Sep 08 '24 23:09 ghandic