-
Notifications
You must be signed in to change notification settings - Fork 6.3k
Add user command event types #6246
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
Conversation
47c999a to
db43ab0
Compare
c042acf to
db43ab0
Compare
codex-rs/core/src/rollout/policy.rs
Outdated
| | EventMsg::ExitedReviewMode(_) | ||
| | EventMsg::UndoCompleted(_) | ||
| | EventMsg::TurnAborted(_) => true, | ||
| EventMsg::ExecCommandBegin(ev) => ev.is_user_shell_command, |
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.
why do we want to persist the user 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.
since the model will now be able to see the outputs of user shell commands, it wouldn't make sense if they are lost after resuming conversation. we're also persisting the associated response items since user shell input / outputs are represented as User Messages.
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.
I think we should persist only the response item user message, the event message is just for the UI. We decided to ignore execitems to make it easy to keep things backward comp.
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.
sure! it's done
| expression: rendered | ||
| --- | ||
| • Ran seq 1 10 1>&2 && false | ||
| • Ran: seq 1 10 1>&2 && false |
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.
looks like an unrelated change.
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.
i thought adding a colon would make it clearer since user commands will render as
You Ran: ls instead of You Ran ls for example
this is somewhat adjacent though so i'll get this in another PR
codex-rs/protocol/src/protocol.rs
Outdated
| /// True when this exec was initiated directly by the user (e.g. bang command), | ||
| /// not by the agent/model. Defaults to false for backwards compatibility. | ||
| #[serde(default)] | ||
| pub is_user_shell_command: bool, |
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.
Do we actually need this on the delta itself of can it be on start ?
pakrym-oai
left a comment
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 it enought to have is_user_shell_command only on the start?
codex-rs/tui/src/exec_cell/render.rs
Outdated
| let title = if self.is_active() { | ||
| "Running" | ||
| } else if call.is_user_shell_command { | ||
| "You Ran" |
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.
You ran ??
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.
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.
I mean You ran ... lowercase r.
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 could you change "You Ran" to "You ran"?
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
- Lowercased the user shell command header so completed commands now read “You ran …” per review feedback. codex-rs/tui/src/exec_cell/render.rsL312-L326
Testing
- ✅
just fmt(warnings aboutimports_granularity = Itembeing nightly-only)
e28905c to
3f81883
Compare
This reverts commit 5f6983a.
3f81883 to
056d13f
Compare
emit new events from user shell tasks, disable sandboxing for user shell commands, and present user shell commands to model

adding new user command event, logic in TUI to render user command events