Skip to content

Conversation

dedrisian-oai
Copy link
Collaborator

[Cherry picked from https://github.com//pull/3565]

Removes the frontmatter description/args from custom prompt files and only includes body.

/// - `description`: short description shown in the slash popup
/// - `argument-hint` or `argument_hint`: brief hint string shown after the description
/// Returns (description, argument_hint, body_without_frontmatter).
fn parse_frontmatter(content: &str) -> (Option<String>, Option<String>, String) {
Copy link
Collaborator

@aibrahim-oai aibrahim-oai Sep 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we have this more general so that we can include other arguments for future work? Maybe it can return an enum of different structs. We can start by a struct carrying description, argument_hint for special prompts.

@dedrisian-oai dedrisian-oai merged commit 83a4d4d into main Sep 29, 2025
19 checks passed
@dedrisian-oai dedrisian-oai deleted the feat/parse-out-frontmatter branch September 29, 2025 20:06
@github-actions github-actions bot locked and limited conversation to collaborators Sep 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants