mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
## Summary - remove protocol and core support for discovering and listing custom prompts - simplify the TUI slash-command flow and command popup to built-in commands only - delete obsolete custom prompt tests, helpers, and docs references - clean up downstream event handling for the removed protocol events
1.4 KiB
1.4 KiB
Custom prompts
Save frequently used prompts as Markdown files and reuse them quickly from the slash menu.
- Location: Put files in
$CODE_HOME/prompts/(defaults to~/.code/prompts/; Code also reads legacy~/.codex/prompts/). - File type: Only Markdown files with the
.mdextension are recognized. - Name: The filename without the
.mdextension becomes the slash entry. For a file namedmy-prompt.md, type/my-prompt. - Content: The file contents are sent as your message when you select the item in the slash popup and press Enter.
- Arguments: Local prompts support placeholders in their content:
$1..$9expand to the first nine positional arguments typed after the slash name$ARGUMENTSexpands to all arguments joined by a single space$$is preserved literally- Quoted args: Wrap a single argument in double quotes to include spaces, e.g.
/review "docs/My File.md".
- How to use:
- Start a new session (Code loads custom prompts on session start).
- In the composer, type
/to open the slash popup and begin typing your prompt name. - Use Up/Down to select it. Press Enter to submit its contents, or Tab to autocomplete the name.
- Notes:
- Files with names that collide with built‑in commands (e.g.
/init) are ignored and won’t appear. - New or changed files are discovered on session start. If you add a new prompt while Code is running, start a new session to pick it up.
- Files with names that collide with built‑in commands (e.g.