-
Notifications
You must be signed in to change notification settings - Fork 59
feat: update support for codex #41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9e874f3
feat: update support for codex
35C4n0r eaab81e
Update lib/msgfmt/message_box.go
35C4n0r f5641fe
feat: update readme and tests
35C4n0r 052e516
feat: better code formatting
35C4n0r 09b35a4
feat: better code formatting
35C4n0r cd38bea
feat: add warning for excessive term height in Codex
35C4n0r 147f55b
chore: swap conditions for efficiency, lol
35C4n0r a2d93b5
Update README.md
35C4n0r f7aa735
Update lib/msgfmt/message_box.go
35C4n0r File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 8 additions & 17 deletions
25
lib/msgfmt/testdata/format/codex/confirmation_box/expected.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,10 @@ | ||
thinking for 9s | ||
Shell Command | ||
~/Documents/work/agentapi$ git rev-parse --show-toplevel | ||
|
||
command | ||
Allow command? | ||
|
||
$ git rev-parse --show-toplevel | ||
|
||
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ | ||
│Shell Command │ | ||
│ │ | ||
│$ git rev-parse --show-toplevel │ | ||
│ │ | ||
│Allow command? │ | ||
│ │ | ||
│ ❯ Yes (y) │ | ||
│ Yes, always approve this exact command for this session (a) │ | ||
│ Edit or give feedback (e) │ | ||
│ No, and keep going (n) │ | ||
│ No, and stop for now (esc) │ | ||
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ | ||
▶ Yes (y) | ||
Yes, always approve this exact command for this session (a) | ||
Edit or give feedback (e) | ||
No, and keep going (n) | ||
No, and stop for now (esc) |
50 changes: 28 additions & 22 deletions
50
lib/msgfmt/testdata/format/codex/confirmation_box/msg.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,28 @@ | ||
user | ||
what repository are you in? | ||
|
||
thinking for 9s | ||
|
||
command | ||
|
||
$ git rev-parse --show-toplevel | ||
|
||
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────╮ | ||
│Shell Command │ | ||
│ │ | ||
│$ git rev-parse --show-toplevel │ | ||
│ │ | ||
│Allow command? │ | ||
│ │ | ||
│ ❯ Yes (y) │ | ||
│ Yes, always approve this exact command for this session (a) │ | ||
│ Edit or give feedback (e) │ | ||
│ No, and keep going (n) │ | ||
│ No, and stop for now (esc) │ | ||
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────╯ | ||
╭Messages (tab to focus)──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ | ||
│OpenAI Codex v0.10.0 (research preview) │ | ||
│ │ | ||
│codex session 790ba389-ab4d-47be-bb16-9cc7f36bcf2b │ | ||
│workdir: /Users/jkmr/Documents/work/agentapi │ | ||
│model: codex-mini-latest │ | ||
│provider: openai │ | ||
│approval: untrusted │ | ||
│sandbox: read-only │ | ||
│reasoning effort: medium │ | ||
│reasoning summaries: auto │ | ||
│ │ | ||
│user │ | ||
│what repository are you in? │ | ||
│ │ | ||
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ | ||
╭Review───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ | ||
│Shell Command │ | ||
│~/Documents/work/agentapi$ git rev-parse --show-toplevel │ | ||
│ │ | ||
│Allow command? │ | ||
│ │ | ||
│ ▶ Yes (y) │ | ||
│ Yes, always approve this exact command for this session (a) │ | ||
│ Edit or give feedback (e) │ | ||
│ No, and keep going (n) │ | ||
│ No, and stop for now (esc) │ | ||
╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ |
20 changes: 9 additions & 11 deletions
20
lib/msgfmt/testdata/format/codex/first_message/expected.txt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,10 @@ | ||
╭──────────────────────────────────────────────────────────────╮ | ||
│ ● OpenAI Codex (research preview) v0.1.2504161551 │ | ||
╰──────────────────────────────────────────────────────────────╯ | ||
╭──────────────────────────────────────────────────────────────╮ | ||
│ localhost session: c4bf4c89c3fb483c935bdff223394646 │ | ||
│ ↳ workdir: ~/dev/agentapi │ | ||
│ ↳ model: o4-mini │ | ||
│ ↳ approval: suggest │ | ||
╰──────────────────────────────────────────────────────────────╯ | ||
OpenAI Codex v0.10.0 (research preview) | ||
|
||
system | ||
Warning: model "o4-mini" is not in the list of available models returned by OpenAI. | ||
codex session 56576d81-529d-42f3-843b-78d870054a75 | ||
workdir: /Users/jkmr/Documents/work/agentapi | ||
model: codex-mini-latest | ||
provider: openai | ||
approval: untrusted | ||
sandbox: read-only | ||
reasoning effort: medium | ||
reasoning summaries: auto |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.