Skip to content

Conversation

evandavid1
Copy link

@evandavid1 evandavid1 commented Sep 14, 2025

Key features

  • Custom prompts accept arguments: $1..$9, $ARGUMENTS, and $$ (literal)
  • @ file picker in composer: type @ to fuzzy‑search and insert quoted paths
  • Frontmatter hints: optional description + argument-hint shown in palette (body stripped before send)

Why

  • Make saved prompts reusable with runtime parameters.
  • Improve discoverability with concise, helpful hints in the slash popup.
  • Preserve privacy and approvals; no auto‑execution added.

Details

  • Protocol: extend CustomPrompt with description, argument_hint (optional).
  • Core: parse minimal YAML‑style frontmatter at file top; strip it from the submitted body.
  • TUI: expand arguments; insert @ paths; render description/argument-hint or fallback excerpt.
  • Docs: prompts.md updated with frontmatter and argument examples.

Tests

  • Frontmatter parsing (description/argument-hint extracted; body stripped).
  • Popup rows show description + argument-hint; excerpt fallback; builtin name collision.
  • Argument expansion for $1..$9, $ARGUMENTS, $$; quoted args and @ path insertion.

Safety / Approvals

  • No changes to approvals or sandboxing; prompts do not auto‑run tools.

Related

Copy link

github-actions bot commented Sep 14, 2025


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

@evandavid1 evandavid1 changed the title Local prompts: .., + @ file picker + frontmatter hints Local prompts: $1..$9, $ARGUMENTS + @ file picker + frontmatter hints Sep 14, 2025
@evandavid1 evandavid1 changed the title Local prompts: $1..$9, $ARGUMENTS + @ file picker + frontmatter hints tui: local prompt arguments, @ file picker, frontmatter hints Sep 14, 2025
@evandavid1 evandavid1 changed the title tui: local prompt arguments, @ file picker, frontmatter hints Custom prompts: arguments ($1..$9, $ARGUMENTS) + @ file picker + frontmatter hints Sep 14, 2025
@evandavid1 evandavid1 force-pushed the feat/local-prompt-args-and-at-file branch 2 times, most recently from 5cef78a to b337ab5 Compare September 14, 2025 04:17
@evandavid1
Copy link
Author

recheck

@evandavid1 evandavid1 force-pushed the feat/local-prompt-args-and-at-file branch 2 times, most recently from 09f582c to f7791c9 Compare September 14, 2025 04:40
@evandavid1 evandavid1 marked this pull request as draft September 14, 2025 05:02
@evandavid1
Copy link
Author

evandavid1 commented Sep 14, 2025

Converting to draft to align with the Contributing guide (feature proposals should be discussed/approved before review). This PR implements a narrowly scoped, backward‑compatible change set and addresses existing enhancement requests (#2890) and related reports (#3265). I’m happy to adjust scope or split this further per maintainer guidance. Requesting a maintainer’s thumbs‑up on the approach (arguments .., , 44259; @ file picker inserts paths; optional frontmatter hints surfaced in the palette; no tool auto‑exec; tests + docs included).

@evandavid1 evandavid1 changed the title Custom prompts: arguments ($1..$9, $ARGUMENTS) + @ file picker + frontmatter hints Custom prompts: passing arguments ($1..$9, $ARGUMENTS) + @ file picker + frontmatter hints Sep 14, 2025
@evandavid1
Copy link
Author

recheck

@evandavid1 evandavid1 closed this Sep 14, 2025
@evandavid1 evandavid1 reopened this Sep 14, 2025
@github-actions github-actions bot locked and limited conversation to collaborators Sep 14, 2025
@evandavid1 evandavid1 force-pushed the feat/local-prompt-args-and-at-file branch 4 times, most recently from d4c45f9 to 94c4e23 Compare September 22, 2025 04:22
…cker; frontmatter hints in palette

Protocol: CustomPrompt carries description/argument_hint. Core parses minimal frontmatter and strips it from body. TUI shows hints in slash popup; falls back to five-word excerpt. Docs: prompts.md examples.
@evandavid1 evandavid1 force-pushed the feat/local-prompt-args-and-at-file branch from 94c4e23 to 80799b7 Compare September 23, 2025 04:56
@dedrisian-oai dedrisian-oai marked this pull request as ready for review September 24, 2025 22:48
@dedrisian-oai dedrisian-oai changed the base branch from main to daniel/custom-prompt-args September 25, 2025 01:17
@dedrisian-oai dedrisian-oai changed the base branch from daniel/custom-prompt-args to feat/custom-prompts-frontmatter September 25, 2025 01:23
@dedrisian-oai
Copy link
Collaborator

Hey @evandavid1, looks great and thanks a ton for your contribution! 🙌

In the interest of being very quick ⚡️ I'm going to merge this into a new branch (feat/custom-prompts-frontmatter) and make some modifications to combine it with named args. Will hopefully be merged into main soon.

@dedrisian-oai dedrisian-oai merged commit f7da902 into openai:feat/custom-prompts-frontmatter Sep 25, 2025
5 of 19 checks passed
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.

Custom prompts - passing arguments
2 participants