-
Notifications
You must be signed in to change notification settings - Fork 6.5k
feat: support arguments in Custom Prompts #4040
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: support arguments in Custom Prompts #4040
Conversation
|
All contributors have signed the CLA ✍️ ✅ |
|
I have read the CLA Document and I hereby sign the CLA |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Codex Review: Here are some suggestions.
About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".
5826777 to
a02b19e
Compare
|
Codex Review: Didn't find any major issues. Breezy! About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback". |
|
Interested to know what's diff vs. #3565 |
I think almost same but have different view for that issue, OAI team let the history navigation doesn't works with it so they disabled history nav with custom promtps so I fixed it to works with this pr. |
|
Note To use Codex here, create an environment for this repo. |
1 similar comment
|
Note To use Codex here, create an environment for this repo. |
…TS, $0..$9) Implements token substitution when submitting a selected custom prompt via the slash popup. - Adds parsing of positional args from the composer first line. - Supports $ARGUMENTS (joined args), $0 (prompt name), and $1..$9 (positionals). - Leaves tokens intact when a referenced positional is missing. - Includes unit tests for joined, positional, and missing cases. Note: handling of history overrides and typed slash commands without popup are deferred to a later commit.
Core: parse minimal front matter and capture description (if present), stripping it from the body.\nProtocol: extend CustomPrompt with optional description.\nTUI: display prompt.description in the command popup (fallback to default when absent).\nTests: updated to include description: None for constructed prompts.
Composer: capture raw input when submitting a custom prompt, and set a one-shot history override. Also block history navigation for '/ ' contexts until prompts finish loading, and expand typed custom prompts even when the popup is not used. BottomPane: expose take_next_history_override for ChatWidget. ChatWidget: persist history using override text when present, keeping conversation text unchanged. fix: Substite $ARGUMENTS with all multiline inputs.
a02b19e to
cd402d7
Compare
|
Is this a duplicate of PR #3164 ? |
I think not exactly but have common to support $ARGUMENTS. I think this issue has been around for 3 weeks, so there are more than 3 PRs for this one. I created this for my own use and to help get OAI working. |
|
Codex Review: Didn't find any major issues. Nice work! About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback". |
|
I can't wait for this demand any longer. |
Recent updates:
I believe it should be in |
|
Thanks for the contribution, and apologies for the slow response. We've received many PRs, and we don't have the bandwidth on the codex team to review all of them. I think this PR is no longer needed. The linked feature request is marked as completed. |
What
Why
How
Prompt with Arguments
Description Showing in Slash Popup
Works as Expected!
Backward Compatibility
Notes
I have read the CLA Document and I hereby sign the CLA