Commit Graph

1855 Commits

Author SHA1 Message Date
Michael Bolin
d031bd5779 merge commit for archive created by Sapling 2025-06-27 18:27:15 -07:00
Michael Bolin
f5fc218629 feat: add support for @ to do file search 2025-06-27 18:27:10 -07:00
Michael Bolin
157223de9c merge commit for archive created by Sapling 2025-06-27 18:21:26 -07:00
Michael Bolin
bd92cc30f1 feat: add support for @ to do file search 2025-06-27 18:21:19 -07:00
Michael Bolin
0efd276437 merge commit for archive created by Sapling 2025-06-27 16:30:08 -07:00
Michael Bolin
f5e171f689 feat: add support for @ to do file search 2025-06-27 16:30:03 -07:00
Michael Bolin
b3ad764532 chore: change arg from PathBuf to &Path (#1409)
Caller no longer needs to clone a `PathBuf`: can just pass `&Path`.
2025-06-27 16:24:41 -07:00
Michael Bolin
76e60c9038 merge commit for archive created by Sapling 2025-06-27 16:02:35 -07:00
Michael Bolin
54af6014c3 feat: add support for @ to do file search 2025-06-27 16:02:24 -07:00
Michael Bolin
9f8873d971 chore: change arg from PathBuf to &Path 2025-06-27 16:02:24 -07:00
Michael Bolin
a331a67b3e chore: change built_in_model_providers so "openai" is the only "bundled" provider (#1407)
As we are [close to releasing the Rust CLI
beta](https://github.com/openai/codex/discussions/1405), for the moment,
let's take a more neutral stance on what it takes to be a "built-in"
provider.

* For example, there seems to be a discrepancy around what the "right"
configuration for Gemini is: https://github.com/openai/codex/pull/881
* And while the current list of "built-in" providers are all arguably
"well-known" names, this raises a question of what to do about
potentially less familiar providers, such as
https://github.com/openai/codex/pull/1142. Do we just accept every pull
request like this, or is there some criteria a provider has to meet to
"qualify" to be bundled with Codex CLI?

I think that if we can establish clear ground rules for being a built-in
provider, then we can bring this back. But until then, I would rather
take a minimalist approach because if we decided to reverse our position
later, it would break folks who were depending on the presence of the
built-in providers.
2025-06-27 14:49:55 -07:00
Michael Bolin
e3fc37f2c6 Merge 06c70784db into sapling-pr-archive-bolinfest 2025-06-27 13:20:27 -07:00
Michael Bolin
06c70784db chore: change built_in_model_providers so "openai" is the only "bundled" provider 2025-06-27 13:20:20 -07:00
Michael Bolin
15b3fdd3b5 merge commit for archive created by Sapling 2025-06-27 12:41:11 -07:00
Michael Bolin
6d4b3ef73f feat: add support for @ to do file search 2025-06-27 11:38:19 -07:00
Gabriel Peal
2e293ce903 Handle Ctrl+C quit when idle (#1402)
## Summary
- show `Ctrl+C to quit` hint when pressing Ctrl+C with no active task
- exiting with Ctrl+C if the hint is already visible
- clear the hint when tasks begin or other keys are pressed


https://github.com/user-attachments/assets/931e2d7c-1c80-4b45-9908-d119f74df23c



------
https://chatgpt.com/s/cd_685ec8875a308191beaa95886dc1379e

Fixes #1245
2025-06-27 13:37:11 -04:00
Michael Bolin
ffa9624dce merge commit for archive created by Sapling 2025-06-26 23:11:23 -07:00
Michael Bolin
3a8baa000a feat: add support for @ to do file search 2025-06-26 23:09:08 -07:00
Michael Bolin
68ce3de555 Merge a2e3c47fd3 into sapling-pr-archive-bolinfest 2025-06-26 23:05:37 -07:00
Michael Bolin
a2e3c47fd3 feat: add support for @ to do file search 2025-06-26 23:05:28 -07:00
Michael Bolin
64feeb3803 fix: add tiebreaker logic for paths when scores are equal (#1400)
---
[//]: # (BEGIN SAPLING FOOTER)
Stack created with [Sapling](https://sapling-scm.com). Best reviewed
with [ReviewStack](https://reviewstack.dev/openai/codex/pull/1400).
* #1401
* __->__ #1400
2025-06-26 23:05:10 -07:00
Michael Bolin
dcddea1188 Merge f921c6e772 into sapling-pr-archive-bolinfest 2025-06-26 22:56:32 -07:00
Michael Bolin
f921c6e772 feat: add support for @ to do file search 2025-06-26 22:56:18 -07:00
Michael Bolin
e8b8ed8750 fix: add tiebreaker logic for paths when scores are equal 2025-06-26 22:56:18 -07:00
Michael Bolin
fbf1da9800 merge commit for archive created by Sapling 2025-06-26 22:47:51 -07:00
Michael Bolin
a46b3bacb0 feat: add support for @ to do file search 2025-06-26 22:47:40 -07:00
Michael Bolin
27c4edd69f fix: add tiebreaker logic for paths when scores are equal 2025-06-26 22:47:40 -07:00
Michael Bolin
1fffe586ac Merge 83d11b9cd4 into sapling-pr-archive-bolinfest 2025-06-26 22:41:55 -07:00
Michael Bolin
83d11b9cd4 feat: add support for @ to do file search 2025-06-26 22:41:32 -07:00
Michael Bolin
1af8c43aba fix: add tiebreaker logic for paths when scores are equal 2025-06-26 22:38:44 -07:00
Michael Bolin
fa0e17f83a feat: add support for /diff command (#1389)
Adds support for a `/diff` command comparable to the one available in
the TypeScript CLI.

<img width="1103" alt="Screenshot 2025-06-26 at 12 31 33 PM"
src="https://github.com/user-attachments/assets/5dc646ca-301f-41ff-92a7-595c68db64b6"
/>

While here, changed the `SlashCommand` enum so the declared variant
order is the order the commands appear in the popup menu. This way,
`/toggle-mouse-mode` is listed last, as it is the least likely to be
used.

Fixes https://github.com/openai/codex/issues/1253.
codex-rs-6a8a936f75ea44faf05ff4fab0c6a36fc970428d-1-rust-v0.0.2506261603
2025-06-26 13:03:31 -07:00
Michael Bolin
6efff9f9d9 merge commit for archive created by Sapling 2025-06-26 12:34:06 -07:00
Michael Bolin
b154a5e7f3 feat: add support for /diff command 2025-06-26 12:34:00 -07:00
Michael Bolin
0eee95cafe merge commit for archive created by Sapling 2025-06-26 12:28:29 -07:00
Michael Bolin
7fda3f97b6 feat: add support for /diff command 2025-06-26 12:27:44 -07:00
Michael Bolin
52b41573ca merge commit for archive created by Sapling 2025-06-26 12:25:35 -07:00
Michael Bolin
bf72aee504 feat: add support for /diff command 2025-06-26 12:25:27 -07:00
Michael Bolin
eac87e6ad3 Merge 5c3ff9fc10 into sapling-pr-archive-bolinfest 2025-06-26 12:10:57 -07:00
Michael Bolin
5c3ff9fc10 feat: add support for /diff command 2025-06-26 12:10:49 -07:00
Michael Bolin
1f64c97f89 merge commit for archive created by Sapling 2025-06-26 12:09:48 -07:00
Michael Bolin
d3026a2a55 feat: add support for /diff command 2025-06-26 12:09:41 -07:00
Gabriel Peal
a339a7bcce [Rust] Allow resuming a session that was killed with ctrl + c (#1387)
Previously, if you ctrl+c'd a conversation, all subsequent turns would
400 because the Responses API never got a response for one of its call
ids. This ensures that if we aren't sending a call id by hand, we
generate a synthetic aborted call.

Fixes #1244 


https://github.com/user-attachments/assets/5126354f-b970-45f5-8c65-f811bca8294a
2025-06-26 14:40:42 -04:00
Michael Bolin
9812f7978c Merge 217de68af6 into sapling-pr-archive-bolinfest 2025-06-26 09:03:38 -07:00
Michael Bolin
217de68af6 feat: add support for /diff command 2025-06-26 09:03:34 -07:00
Michael Bolin
fcfe43c7df feat: show number of tokens remaining in UI (#1388)
When using the OpenAI Responses API, we now record the `usage` field for
a `"response.completed"` event, which includes metrics about the number
of tokens consumed. We also introduce `openai_model_info.rs`, which
includes current data about the most common OpenAI models available via
the API (specifically `context_window` and `max_output_tokens`). If
Codex does not recognize the model, you can set `model_context_window`
and `model_max_output_tokens` explicitly in `config.toml`.

When then introduce a new event type to `protocol.rs`, `TokenCount`,
which includes the `TokenUsage` for the most recent turn.

Finally, we update the TUI to record the running sum of tokens used so
the percentage of available context window remaining can be reported via
the placeholder text for the composer:

![Screenshot 2025-06-25 at 11 20
55 PM](https://github.com/user-attachments/assets/6fd6982f-7247-4f14-84b2-2e600cb1fd49)

We could certainly get much fancier with this (such as reporting the
estimated cost of the conversation), but for now, we are just trying to
achieve feature parity with the TypeScript CLI.

Though arguably this improves upon the TypeScript CLI, as the TypeScript
CLI uses heuristics to estimate the number of tokens used rather than
using the `usage` information directly:


296996d74e/codex-cli/src/utils/approximate-tokens-used.ts (L3-L16)

Fixes https://github.com/openai/codex/issues/1242
2025-06-25 23:31:11 -07:00
Michael Bolin
02d8b5bea4 merge commit for archive created by Sapling 2025-06-25 23:27:18 -07:00
Michael Bolin
e74657bbdd feat: show number of tokens remaining in UI 2025-06-25 23:27:12 -07:00
Michael Bolin
cb7121367d merge commit for archive created by Sapling 2025-06-25 23:10:21 -07:00
Michael Bolin
683cdf9cec feat: show number of tokens remaining in UI 2025-06-25 23:10:16 -07:00
Michael Bolin
ece4ebf640 Merge e7f62d9d67 into sapling-pr-archive-bolinfest 2025-06-25 23:08:18 -07:00