mirror of
https://github.com/openai/codex.git
synced 2026-11-10 21:00:47 +00:00
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 - Closes #2890 - Related #3265 - Complements #3403
codex-protocol
This crate defines the "types" for the protocol used by Codex CLI, which includes both "internal types" for communication between codex-core and codex-tui, as well as "external types" used with codex mcp.
This crate should have minimal dependencies.
Ideally, we should avoid "material business logic" in this crate, as we can always introduce Ext-style traits to add functionality to types in other crates.