Commit Graph

1438 Commits

Author SHA1 Message Date
Michael Bolin
a4bfdf6779 chore: produce .tar.gz versions of artifacts in addition to .zst (#1036)
For sparse containers/environments that do not have `zstd`, provide
`.tar.gz` as alternative archive format.
codex-rs-c74d7e13e7d8daf3a2493f6216918d5e59a38bed-1-rust-v0.0.2505191518
2025-05-19 15:17:45 -07:00
Michael Bolin
5cf749a655 Merge ec1b36e9e7 into sapling-pr-archive-bolinfest 2025-05-19 15:13:39 -07:00
Michael Bolin
ec1b36e9e7 chore: produce .tar.gz versions of artifacts in addition to .zst 2025-05-19 15:13:23 -07:00
Fouad Matin
44022db8d0 bump(version): 0.1.2505172129 (#1008)
## `0.1.2505172129`

### 🪲 Bug Fixes

- Add node version check (#1007)
- Persist token after refresh (#1006)
2025-05-17 21:35:54 -07:00
Fouad Matin
a86270f581 fix: add node version check (#1007) 2025-05-17 21:27:41 -07:00
Fouad Matin
835eb77a7d fix: persist token after refresh (#1006)
After a token refresh/exchange, persist the new refresh and id token
2025-05-17 21:27:02 -07:00
Fouad Matin
dbc0ad348e bump(version): 0.1.2505171619 (#1001)
## `0.1.2505171619`

- `codex --login` + `codex --free` (#998)
2025-05-17 16:25:21 -07:00
Fouad Matin
9b4c2984d4 add: codex --login + codex --free (#998)
## Summary
- add `--login` and `--free` flags to cli help
- handle `--login` and `--free` logic in cli
- factor out redeem flow into `maybeRedeemCredits`
- call new helper from login callback
2025-05-17 16:13:12 -07:00
Michael Bolin
abbc0655cf merge commit for archive created by Sapling 2025-05-17 12:28:48 -07:00
Michael Bolin
4053788f5d fix: provide tolerance for apply_patch tool 2025-05-17 12:28:20 -07:00
Michael Bolin
f3bde21759 chore: update install_native_deps.sh to use rust-v0.0.2505171051 (#995)
Use a more recent built of the Rust binaries to include with the Node
module.
2025-05-17 11:25:24 -07:00
Michael Bolin
c2924cabce Merge f6df45a9e1 into sapling-pr-archive-bolinfest 2025-05-17 11:23:52 -07:00
Michael Bolin
f6df45a9e1 chore: update install_native_deps.sh to use rust-v0.0.2505171051 2025-05-17 11:23:44 -07:00
Michael Bolin
2ae00568a0 Merge d690965316 into sapling-pr-archive-bolinfest 2025-05-17 11:05:09 -07:00
Michael Bolin
d690965316 fix: provide tolerance for apply_patch tool 2025-05-17 11:05:06 -07:00
Michael Bolin
ff72f0e8da Merge 2388a941f5 into sapling-pr-archive-bolinfest 2025-05-17 11:03:56 -07:00
Michael Bolin
2388a941f5 fix: provide tolerance for apply_patch tool 2025-05-17 11:03:30 -07:00
Michael Bolin
1c6a3f1097 fix: artifacts from previous frames were bleeding through in TUI (#989)
Prior to this PR, I would frequently see glyphs from previous frames
"bleed" through like this:


![image](https://github.com/user-attachments/assets/8784b3d7-f691-4df6-8666-34e2f134ee85)

I think this was due to two issues (now addressed in this PR):

* We were not making use of `ratatui::widgets::Clear` to clear out the
buffer before drawing into it.
* To calculate the `width` used with `wrapped_line_count_for_cell()`, we
were not accounting for the scrollbar.
* Now we calculate `effective_width` using
`inner.width.saturating_sub(1)` where the `1` is for the scrollbar.
* We compute `text_area` using `effective_with` and pass the `text_area`
to `paragraph.render()`.
* We eliminate the conditional `needs_scrollbar` check and always call
`render(Scrollbar)`

I suspect this bug was introduced in
https://github.com/openai/codex/pull/937, though I did not try to
verify: I'm just happy that it appears to be fixed!
codex-rs-5ee08335ac690a69035720a798df9865bc5a4278-1-rust-v0.0.2505171051
2025-05-17 10:51:11 -07:00
Michael Bolin
a5ec04bb6b merge commit for archive created by Sapling 2025-05-17 10:41:26 -07:00
Michael Bolin
ae59445426 fix: clear scrollable view before drawing next frame 2025-05-17 10:41:20 -07:00
Michael Bolin
01545a0284 merge commit for archive created by Sapling 2025-05-17 10:40:18 -07:00
Michael Bolin
8f34387813 fix: clear scrollable view before drawing next frame 2025-05-17 10:36:18 -07:00
Michael Bolin
be20d49247 Merge 56a06203bb into sapling-pr-archive-bolinfest 2025-05-17 09:11:05 -07:00
Michael Bolin
56a06203bb fix: clear scrollable view before drawing next frame 2025-05-17 09:10:43 -07:00
Michael Bolin
f8b6b1db81 fix: ensure the first user message always displays after the session info (#988)
Previously, if the first user message was sent with the command
invocation, e.g.:

```
$ cargo run --bin codex 'hello'
```

Then the user message was added as the first entry in the history and
then `is_first_event` would be `false` here:


031df77dfb/codex-rs/tui/src/conversation_history_widget.rs (L178-L179)

which would prevent the "welcome" message with things like the the model
version from displaying.

The fix in this PR is twofold:

* Reorganize the logic so the `ChatWidget` constructor stores
`initial_user_message` rather than sending it right away. Now inside
`handle_codex_event()`, it waits for the `SessionConfigured` event and
sends the `initial_user_message`, if it exists.
* In `conversation_history_widget.rs`, `add_session_info()` checks to
see whether a `WelcomeMessage` exists in the history when determining
the value of `has_welcome_message`. By construction, we expect that
`WelcomeMessage` is always the first message (in which case the existing
`let is_first_event = self.entries.is_empty();` logic would be sound),
but we decide to be extra defensive in case an `EventMsg::Error` is
processed before `EventMsg::SessionConfigured`.
2025-05-17 09:00:23 -07:00
Michael Bolin
f670a8267d Merge ce126481ce into sapling-pr-archive-bolinfest 2025-05-17 08:50:53 -07:00
Michael Bolin
ce126481ce fix: ensure the first user message always displays after the session info 2025-05-17 08:50:46 -07:00
Christoph K
031df77dfb Remove unnecessary console log from test (#970)
When running `npm test` on `codex-cli`, the test
`agent-cancel-prev-response.test.ts` logs a significant body of text to
console for no obvious reason.

This is not helpful, as it makes test logs messy and far longer.

This change deletes the `console.log(...)` that produces the behavior.
2025-05-16 19:48:11 -07:00
Michael Bolin
f9143d0361 fix: do not let Tab keypress flow through to composer when used to toggle focus (#977)
One line fix from Codex!
2025-05-16 19:27:49 -07:00
Fouad Matin
2880925a44 bump(version): 0.1.2505161800 (#978)
## `0.1.2505161800`

- Sign in with chatgpt credits (#974)
- Add support for OpenAI tool type, local_shell (#961)
2025-05-16 18:18:15 -07:00
Michael Bolin
5058dde1ca Merge 25d55ac285 into sapling-pr-archive-bolinfest 2025-05-16 18:17:20 -07:00
Michael Bolin
25d55ac285 fix: do not let Tab keypress flow through to composer when used to toggle focus 2025-05-16 18:17:13 -07:00
Fouad Matin
3e19e8fd59 add: sign in with chatgpt credits (#974) 2025-05-16 17:55:08 -07:00
Trevor Creech
c7312c9d52 Fix CLA link in workflow (#964)
## Summary
- fix the CLA link posted by the bot
- docs suggest using an absolute URL:
https://github.com/marketplace/actions/cla-assistant-lite
codex-rs-b5257992b06373acef8b20a4ca25ffc1b96688e2-1-rust-v0.0.2505161708
2025-05-16 17:11:57 -07:00
Michael Bolin
1dc14cefa1 fix: make codex-mini-latest the default model in the Rust TUI (#972)
It's time to make `codex-mini-latest` the new default, as this should be
an "evergreen" model pointer.

* Equivalent change in TypeScript
https://github.com/openai/codex/pull/951
* See some notes about using `codex-mini-latest` with MCP in
https://github.com/openai/codex/pull/961
2025-05-16 17:08:18 -07:00
Michael Bolin
4f313b77ec Merge 8f1aebe69c into sapling-pr-archive-bolinfest 2025-05-16 16:23:00 -07:00
Michael Bolin
8f1aebe69c fix: make codex-mini-latest the default model in the Rust TUI 2025-05-16 16:22:54 -07:00
Michael Bolin
b99c58fa5b Merge 09d3b3063d into sapling-pr-archive-bolinfest 2025-05-16 16:22:50 -07:00
Michael Bolin
09d3b3063d fix: make codex-mini-latest the default model in the Rust TUI 2025-05-16 16:22:43 -07:00
Michael Bolin
7ca84087e6 feat: make it possible to toggle mouse mode in the Rust TUI (#971)
I did a bit of research to understand why I could not use my mouse to
drag to select text to copy to the clipboard in iTerm.

Apparently https://github.com/openai/codex/pull/641 to enable mousewheel
scrolling broke this functionality. It seems that, unless we put in a
bit of effort, we can have drag-to-select or scrolling, but not both.
Though if you know the trick to hold down `Option` will dragging with
the mouse in iTerm, you can probably get by with this. (I did not know
about this option prior to researching this issue.)

Nevertheless, users may still prefer to disable mouse capture
altogether, so this PR introduces:

* the ability to set `tui.disable_mouse_capture = true` in `config.toml`
to disable mouse capture
* a new command, `/toggle-mouse-mode` to toggle mouse capture
2025-05-16 16:16:50 -07:00
Michael Bolin
83f369f8e1 merge commit for archive created by Sapling 2025-05-16 16:11:19 -07:00
Michael Bolin
80546e052e feat: make it possible to toggle mouse mode in the Rust TUI 2025-05-16 16:11:13 -07:00
Michael Bolin
deb4e85006 Merge 1111e304c8 into sapling-pr-archive-bolinfest 2025-05-16 16:09:38 -07:00
Michael Bolin
1111e304c8 feat: make it possible to toggle mouse mode in the Rust TUI 2025-05-16 16:09:34 -07:00
Michael Bolin
b18efeadcc Merge 628e3fbb9a into sapling-pr-archive-bolinfest 2025-05-16 16:02:58 -07:00
Michael Bolin
628e3fbb9a feat: make it possible to toggle mouse mode in the Rust TUI 2025-05-16 16:02:55 -07:00
Michael Bolin
4d300d5103 Merge 04a069b938 into sapling-pr-archive-bolinfest 2025-05-16 16:01:16 -07:00
Michael Bolin
04a069b938 feat: make it possible to toggle mouse mode in the Rust TUI 2025-05-16 16:01:11 -07:00
Michael Bolin
aec7895ca4 merge commit for archive created by Sapling 2025-05-16 15:58:53 -07:00
Michael Bolin
eaef3fe1ed feat: make it possible to toggle mouse mode in the Rust TUI 2025-05-16 15:58:47 -07:00