Commit Graph

1634 Commits

Author SHA1 Message Date
Michael Bolin
d4e9a81abc Merge 0b880458a7 into sapling-pr-archive-bolinfest 2025-06-02 13:19:18 -07:00
Michael Bolin
0b880458a7 fix: chat completions API to work with tools 2025-06-02 13:18:56 -07:00
Michael Bolin
ee43e1b2d1 chore: logging cleanup
Update what we log to make `RUST_LOG=debug` a bit easier to work with.
2025-06-02 13:18:50 -07:00
Michael Bolin
54854e516a Merge e5f9b9ce92 into sapling-pr-archive-bolinfest 2025-06-02 13:17:23 -07:00
Michael Bolin
e5f9b9ce92 fix: chat completions API to work with tools 2025-06-02 13:13:14 -07:00
Michael Bolin
7907ead08e merge commit for archive created by Sapling 2025-06-02 13:09:45 -07:00
Michael Bolin
c16d2ce27e fix: chat completions API to work with tools 2025-06-02 13:09:39 -07:00
Michael Bolin
b1b2ff50d9 merge commit for archive created by Sapling 2025-06-02 12:00:39 -07:00
Michael Bolin
55c0d4e9c1 fix: chat completions API to work with tools 2025-06-02 12:00:32 -07:00
Michael Bolin
7896b1089d chore: update the WORKFLOW_URL in install_native_deps.sh to the latest release (#1190) 2025-05-31 10:30:50 -07:00
Michael Bolin
f1731e7cac Merge ce808d7cc6 into sapling-pr-archive-bolinfest 2025-05-31 10:24:26 -07:00
Michael Bolin
ce808d7cc6 chore: update the WORKFLOW_URL in install_native_deps.sh to the latest release 2025-05-31 10:24:19 -07:00
Michael Bolin
1410ae95ca fix: set --config hide_agent_reasoning=true in the GitHub Action (#1185)
Whoops, I had this flipped in https://github.com/openai/codex/pull/1183.
2025-05-30 23:57:05 -07:00
Michael Bolin
4145e489c4 Merge 7bda9d1fbc into sapling-pr-archive-bolinfest 2025-05-30 23:56:32 -07:00
Michael Bolin
7bda9d1fbc fix: set --config hide_agent_reasoning=true in the GitHub Action 2025-05-30 23:56:23 -07:00
Michael Bolin
a4a9204d2c Merge b7d9e36bbe into sapling-pr-archive-bolinfest 2025-05-30 23:50:21 -07:00
Michael Bolin
b7d9e36bbe fix: chat completions API to work with tools 2025-05-30 23:50:16 -07:00
Michael Bolin
fccf5f3221 fix: disable agent reasoning output by default in the GitHub Action (#1183) 2025-05-30 23:49:48 -07:00
Michael Bolin
0f5319714d merge commit for archive created by Sapling 2025-05-30 23:41:34 -07:00
Michael Bolin
9358392237 fix: disable agent reasoning output by default in the GitHub Action 2025-05-30 23:41:27 -07:00
Michael Bolin
2df6e07bed Merge 953fd5324b into sapling-pr-archive-bolinfest 2025-05-30 23:32:08 -07:00
Michael Bolin
953fd5324b fix: disable agent reasoning output by default in the GitHub Action 2025-05-30 23:30:33 -07:00
Michael Bolin
1159eaf04f feat: show the version when starting Codex (#1182)
The TypeScript version of the CLI shows the version when it starts up,
which is helpful when users share screenshots (and nice to know, as a
user).
codex-rs-ca8e97fcbcb991e542b8689f2d4eab9d30c399d6-1-rust-v0.0.2505302325
2025-05-30 23:24:36 -07:00
Michael Bolin
ccdf43699d Merge 1bda6e0da5 into sapling-pr-archive-bolinfest 2025-05-30 23:22:00 -07:00
Michael Bolin
1bda6e0da5 feat: show the version when starting Codex 2025-05-30 23:21:46 -07:00
Michael Bolin
e81327e5f4 feat: add hide_agent_reasoning config option (#1181)
This PR introduces a `hide_agent_reasoning` config option (that defaults
to `false`) that users can enable to make the output less verbose by
suppressing reasoning output.

To test, verified that this includes agent reasoning in the output:

```
echo hello | just exec
```

whereas this does not:

```
echo hello | just exec --config hide_agent_reasoning=false
```
2025-05-30 23:14:56 -07:00
Michael Bolin
67915b460b Merge 6576c6292c into sapling-pr-archive-bolinfest 2025-05-30 23:11:59 -07:00
Michael Bolin
6576c6292c feat: add hide_agent_reasoning config option 2025-05-30 23:11:55 -07:00
Michael Bolin
76700f7f05 merge commit for archive created by Sapling 2025-05-30 23:08:18 -07:00
Michael Bolin
ace269f2b6 feat: add hide_agent_reasoning config option 2025-05-30 23:06:30 -07:00
Michael Bolin
4f3d294762 feat: dim the timestamp in the exec output (#1180)
This required changing `ts_println!()` to take `$self:ident`, which is a
bit more verbose, but the usability improvement seems worth it.

Also eliminated an unnecessary `.to_string()` while here.
codex-rs-378d773f3af95384eef51addf560df30aa9fd15f-1-rust-v0.0.2505301630
2025-05-30 16:27:37 -07:00
Michael Bolin
941a84aafb merge commit for archive created by Sapling 2025-05-30 16:25:47 -07:00
Michael Bolin
b3623ffc61 feat: dim the timestamp in the exec output 2025-05-30 16:25:39 -07:00
Michael Bolin
cf1d070538 feat: grab-bag of improvements to exec output (#1179)
Fixes:

* Instantiate `EventProcessor` earlier in `lib.rs` so
`print_config_summary()` can be an instance method of it and leverage
its various `Style` fields to ensure it honors `with_ansi` properly.
* After printing the config summary, print out user's prompt with the
heading `User instructions:`. As noted in the comment, now that we can
read the instructions via stdin as of #1178, it is helpful to the user
to ensure they know what instructions were given to Codex.
* Use same colors/bold/italic settings for headers as the TUI, making
the output a bit easier to read.
2025-05-30 16:22:10 -07:00
Michael Bolin
44a9fc30d1 Merge 4b0578b5e4 into sapling-pr-archive-bolinfest 2025-05-30 16:05:06 -07:00
Michael Bolin
4b0578b5e4 feat: grab-bag of improvements to exec output 2025-05-30 16:04:59 -07:00
Michael Bolin
ae743d56b0 feat: for codex exec, if PROMPT is not specified, read from stdin if not a TTY (#1178)
This attempts to make `codex exec` more flexible in how the prompt can
be passed:

* as before, it can be passed as a single string argument
* if `-` is passed as the value, the prompt is read from stdin
* if no argument is passed _and stdin is a tty_, prints a warning to
stderr that no prompt was specified an exits non-zero.
* if no argument is passed _and stdin is NOT a tty_, prints `Reading
prompt from stdin...` to stderr to let the user know that Codex will
wait until it reads EOF from stdin to proceed. (You can repro this case
by doing `yes | just exec` since stdin is not a TTY in that case but it
also never reaches EOF).
2025-05-30 14:41:55 -07:00
Michael Bolin
5e6cb9dae6 merge commit for archive created by Sapling 2025-05-30 14:39:27 -07:00
Michael Bolin
b6d576557c feat: for codex exec, if PROMPT is not specified, read from stdin if not a TTY 2025-05-30 14:39:22 -07:00
Michael Bolin
4bc9c52413 merge commit for archive created by Sapling 2025-05-30 14:36:03 -07:00
Michael Bolin
a599342bbb feat: for codex exec, if PROMPT is not specified, read from stdin if not a TTY 2025-05-30 14:35:57 -07:00
Michael Bolin
c0c5ba3442 Merge 13d2fdc34c into sapling-pr-archive-bolinfest 2025-05-30 14:32:47 -07:00
Michael Bolin
13d2fdc34c feat: for codex exec, if PROMPT is not specified, read from stdin if not a TTY 2025-05-30 14:31:11 -07:00
Michael Bolin
6cadbf58c6 Merge 47c9aafd05 into sapling-pr-archive-bolinfest 2025-05-30 14:07:29 -07:00
Michael Bolin
47c9aafd05 fix: chat completions API to work with tools 2025-05-30 14:07:09 -07:00
Michael Bolin
1bf82056b3 fix: introduce create_tools_json() and share it with chat_completions.rs (#1177)
The main motivator behind this PR is that `stream_chat_completions()`
was not adding the `"tools"` entry to the payload posted to the
`/chat/completions` endpoint. This (1) refactors the existing logic to
build up the `"tools"` JSON from `client.rs` into `openai_tools.rs`, and
(2) updates the use of responses API (`client.rs`) and chat completions
API (`chat_completions.rs`) to both use it.

Note this PR alone is not sufficient to get tool calling from chat
completions working: that is done in
https://github.com/openai/codex/pull/1167.

---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/1177).
* #1167
* __->__ #1177
2025-05-30 14:07:03 -07:00
Michael Bolin
3a12c0461d merge commit for archive created by Sapling 2025-05-30 14:03:01 -07:00
Michael Bolin
93464101cb fix: chat completions API to work with tools 2025-05-30 14:02:34 -07:00
Michael Bolin
75e33481bc fix: introduce create_tools_json() and share it with chat_completions.rs 2025-05-30 14:02:34 -07:00
Michael Bolin
55004ca002 Merge 8e3c9ab29a into sapling-pr-archive-bolinfest 2025-05-30 13:52:28 -07:00