-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Add debug-only slash command for rollout path #5936
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
Add debug-only slash command for rollout path #5936
Conversation
codex-rs/tui/src/slash_command.rs
Outdated
| | SlashCommand::Feedback | ||
| | SlashCommand::Quit => true, | ||
|
|
||
| #[cfg(debug_assertions)] |
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.
is there a way to have #[cfg(debug_assertions)] in fewer places? Maybe only where we filter commands from visible list?
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.
Matches are inclusive, once it appears in the definition, it should be everywhere.
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.
What I mean is can we compile this command for all configs and hide for non-debug ones?
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.
lemme play with it
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 code this
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.
Summary
- Made the
RolloutandTestApprovalslash command variants compile in all builds while preserving their descriptions and task-availability metadata. codex-rs/tui/src/slash_command.rsL28-L81 - Added an
is_visiblehelper so built-in command enumeration filters out debug-only entries outside debug builds, keeping the commands hidden from release users. codex-rs/tui/src/slash_command.rsL84-L97
Testing
- ✅
cargo test -p codex-tui
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.
@pakrym-oai done
## Summary - add a debug-only `/rollout` slash command that prints the rollout file path or reports when none is known - surface the new command in the slash command metadata and cover it with unit tests - compile the `/rollout` slash command in all builds and hide it from the release command list ## Testing - cargo test -p codex-tui ------ https://chatgpt.com/codex/tasks/task_i_6902bd0edd8083219abc8cd4e24c3fcb
codex-rs/tui/src/chatwidget/tests.rs
Outdated
| } | ||
| } | ||
|
|
||
| #[cfg(debug_assertions)] |
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.
can we remove this too?
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.
done
Summary
/rolloutslash command that prints the rollout file path or reports when none is known