aibrahim-oai
bc7beddaa2
feat: stream exec stdout events ( #1786 )
...
## Summary
- stream command stdout as `ExecCommandStdout` events
- forward streamed stdout to clients and ignore in human output
processor
- adjust call sites for new streaming API
2025-08-01 13:04:34 -07:00
Jeremy Rose
8360c6a3ec
fix insert_history modifier handling ( #1774 )
...
This fixes a bug in insert_history_lines where writing
`Line::From(vec!["A".bold(), "B".into()])` would write "B" as bold,
because "B" didn't explicitly subtract bold.
2025-08-01 10:37:43 -07:00
aibrahim-oai
b67c485d84
ci fix ( #1782 )
2025-08-01 09:17:13 -07:00
aibrahim-oai
e2c994e32a
Add /compact ( #1527 )
...
- Add operation to summarize the context so far.
- The operation runs a compact task that summarizes the context.
- The operation clear the previous context to free the context window
- The operation didn't use `run_task` to avoid corrupting the session
- Add /compact in the tui
https://github.com/user-attachments/assets/e06c24e5-dcfb-4806-934a-564d425a919c
2025-07-31 21:34:32 -07:00
easong-openai
575590e4c2
Detect kitty terminals ( #1748 )
...
We want to detect kitty terminals so we can preferentially upgrade their UX without degrading older terminals.
2025-08-01 00:30:44 +00:00
Jeremy Rose
4aca3e46c8
insert history lines with redraw ( #1769 )
...
This delays the call to insert_history_lines until a redraw is
happening. Crucially, the new lines are inserted _after the viewport is
resized_. This results in fewer stray blank lines below the viewport
when modals (e.g. user approval) are closed.
2025-07-31 17:15:26 -07:00
Jeremy Rose
d787434aa8
fix: always send KeyEvent, we now check kind in the handler ( #1772 )
...
https://github.com/openai/codex/pull/1754 and #1771 fixed the same thing
in colliding ways.
2025-08-01 00:13:36 +00:00
Jeremy Rose
ea69a1d72f
lighter approval modal ( #1768 )
...
The yellow hazard stripes were too scary :)
This also has the added benefit of not rendering anything at the full
width of the terminal, so resizing is a little easier to handle.
<img width="860" height="390" alt="Screenshot 2025-07-31 at 4 03 29 PM"
src="https://github.com/user-attachments/assets/18476e1a-065d-4da9-92fe-e94978ab0fce "
/>
<img width="860" height="390" alt="Screenshot 2025-07-31 at 4 05 03 PM"
src="https://github.com/user-attachments/assets/337db0da-de40-48c6-ae71-0e40f24b87e7 "
/>
2025-07-31 17:10:52 -07:00
Jeremy Rose
610addbc2e
do not dispatch key releases ( #1771 )
...
when we enabled KKP in https://github.com/openai/codex/pull/1743 , we
started receiving keyup events, but didn't expect them anywhere in our
code. for now, just don't dispatch them at all.
2025-07-31 17:00:48 -07:00
easong-openai
6ce0a5875b
Initial planning tool ( #1753 )
...
We need to optimize the prompt, but this causes the model to use the new
planning_tool.
<img width="765" height="110" alt="image"
src="https://github.com/user-attachments/assets/45633f7f-3c85-4e60-8b80-902f1b3b508d "
/>
2025-07-31 20:45:52 +00:00
easong-openai
9aa11269a5
Fix double-scrolling in approval model ( #1754 )
...
Previously, pressing up or down arrow in the new approval modal would be
the equivalent of two up or down presses.
2025-07-31 19:41:32 +00:00
pakrym-oai
549846b29a
Add codex login --api-key ( #1759 )
...
Allow setting the API key via `codex login --api-key`
2025-07-31 17:48:49 +00:00
Jeremy Rose
96654a5d52
clamp render area to terminal size ( #1758 )
...
this fixes a couple of panics that would happen when trying to render
something larger than the terminal, or insert history lines when the top
of the viewport is at y=0.
2025-07-31 09:59:36 -07:00
easong-openai
861ba86403
Show error message after panic ( #1752 )
...
Previously we were swallowing errors and silently exiting, which isn't
great for helping users help us.
2025-07-31 09:19:08 -07:00
Jeremy Rose
d86270696e
streamline ui ( #1733 )
...
Simplify and improve many UI elements.
* Remove all-around borders in most places. These interact badly with
terminal resizing and look heavy. Prefer left-side-only borders.
* Make the viewport adjust to the size of its contents.
* <kbd>/</kbd> and <kbd>@</kbd> autocomplete boxes appear below the
prompt, instead of above it.
* Restyle the keyboard shortcut hints & move them to the left.
* Restyle the approval dialog.
* Use synchronized rendering to avoid flashing during rerenders.
https://github.com/user-attachments/assets/96f044af-283b-411c-b7fc-5e6b8a433c20
<img width="1117" height="858" alt="Screenshot 2025-07-30 at 5 29 20 PM"
src="https://github.com/user-attachments/assets/0cc0af77-8396-429b-b6ee-9feaaccdbee7 "
/>
2025-07-31 00:43:21 -07:00
pap-openai
defeafb279
add keyboard enhancements to support shift_return ( #1743 )
...
For terminal that supports [keyboard
enhancements](https://docs.rs/libcrossterm/latest/crossterm/enum.KeyboardEnhancementFlags.html ),
adds the enhancements (enabling [kitty keyboard
protocol](https://sw.kovidgoyal.net/kitty/keyboard-protocol/ )) to
support shift+enter listener.
Those users (users with terminals listed on
[KPP](https://sw.kovidgoyal.net/kitty/keyboard-protocol/ )) should be
able to press shift+return for new line
---------
Co-authored-by: easong-openai <easong@openai.com >
2025-07-31 03:23:56 +00:00
pakrym-oai
51b6bdefbe
Auto format toml ( #1745 )
...
Add recommended extension and configure it to auto format prompt.
2025-07-30 18:37:00 -07:00
Jeremy Rose
f2134f6633
resizable viewport ( #1732 )
...
Proof of concept for a resizable viewport.
The general approach here is to duplicate the `Terminal` struct from
ratatui, but with our own logic. This is a "light fork" in that we are
still using all the base ratatui functions (`Buffer`, `Widget` and so
on), but we're doing our own bookkeeping at the top level to determine
where to draw everything.
This approach could use improvement—e.g, when the window is resized to a
smaller size, if the UI wraps, we don't correctly clear out the
artifacts from wrapping. This is possible with a little work (i.e.
tracking what parts of our UI would have been wrapped), but this
behavior is at least at par with the existing behavior.
https://github.com/user-attachments/assets/4eb17689-09fd-4daa-8315-c7ebc654986d
cc @joshka who might have Thoughts™
2025-07-31 00:06:55 +00:00
pakrym-oai
ea01a5ffe2
Add support for a separate chatgpt auth endpoint ( #1712 )
...
Adds a `CodexAuth` type that encapsulates information about available
auth modes and logic for refreshing the token.
Changes `Responses` API to send requests to different endpoints based on
the auth type.
Updates login_with_chatgpt to support API-less mode and skip the key
exchange.
2025-07-30 19:40:15 +00:00
Jeremy Rose
347c81ad00
remove conversation history widget ( #1727 )
...
this widget is no longer used.
2025-07-30 10:05:40 -07:00
Gabriel Peal
8828f6f082
Add an experimental plan tool ( #1726 )
...
This adds a tool the model can call to update a plan. The tool doesn't
actually _do_ anything but it gives clients a chance to read and render
the structured plan. We will likely iterate on the prompt and tools
exposed for planning over time.
2025-07-29 14:22:02 -04:00
Jeremy Rose
fc85f4812f
feat: map ^U to kill-line-to-head ( #1711 )
...
see
[discussion](https://github.com/rhysd/tui-textarea/issues/51#issuecomment-3021191712 ),
it's surprising that ^U behaves this way. IMO the undo/redo
functionality in tui-textarea isn't good enough to be worth preserving,
but if we do bring it back it should probably be on C-z / C-S-z / C-y.
2025-07-29 09:40:26 -07:00
easong-openai
efe7f3c793
alternate login wording? ( #1723 )
...
Co-authored-by: Jeremy Rose <172423086+nornagon-openai@users.noreply.github.com >
2025-07-29 16:23:09 +00:00
Jeremy Rose
f66704a88f
replace login screen with a simple prompt ( #1713 )
...
Perhaps there was an intention to make the login screen prettier, but it
feels quite silly right now to just have a screen that says "press q",
so replace it with something that lets the user directly login without
having to quit the app.
<img width="1283" height="635" alt="Screenshot 2025-07-28 at 2 54 05 PM"
src="https://github.com/user-attachments/assets/f19e5595-6ef9-4a2d-b409-aa61b30d3628 "
/>
2025-07-28 17:25:14 -07:00
Jeremy Rose
2d2df891bb
fix: long lines incorrectly wrapped ( #1710 )
...
fix to #1685 .
2025-07-28 12:19:03 -07:00
easong-openai
80c19ea77c
Fix approval workflow ( #1696 )
...
(Hopefully) temporary solution to the invisible approvals problem -
prints commands to history when they need approval and then also prints
the result of the approval. In the near future we should be able to do
some fancy stuff with updating commands before writing them to permanent
history.
Also, ctr-c while in the approval modal now acts as esc (aborts command)
and puts the TUI in the state where one additional ctr-c will exit.
2025-07-28 19:00:06 +00:00
Michael Bolin
9102255854
fix: move arg0 handling out of codex-linux-sandbox and into its own crate ( #1697 )
2025-07-28 08:31:24 -07:00
Jeremy Rose
7ecd3153a8
fix: correctly wrap history items ( #1685 )
...
The overall idea here is: skip ratatui for writing into scrollback,
because its primitives are wrong. We want to render full lines of text,
that will be wrapped natively by the terminal, and which we never plan
to update using ratatui (so the `Buffer` struct is overhead and in fact
an inhibition).
Instead, we use ANSI scrolling regions (link reference doc to come).
Essentially, we:
1. Define a scrolling region that extends from the top of the prompt
area all the way to the top of scrollback
2. Scroll that region up by N < (screen_height - viewport_height) lines,
in this PR N=1
3. Put our cursor at the top of the newly empty region
4. Print out our new text like normal
The terminal interactions here (write_spans and its dependencies) are
mostly extracted from ratatui.
2025-07-28 14:45:49 +00:00
Michael Bolin
2405c40026
chore: update Codex::spawn() to return a struct instead of a tuple ( #1677 )
...
Also update `init_codex()` to return a `struct` instead of a tuple, as well.
2025-07-27 20:01:35 -07:00
easong-openai
58bed77ba7
Remove tab focus switching ( #1694 )
...
Previously pressing tab would switch TUI focus to the history scrollbox - no longer necessary.
2025-07-27 11:04:09 -07:00
Jeremy Rose
c66c99c5b5
fix: crash on resize ( #1683 )
...
Without this, resizing the terminal prints "Error: The cursor position
could not be read within a normal duration" and quits the app.
2025-07-25 14:23:38 -07:00
Jeremy Rose
75b4008094
fix: paste with newlines ( #1682 )
...
This fixes an issue where pasting multi-line content would break the
composer.
2025-07-25 19:26:40 +00:00
easong-openai
480e82b00d
Easily Selectable History ( #1672 )
...
This update replaces the previous ratatui history widget with an
append-only log so that the terminal can handle text selection and
scrolling. It also disables streaming responses, which we'll do our best
to bring back in a later PR. It also adds a small summary of token use
after the TUI exits.
2025-07-25 01:56:40 -07:00
Pavel Bezglasny
508abbe990
Update render name in tui for approval_policy to match with config values ( #1675 )
...
Currently, codex on start shows the value for the approval policy as
name of
[AskForApproval](2437a8d17a/codex-rs/core/src/protocol.rs (L128) )
enum, which differs from
[approval_policy](2437a8d17a/codex-rs/config.md (approval_policy) )
config values.
E.g. "untrusted" becomes "UnlessTrusted", "on-failure" -> "OnFailure",
"never" -> "Never".
This PR changes render names of the approval policy to match with
configuration values.
2025-07-24 14:17:57 -07:00
dependabot[bot]
4a57afaaf2
chore(deps): bump strum_macros from 0.27.1 to 0.27.2 in /codex-rs ( #1638 )
...
Bumps [strum_macros](https://github.com/Peternator7/strum ) from 0.27.1
to 0.27.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Peternator7/strum/releases ">strum_macros's
releases</a>.</em></p>
<blockquote>
<h2>v0.27.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Adding support for doc comments on <code>EnumDiscriminants</code>
generated type… by <a
href="https://github.com/linclelinkpart5 "><code>@linclelinkpart5</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/141 ">Peternator7/strum#141</a></li>
<li>Drop needless <code>rustversion</code> dependency by <a
href="https://github.com/paolobarbolini "><code>@paolobarbolini</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/446 ">Peternator7/strum#446</a></li>
<li>Upgrade <code>phf</code> to v0.12 by <a
href="https://github.com/paolobarbolini "><code>@paolobarbolini</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/448 ">Peternator7/strum#448</a></li>
<li>allow discriminants on empty enum by <a
href="https://github.com/crop2000 "><code>@crop2000</code></a> in <a
href="https://redirect.github.com/Peternator7/strum/pull/435 ">Peternator7/strum#435</a></li>
<li>Remove broken link to EnumTable docs by <a
href="https://github.com/schneems "><code>@schneems</code></a> in <a
href="https://redirect.github.com/Peternator7/strum/pull/427 ">Peternator7/strum#427</a></li>
<li>Change enum table callbacks to FnMut. by <a
href="https://github.com/ClaytonKnittel "><code>@ClaytonKnittel</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/443 ">Peternator7/strum#443</a></li>
<li>Add <code>#[automatically_derived]</code> to the <code>impl</code>s
by <a
href="https://github.com/dandedotdev "><code>@dandedotdev</code></a> in
<a
href="https://redirect.github.com/Peternator7/strum/pull/444 ">Peternator7/strum#444</a></li>
<li>Implement a <code>suffix</code> attribute for serialization of enum
variants by <a
href="https://github.com/amogh-dambal "><code>@amogh-dambal</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/440 ">Peternator7/strum#440</a></li>
<li>Expound upon use_phf docs by <a
href="https://github.com/Peternator7 "><code>@Peternator7</code></a> in
<a
href="https://redirect.github.com/Peternator7/strum/pull/449 ">Peternator7/strum#449</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/paolobarbolini "><code>@paolobarbolini</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/446 ">Peternator7/strum#446</a></li>
<li><a href="https://github.com/crop2000 "><code>@crop2000</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/435 ">Peternator7/strum#435</a></li>
<li><a href="https://github.com/schneems "><code>@schneems</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/427 ">Peternator7/strum#427</a></li>
<li><a
href="https://github.com/ClaytonKnittel "><code>@ClaytonKnittel</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/443 ">Peternator7/strum#443</a></li>
<li><a
href="https://github.com/dandedotdev "><code>@dandedotdev</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/444 ">Peternator7/strum#444</a></li>
<li><a
href="https://github.com/amogh-dambal "><code>@amogh-dambal</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/440 ">Peternator7/strum#440</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Peternator7/strum/compare/v0.27.1...v0.27.2 ">https://github.com/Peternator7/strum/compare/v0.27.1...v0.27.2 </a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Peternator7/strum/blob/master/CHANGELOG.md ">strum_macros's
changelog</a>.</em></p>
<blockquote>
<h2>0.27.2</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/141 ">#141</a>:
Adding support for doc comments on <code>EnumDiscriminants</code>
generated type.</p>
<ul>
<li>The doc comment will be copied from the variant on the type
itself.</li>
</ul>
</li>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/435 ">#435</a>:allow
discriminants on empty enum.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/443 ">#443</a>:
Change enum table callbacks to FnMut.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/444 ">#444</a>:
Add <code>#[automatically_derived]</code> to the <code>impl</code>s by
<a href="https://github.com/dandedotdev "><code>@dandedotdev</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/444 ">Peternator7/strum#444</a></p>
<ul>
<li>This should make the linter less noisy with warnings in generated
code.</li>
</ul>
</li>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/440 ">#440</a>:
Implement a <code>suffix</code> attribute for serialization of enum
variants.</p>
<pre lang="rust"><code>#[derive(strum::Display)]
#[strum(suffix=".json")]
#[strum(serialize_all="snake_case")]
enum StorageConfiguration {
PostgresProvider,
S3StorageProvider,
AzureStorageProvider,
}
<p>fn main() {
let response = SurveyResponse::Other("It was good".into());
println!("Loading configuration from: {}",
StorageConfiguration::PostgresProvider);
// prints: Loaded Configuration from: postgres_provider.json
}
</code></pre></p>
</li>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/446 ">#446</a>:
Drop needless <code>rustversion</code> dependency.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="38f66210e7 "><code>38f6621</code></a>
Expound upon use_phf docs (<a
href="https://redirect.github.com/Peternator7/strum/issues/449 ">#449</a>)</li>
<li><a
href="bb1339026b "><code>bb13390</code></a>
Implement a <code>suffix</code> attribute for serialization of enum
variants (<a
href="https://redirect.github.com/Peternator7/strum/issues/440 ">#440</a>)</li>
<li><a
href="c9e52bfd28 "><code>c9e52bf</code></a>
Add <code>#[automatically_derived]</code> to the <code>impl</code>s (<a
href="https://redirect.github.com/Peternator7/strum/issues/444 ">#444</a>)</li>
<li><a
href="1b00f899e5 "><code>1b00f89</code></a>
Change enum table callbacks to FnMut. (<a
href="https://redirect.github.com/Peternator7/strum/issues/443 ">#443</a>)</li>
<li><a
href="6e2ca25fba "><code>6e2ca25</code></a>
Remove broken link to EnumTable docs (<a
href="https://redirect.github.com/Peternator7/strum/issues/427 ">#427</a>)</li>
<li><a
href="9503781141 "><code>9503781</code></a>
allow discriminants on empty enum (<a
href="https://redirect.github.com/Peternator7/strum/issues/435 ">#435</a>)</li>
<li><a
href="8553ba2845 "><code>8553ba2</code></a>
Upgrade <code>phf</code> to v0.12 (<a
href="https://redirect.github.com/Peternator7/strum/issues/448 ">#448</a>)</li>
<li><a
href="2eba5c2a5c "><code>2eba5c2</code></a>
Drop needless <code>rustversion</code> dependency (<a
href="https://redirect.github.com/Peternator7/strum/issues/446 ">#446</a>)</li>
<li><a
href="f301b67d91 "><code>f301b67</code></a>
Merge branch 'linclelinkpart5-master-2'</li>
<li><a
href="455b2bf859 "><code>455b2bf</code></a>
Merge branch 'master' of <a
href="https://github.com/linclelinkpart5/strum ">https://github.com/linclelinkpart5/strum </a>
into lincle...</li>
<li>See full diff in <a
href="https://github.com/Peternator7/strum/compare/v0.27.1...v0.27.2 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-23 16:34:16 -07:00
dependabot[bot]
9f645353e9
chore(deps): bump strum from 0.27.1 to 0.27.2 in /codex-rs ( #1639 )
...
Bumps [strum](https://github.com/Peternator7/strum ) from 0.27.1 to
0.27.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Peternator7/strum/releases ">strum's
releases</a>.</em></p>
<blockquote>
<h2>v0.27.2</h2>
<h2>What's Changed</h2>
<ul>
<li>Adding support for doc comments on <code>EnumDiscriminants</code>
generated type… by <a
href="https://github.com/linclelinkpart5 "><code>@linclelinkpart5</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/141 ">Peternator7/strum#141</a></li>
<li>Drop needless <code>rustversion</code> dependency by <a
href="https://github.com/paolobarbolini "><code>@paolobarbolini</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/446 ">Peternator7/strum#446</a></li>
<li>Upgrade <code>phf</code> to v0.12 by <a
href="https://github.com/paolobarbolini "><code>@paolobarbolini</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/448 ">Peternator7/strum#448</a></li>
<li>allow discriminants on empty enum by <a
href="https://github.com/crop2000 "><code>@crop2000</code></a> in <a
href="https://redirect.github.com/Peternator7/strum/pull/435 ">Peternator7/strum#435</a></li>
<li>Remove broken link to EnumTable docs by <a
href="https://github.com/schneems "><code>@schneems</code></a> in <a
href="https://redirect.github.com/Peternator7/strum/pull/427 ">Peternator7/strum#427</a></li>
<li>Change enum table callbacks to FnMut. by <a
href="https://github.com/ClaytonKnittel "><code>@ClaytonKnittel</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/443 ">Peternator7/strum#443</a></li>
<li>Add <code>#[automatically_derived]</code> to the <code>impl</code>s
by <a
href="https://github.com/dandedotdev "><code>@dandedotdev</code></a> in
<a
href="https://redirect.github.com/Peternator7/strum/pull/444 ">Peternator7/strum#444</a></li>
<li>Implement a <code>suffix</code> attribute for serialization of enum
variants by <a
href="https://github.com/amogh-dambal "><code>@amogh-dambal</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/440 ">Peternator7/strum#440</a></li>
<li>Expound upon use_phf docs by <a
href="https://github.com/Peternator7 "><code>@Peternator7</code></a> in
<a
href="https://redirect.github.com/Peternator7/strum/pull/449 ">Peternator7/strum#449</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/paolobarbolini "><code>@paolobarbolini</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/446 ">Peternator7/strum#446</a></li>
<li><a href="https://github.com/crop2000 "><code>@crop2000</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/435 ">Peternator7/strum#435</a></li>
<li><a href="https://github.com/schneems "><code>@schneems</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/427 ">Peternator7/strum#427</a></li>
<li><a
href="https://github.com/ClaytonKnittel "><code>@ClaytonKnittel</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/443 ">Peternator7/strum#443</a></li>
<li><a
href="https://github.com/dandedotdev "><code>@dandedotdev</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/444 ">Peternator7/strum#444</a></li>
<li><a
href="https://github.com/amogh-dambal "><code>@amogh-dambal</code></a>
made their first contribution in <a
href="https://redirect.github.com/Peternator7/strum/pull/440 ">Peternator7/strum#440</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Peternator7/strum/compare/v0.27.1...v0.27.2 ">https://github.com/Peternator7/strum/compare/v0.27.1...v0.27.2 </a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Peternator7/strum/blob/master/CHANGELOG.md ">strum's
changelog</a>.</em></p>
<blockquote>
<h2>0.27.2</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/141 ">#141</a>:
Adding support for doc comments on <code>EnumDiscriminants</code>
generated type.</p>
<ul>
<li>The doc comment will be copied from the variant on the type
itself.</li>
</ul>
</li>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/435 ">#435</a>:allow
discriminants on empty enum.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/443 ">#443</a>:
Change enum table callbacks to FnMut.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/444 ">#444</a>:
Add <code>#[automatically_derived]</code> to the <code>impl</code>s by
<a href="https://github.com/dandedotdev "><code>@dandedotdev</code></a>
in <a
href="https://redirect.github.com/Peternator7/strum/pull/444 ">Peternator7/strum#444</a></p>
<ul>
<li>This should make the linter less noisy with warnings in generated
code.</li>
</ul>
</li>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/440 ">#440</a>:
Implement a <code>suffix</code> attribute for serialization of enum
variants.</p>
<pre lang="rust"><code>#[derive(strum::Display)]
#[strum(suffix=".json")]
#[strum(serialize_all="snake_case")]
enum StorageConfiguration {
PostgresProvider,
S3StorageProvider,
AzureStorageProvider,
}
<p>fn main() {
let response = SurveyResponse::Other("It was good".into());
println!("Loading configuration from: {}",
StorageConfiguration::PostgresProvider);
// prints: Loaded Configuration from: postgres_provider.json
}
</code></pre></p>
</li>
<li>
<p><a
href="https://redirect.github.com/Peternator7/strum/pull/446 ">#446</a>:
Drop needless <code>rustversion</code> dependency.</p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="38f66210e7 "><code>38f6621</code></a>
Expound upon use_phf docs (<a
href="https://redirect.github.com/Peternator7/strum/issues/449 ">#449</a>)</li>
<li><a
href="bb1339026b "><code>bb13390</code></a>
Implement a <code>suffix</code> attribute for serialization of enum
variants (<a
href="https://redirect.github.com/Peternator7/strum/issues/440 ">#440</a>)</li>
<li><a
href="c9e52bfd28 "><code>c9e52bf</code></a>
Add <code>#[automatically_derived]</code> to the <code>impl</code>s (<a
href="https://redirect.github.com/Peternator7/strum/issues/444 ">#444</a>)</li>
<li><a
href="1b00f899e5 "><code>1b00f89</code></a>
Change enum table callbacks to FnMut. (<a
href="https://redirect.github.com/Peternator7/strum/issues/443 ">#443</a>)</li>
<li><a
href="6e2ca25fba "><code>6e2ca25</code></a>
Remove broken link to EnumTable docs (<a
href="https://redirect.github.com/Peternator7/strum/issues/427 ">#427</a>)</li>
<li><a
href="9503781141 "><code>9503781</code></a>
allow discriminants on empty enum (<a
href="https://redirect.github.com/Peternator7/strum/issues/435 ">#435</a>)</li>
<li><a
href="8553ba2845 "><code>8553ba2</code></a>
Upgrade <code>phf</code> to v0.12 (<a
href="https://redirect.github.com/Peternator7/strum/issues/448 ">#448</a>)</li>
<li><a
href="2eba5c2a5c "><code>2eba5c2</code></a>
Drop needless <code>rustversion</code> dependency (<a
href="https://redirect.github.com/Peternator7/strum/issues/446 ">#446</a>)</li>
<li><a
href="f301b67d91 "><code>f301b67</code></a>
Merge branch 'linclelinkpart5-master-2'</li>
<li><a
href="455b2bf859 "><code>455b2bf</code></a>
Merge branch 'master' of <a
href="https://github.com/linclelinkpart5/strum ">https://github.com/linclelinkpart5/strum </a>
into lincle...</li>
<li>See full diff in <a
href="https://github.com/Peternator7/strum/compare/v0.27.1...v0.27.2 ">compare
view</a></li>
</ul>
</details>
<br />
[](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores )
Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.
[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)
---
<details>
<summary>Dependabot commands and options</summary>
<br />
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)
</details>
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-23 16:07:33 -07:00
aibrahim-oai
b4ab7c1b73
Flaky CI fix ( #1647 )
...
Flushing before sending `TaskCompleteEvent` and ending the submission
loop to avoid race conditions.
2025-07-23 15:03:26 -07:00
Gabriel Peal
084236f717
Add call_id to patch approvals and elicitations ( #1660 )
...
Builds on https://github.com/openai/codex/pull/1659 and adds call_id to
a few more places for the same reason.
2025-07-23 15:55:35 -04:00
Gabriel Peal
bc944e77f5
Improve messages emitted for exec failures ( #1659 )
...
1. Emit call_id to exec approval elicitations for mcp client convenience
2. Remove the `-retry` from the call id for the same reason as above but
upstream the reset behavior to the mcp client
2025-07-23 14:43:53 -04:00
pakrym-oai
6d82907082
Add support for custom base instructions ( #1645 )
...
Allows providing custom instructions file as a config parameter and
custom instruction text via MCP tool call.
2025-07-22 09:42:22 -07:00
Dylan
18b2b30841
[mcp-server] Add reply tool call ( #1643 )
...
## Summary
Adds a new mcp tool call, `codex-reply`, so we can continue existing
sessions. This is a first draft and does not yet support sessions from
previous processes.
## Testing
- [x] tested with mcp client
2025-07-21 21:01:56 -07:00
Michael Bolin
e78ec00e73
chore: support MCP schema 2025-06-18 ( #1621 )
...
This updates the schema in `generate_mcp_types.py` from `2025-03-26` to
`2025-06-18`, regenerates `mcp-types/src/lib.rs`, and then updates all
the code that uses `mcp-types` to honor the changes.
Ran
```
npx @modelcontextprotocol/inspector just codex mcp
```
and verified that I was able to invoke the `codex` tool, as expected.
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com ). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/1621 ).
* #1623
* #1622
* __->__ #1621
2025-07-19 00:09:34 -04:00
aibrahim-oai
d5a2148deb
Fix ctrl+c interrupt while streaming ( #1617 )
...
Interrupting while streaming now causes is broken because we aren't
clearing the delta buffer.
2025-07-18 12:08:25 -07:00
Michael Bolin
cc874c9205
chore: use AtomicBool instead of Mutex<bool> ( #1616 )
2025-07-18 11:13:34 -07:00
aibrahim-oai
9cedeadf6a
change the default debounce rate to 10ms ( #1606 )
...
changed the default debounce rate to 10ms because typing was laggy.
Before:
https://github.com/user-attachments/assets/e5d15fcb-6a2b-4837-b2b4-c3dcb4cc3409
After
https://github.com/user-attachments/assets/6f0005eb-fd49-4130-ba68-635ee0f2831f
2025-07-17 17:00:17 -07:00
aibrahim-oai
bb30ab9e96
Implement redraw debounce ( #1599 )
...
## Summary
- debouce redraw events so repeated requests don't overwhelm the
terminal
- add `RequestRedraw` event and schedule redraws after 100ms
## Testing
- `cargo clippy --tests`
- `cargo test` *(fails: Sandbox Denied errors in landlock tests)*
------
https://chatgpt.com/codex/tasks/task_i_68792a65b8b483218ec90a8f68746cd8
---------
Co-authored-by: Michael Bolin <mbolin@openai.com >
2025-07-17 12:54:55 -07:00
pakrym-oai
6949329a7f
chore: auto format code on save and add more details to AGENTS.md ( #1582 )
...
Adds a default vscode config with generally applicable settings.
Adds more entrypoints to justfile both for environment setup and to help
agents better verify changes.
2025-07-17 11:40:00 -07:00
aibrahim-oai
643ab1f582
Add streaming to exec and tui ( #1594 )
...
Added support for streaming in `tui`
Added support for streaming in `exec`
https://github.com/user-attachments/assets/4215892e-d940-452c-a1d0-416ed0cf14eb
2025-07-16 22:26:31 -07:00
aibrahim-oai
2bd3314886
support deltas in core ( #1587 )
...
- Added support for message and reasoning deltas
- Skipped adding the support in the cli and tui for later
- Commented a failing test (wrong merge) that needs fix in a separate
PR.
Side note: I think we need to disable merge when the CI don't pass.
2025-07-16 15:11:18 -07:00
Michael Bolin
5b820c5ce7
feat: ctrl-d only exits when there is no user input ( #1589 )
...
While this does make it so that `ctrl-d` will not exit Codex when the
composer is not empty, `ctrl-d` will still exit Codex if it is in the
"working" state.
Fixes https://github.com/openai/codex/issues/1443 .
2025-07-16 08:59:26 -07:00