Commit Graph

8634 Commits

Author SHA1 Message Date
Michael Bolin
47303cad03 Merge 8f67d88267 into sapling-pr-archive-bolinfest 2025-06-28 14:25:41 -07:00
Michael Bolin
8f67d88267 feat: introduce --compute-indices flag to codex-file-search 2025-06-28 14:25:36 -07:00
Michael Bolin
51280ceda0 Merge 7550324633 into sapling-pr-archive-bolinfest 2025-06-28 14:25:29 -07:00
Michael Bolin
7550324633 feat: introduce --compute-indices flag to codex-file-search 2025-06-28 14:25:19 -07:00
Michael Bolin
5a0f236ca4 feat: add support for @ to do file search (#1401)
Introduces support for `@` to trigger a fuzzy-filename search in the
composer. Under the hood, this leverages
https://crates.io/crates/nucleo-matcher to do the fuzzy matching and
https://crates.io/crates/ignore to build up the list of file candidates
(so that it respects `.gitignore`).

For simplicity (at least for now), we do not do any caching between
searches like VS Code does for its file search:


1d89ed699b/src/vs/workbench/services/search/node/rawSearchService.ts (L212-L218)

Because we do not do any caching, I saw queries take up to three seconds
on large repositories with hundreds of thousands of files. To that end,
we do not perform searches synchronously on each keystroke, but instead
dispatch an event to do the search on a background thread that
asynchronously reports back to the UI when the results are available.
This is largely handled by the `FileSearchManager` introduced in this
PR, which also has logic for debouncing requests so there is at most one
search in flight at a time.

While we could potentially polish and tune this feature further, it may
already be overengineered for how it will be used, in practice, so we
can improve things going forward if it turns out that this is not "good
enough" in the wild.

Note this feature does not work like `@` in the TypeScript CLI, which
was more like directory-based tab completion. In the Rust CLI, `@`
triggers a full-repo fuzzy-filename search.

Fixes https://github.com/openai/codex/issues/1261.
2025-06-28 13:47:42 -07:00
Michael Bolin
65b67ef7fc merge commit for archive created by Sapling 2025-06-28 13:31:31 -07:00
Michael Bolin
b42eba161b feat: add support for @ to do file search 2025-06-28 13:31:21 -07:00
Michael Bolin
6c0234d9ad merge commit for archive created by Sapling 2025-06-28 13:24:11 -07:00
Michael Bolin
de0409587a feat: add support for @ to do file search 2025-06-28 13:24:05 -07:00
Michael Bolin
f0db073285 merge commit for archive created by Sapling 2025-06-28 09:37:42 -07:00
Michael Bolin
e93781c9e9 feat: add support for @ to do file search 2025-06-28 09:37:37 -07:00
Michael Bolin
6d1d3d5c8d merge commit for archive created by Sapling 2025-06-28 09:34:00 -07:00
Michael Bolin
1c1fe12637 feat: add support for @ to do file search 2025-06-28 09:33:56 -07:00
Michael Bolin
2237811243 merge commit for archive created by Sapling 2025-06-27 23:34:05 -07:00
Michael Bolin
dd425f458e feat: add support for @ to do file search 2025-06-27 23:33:59 -07:00
Michael Bolin
e9ba96854b merge commit for archive created by Sapling 2025-06-27 23:03:05 -07:00
Michael Bolin
5e02ef5e15 feat: add support for @ to do file search 2025-06-27 23:03:00 -07:00
Michael Bolin
fd55590b1f merge commit for archive created by Sapling 2025-06-27 20:38:45 -07:00
Michael Bolin
2d76c77e31 feat: add support for @ to do file search 2025-06-27 20:38:38 -07:00
Michael Bolin
0f4cf49fe5 merge commit for archive created by Sapling 2025-06-27 20:34:21 -07:00
Michael Bolin
580a1022eb feat: add support for @ to do file search 2025-06-27 20:33:32 -07:00
Michael Bolin
ff8ae1ffa1 feat: make file search cancellable (#1414)
Update `run()` to take `cancel_flag: Arc<AtomicBool>` that the worker
threads will periodically check to see if it is `true`, exiting early
(and returning empty results) if so.
2025-06-27 20:01:45 -07:00
Michael Bolin
7d87ea64b7 merge commit for archive created by Sapling 2025-06-27 19:53:32 -07:00
Michael Bolin
a5d84caf0c feat: add support for @ to do file search 2025-06-27 19:53:14 -07:00
Michael Bolin
e4867d0cc4 feat: make file search cancellable 2025-06-27 19:53:13 -07:00
Michael Bolin
4005804898 merge commit for archive created by Sapling 2025-06-27 19:14:20 -07:00
Michael Bolin
d8c08fe212 feat: add support for @ to do file search 2025-06-27 19:14:12 -07:00
Michael Bolin
2d2ba31c50 merge commit for archive created by Sapling 2025-06-27 19:00:08 -07:00
Michael Bolin
c9e06f6439 feat: add support for @ to do file search 2025-06-27 19:00:02 -07:00
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