mirror of
https://github.com/pchuan98/codex.git
synced 2026-07-01 00:31:56 +08:00
Remove remaining custom prompt support (#16115)
## 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
This commit is contained in:
committed by
GitHub
Unverified
parent
fce0f76d57
commit
48144a7fa4
@@ -1,3 +0,0 @@
|
||||
# Custom prompts
|
||||
|
||||
For an overview of custom prompts, see [this documentation](https://developers.openai.com/codex/custom-prompts).
|
||||
@@ -81,8 +81,6 @@ Key effects when disabled:
|
||||
|
||||
- When `popups_enabled` is `false`, `sync_popups()` forces `ActivePopup::None`.
|
||||
- When `slash_commands_enabled` is `false`, the composer does not treat `/...` input as commands.
|
||||
- When `slash_commands_enabled` is `false`, the composer does not expand custom prompts in
|
||||
`prepare_submission_text`.
|
||||
- When `slash_commands_enabled` is `false`, slash-context paste-burst exceptions are disabled.
|
||||
- When `image_paste_enabled` is `false`, file-path paste image attachment is skipped.
|
||||
- `ChatWidget` may toggle `image_paste_enabled` at runtime based on the selected model's
|
||||
@@ -107,12 +105,8 @@ the input starts with `!` (shell command).
|
||||
|
||||
1. Expands any pending paste placeholders so element ranges align with the final text.
|
||||
2. Trims whitespace and rebases element ranges to the trimmed buffer.
|
||||
3. Expands `/prompts:` custom prompts:
|
||||
- Named args use key=value parsing.
|
||||
- Numeric args use positional parsing for `$1..$9` and `$ARGUMENTS`.
|
||||
The expansion preserves text elements and yields the final submission payload.
|
||||
4. Prunes attachments so only placeholders that survive expansion are sent.
|
||||
5. Clears pending pastes on success and suppresses submission if the final text is empty and there
|
||||
3. Prunes attachments so only placeholders that survive trimming are sent.
|
||||
4. Clears pending pastes on success and suppresses submission if the final text is empty and there
|
||||
are no attachments.
|
||||
|
||||
The same preparation path is reused for slash commands with arguments (for example `/plan` and
|
||||
@@ -124,16 +118,6 @@ still available for `Ctrl+Y`. This supports flows where a user kills part of a d
|
||||
composer action such as changing reasoning level, and then yanks that text back into the cleared
|
||||
draft.
|
||||
|
||||
### Numeric auto-submit path
|
||||
|
||||
When the slash popup is open and the first line matches a numeric-only custom prompt with
|
||||
positional args, Enter auto-submits without calling `prepare_submission_text`. That path still:
|
||||
|
||||
- Expands pending pastes before parsing positional args.
|
||||
- Uses expanded text elements for prompt expansion.
|
||||
- Prunes attachments based on expanded placeholders.
|
||||
- Clears pending pastes after a successful auto-submit.
|
||||
|
||||
## Remote image rows (selection/deletion flow)
|
||||
|
||||
Remote image URLs are shown as `[Image #N]` rows above the textarea, inside the same composer box.
|
||||
|
||||
Reference in New Issue
Block a user