Commit Graph
8422 Commits
Author SHA1 Message Date
Michael Bolin 0347022c20 chore: refactor handle_function_call() into smaller functions 2025-05-16 13:56:59 -07:00
Michael Bolin 114cbd691b merge commit for archive created by Sapling 2025-05-16 13:53:28 -07:00
Michael Bolin e2b08eee8b feat: add support for OpenAI tool type, local_shell 2025-05-16 13:53:20 -07:00
Michael Bolin 7af8e04bdc Merge 493203d976 into sapling-pr-archive-bolinfest 2025-05-16 13:47:44 -07:00
Michael Bolin e0291c89f6 chore: refactor handle_function_call() into smaller functions 2025-05-16 13:47:36 -07:00
Michael Bolin 493203d976 feat: add support for OpenAI tool type, local_shell 2025-05-16 13:47:36 -07:00
Michael Bolin 4e66934828 Merge 8470d27eeb into sapling-pr-archive-bolinfest 2025-05-16 13:44:33 -07:00
Michael Bolin 8470d27eeb feat: add support for OpenAI tool type, local_shell 2025-05-16 13:44:27 -07:00
Fouad Matin fd0b1b0208 bump(version): 0.1.2505161243 (#967)
## `0.1.2505161243`

- Sign in with chatgpt (#963)
- Session history viewer (#912)
- Apply patch issue when using different cwd (#942)
- Diff command for filenames with special characters (#954)
2025-05-16 12:46:52 -07:00
Michael Bolin f09f62e1e2 merge commit for archive created by Sapling 2025-05-16 12:43:55 -07:00
Michael Bolin 77d63ee261 feat: add support for OpenAI tool type, local_shell 2025-05-16 12:43:45 -07:00
Michael Bolin 661931c1ea merge commit for archive created by Sapling 2025-05-16 12:33:21 -07:00
Fouad Matin c6e08ad8c1 add: sign in with chatgpt (#963)
Sign in with ChatGPT to get an API key (flow to grant API credits for Plus/Pro coming later today!)
2025-05-16 12:28:54 -07:00
Fouad Matin cabf83f2ed add: session history viewer (#912)
- A new “/sessions” command is available for browsing previous sessions,
as shown in the updated slash command list

- The CLI now documents and parses a new “--history” flag to browse past
sessions from the command line

- A dedicated `SessionsOverlay` component loads session metadata and
allows toggling between viewing and resuming sessions

- When the sessions overlay is opened during a chat, selecting a session
can either show the saved rollout or resume it
2025-05-16 12:28:22 -07:00
Michael Bolin 1d5da25862 feat: add support for OpenAI tool type, local_shell 2025-05-16 12:18:00 -07:00
Michael Bolin 57e50eccbd Merge 89ed7e54ac into sapling-pr-archive-bolinfest 2025-05-16 12:15:47 -07:00
Michael Bolin 89ed7e54ac chore: refactor handle_function_call() into smaller functions 2025-05-16 12:14:19 -07:00
Michael Bolin 1e39189393 feat: add support for file_opener option in Rust, similiar to #911 (#957)
This ports the enhancement introduced in
https://github.com/openai/codex/pull/911 (and the fixes in
https://github.com/openai/codex/pull/919) for the TypeScript CLI to the
Rust one.
2025-05-16 11:33:08 -07:00
Michael Bolin bd887ddeaa Merge 0dc09d13e2 into sapling-pr-archive-bolinfest 2025-05-16 11:32:55 -07:00
Michael Bolin 0dc09d13e2 feat: add support for OpenAI tool type, local_shell 2025-05-16 11:32:28 -07:00
Michael Bolin 85e073152d merge commit for archive created by Sapling 2025-05-16 11:27:55 -07:00
Michael Bolin d0e200bc1e feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 11:27:50 -07:00
Michael Bolin 7b4db53ee4 merge commit for archive created by Sapling 2025-05-16 11:26:24 -07:00
Michael Bolin 900b069c5b feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 11:26:14 -07:00
Michael Bolin 00f5ce3722 merge commit for archive created by Sapling 2025-05-16 11:24:44 -07:00
Michael Bolin 648cb47231 feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 11:24:38 -07:00
Michael Bolin e44a069d1c merge commit for archive created by Sapling 2025-05-16 11:21:13 -07:00
Michael Bolin c5bb5cb7db feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 11:21:07 -07:00
Michael Bolin 2a0e22b953 merge commit for archive created by Sapling 2025-05-16 11:17:41 -07:00
Michael Bolin b0d36e7488 feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 11:17:34 -07:00
Michael Bolin 23358a1e52 merge commit for archive created by Sapling 2025-05-16 11:10:40 -07:00
Michael Bolin c38e982d9a feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 11:10:34 -07:00
Michael Bolin 55a7086e75 merge commit for archive created by Sapling 2025-05-16 11:09:14 -07:00
Michael Bolin 29de20f34d feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 11:09:06 -07:00
Michael Bolin bdc2c97a50 merge commit for archive created by Sapling 2025-05-16 10:15:29 -07:00
Michael Bolin 90c068412d feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 10:14:17 -07:00
Michael Bolin 2519f91566 merge commit for archive created by Sapling 2025-05-16 10:01:10 -07:00
Michael Bolin 0d197916a5 feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 10:01:05 -07:00
Michael Bolin 85848f6cb1 merge commit for archive created by Sapling 2025-05-16 09:57:11 -07:00
Michael Bolin 2e6fadc7ec feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 09:57:06 -07:00
Michael Bolin 55148939c4 Merge baa92fc9c3 into sapling-pr-archive-bolinfest 2025-05-16 09:52:19 -07:00
Michael Bolin baa92fc9c3 feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 09:52:13 -07:00
Michael Bolin 3d9f4fcd8a fix: introduce ExtractHeredocError that implements PartialEq (#958) 2025-05-16 09:42:27 -07:00
Michael Bolin a62437601b Merge 649ac117f0 into sapling-pr-archive-bolinfest 2025-05-16 09:36:29 -07:00
Michael Bolin 649ac117f0 fix: introduce ExtractHeredocError that implements PartialEq 2025-05-16 09:36:22 -07:00
Michael Bolin ce225b13de merge commit for archive created by Sapling 2025-05-16 09:23:37 -07:00
Michael Bolin 678fd19340 feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 09:23:32 -07:00
Michael Bolin 404c304aff Merge 02a569ac31 into sapling-pr-archive-bolinfest 2025-05-16 09:22:47 -07:00
Michael Bolin 02a569ac31 feat: add support for file_opener option in Rust, similiar to #911 2025-05-16 09:22:31 -07:00
Sebastian Lund 84e01f4b62 fix: apply patch issue when using different cwd (#942)
If you run a codex instance outside of the current working directory
from where you launched the codex binary it won't be able to apply
patches correctly, even if the sandbox policy allows it. This manifests
weird behaviours, such as

* Reading the same filename in the binary working directory, and
overwriting it in the session working directory. e.g. if you have a
`readme` in both folders it will overwrite the readme in the session
working directory with the readme in the binary working directory
*applied with the suggested patch*.
* The LLM ends up in weird loops trying to verify and debug why the
apply_patch won't work, and it can result in it applying patches by
manually writing python or javascript if it figures out that either is
supported by the system instead.

I added a test-case to ensure that the patch contents are based on the
cwd.

## Issue: mixing relative & absolute paths in apply_patch

1. The apply_patch tool use relative paths based on the session working
directory.
2. `unified_diff_from_chunks` eventually ends up [reading the source
file](https://github.com/reflectionai/codex/blob/main/codex-rs/apply-patch/src/lib.rs#L410)
to figure out what the diff is, by using the relative path.
3. The changes are targeted using an absolute path derived from the
current working directory.

The end-result in case session working directory differs from the binary
working directory: we get the diff for a file relative to the binary
working directory, and apply it on a file in the session working
directory.
2025-05-16 09:12:16 -07:00