Skip to content

feat(codex): add custom prompt composer support#1114

Closed
gbarros-dev wants to merge 3 commits intopingdotgg:mainfrom
gbarros-dev:feat/codex-custom-prompts
Closed

feat(codex): add custom prompt composer support#1114
gbarros-dev wants to merge 3 commits intopingdotgg:mainfrom
gbarros-dev:feat/codex-custom-prompts

Conversation

@gbarros-dev
Copy link
Contributor

@gbarros-dev gbarros-dev commented Mar 15, 2026

Summary

  • add Codex custom prompt discovery from project-local .codex/prompts and global CODEX_HOME / ~/.codex prompt folders
  • surface custom prompts in the composer slash menu with client-side expansion before send
  • preload prompts per active project and immediately send zero-arg prompts on selection when the composer has no attachments
  • keep a hidden dev-only custom prompt debug banner available for local troubleshooting

Testing

  • bun fmt
  • bun lint
  • bun typecheck
  • bun run test src/lib/codexReactQuery.test.ts
  • bun run test:browser -- src/components/ChatView.browser.tsx
Screenshot 2026-03-15 at 11 41 59

Note

Add custom prompt composer support to Codex chat

  • Adds a listCodexCustomPrompts function in codexCatalog.ts that discovers markdown prompt files from project-local .codex/prompts and a global ~/.codex directory, parsing YAML-like frontmatter for description and argument hints.
  • Exposes the prompt list over WebSocket via a new codex.listCustomPrompts RPC method, served by wsServer.ts.
  • Integrates custom prompts into ChatView.tsx: when the provider is codex, the composer command menu lists and filters prompts, auto-inserts argument scaffolding with cursor placement, supports Tab to move between argument fields, and immediately sends zero-argument prompts.
  • On send, expands prompt invocations into final message text using shared helpers in packages/shared/src/codex.ts; parse errors surface as thread errors and block send.
  • Removes the slash-command whitelist in detectComposerTrigger so arbitrary /<token> commands are recognized, enabling autocomplete for custom prompt names.

Macroscope summarized a56d26b.

@coderabbitai
Copy link

coderabbitai bot commented Mar 15, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 50313a05-fdc3-4a57-b5c3-ee7c085339c4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list. labels Mar 15, 2026
@maria-rcks
Copy link
Collaborator

closing as not planned for now
cc @juliusmarminge

@maria-rcks maria-rcks closed this Mar 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ changed lines (additions + deletions). vouch:trusted PR author is trusted by repo permissions or the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants