forked from openai/codex
-
Notifications
You must be signed in to change notification settings - Fork 0
fix(codex-rs): add model-provider crates to workspace manifest #611
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
22 commits
Select commit
Hold shift + click to select a range
1c83322
fix(codex-rs): add model-provider crates to workspace manifest
KooshaPari e161c7c
fix(codex-rs): backfill workspace deps for codex-cli manifest graph
KooshaPari feab082
fix(codex-rs): restore codex-skills crate manifest from upstream
KooshaPari d6a0dd9
fix(codex-rs): restore json-to-toml and prune missing workspace members
KooshaPari 09cba62
fix(codex-rs): align sqlx 0.9 + v8 149 for sqlite links
KooshaPari 9fdab01
fix(codex-rs): starlark 0.14 + restore codex-client error module
KooshaPari 3c2b322
fix(codex-client): add url dep for TransportError
KooshaPari a2aa4cb
fix(codex-rs): TransportError url as String + rustls aws_lc_rs
KooshaPari fe6d878
fix(codex-rs): restore missing openapi-models and protocol sources
KooshaPari 463a6a6
fix(codex-rs): restore file-search and utils/cli sources from upstream
KooshaPari d19d576
fix(codex-rs): sync state model from upstream and restore backfill_state
KooshaPari f96ff48
fix(codex-rs): restore missing secrets sanitizer and otel metrics mod…
KooshaPari f63dc3f
fix(codex-rs): restore workspace_acl and config overrides modules
KooshaPari a58572b
fix(codex-rs): restore agent_job model for helios fork state runtime
KooshaPari f067ce4
fix(codex-rs): restore login pkce module
KooshaPari 00e9504
fix(codex-rs): restore additional missing upstream source modules
KooshaPari eed4e1d
fix(codex-rs): restore 57 missing source files from snapshot
KooshaPari 7846d4c
fix(codex-rs): restore 6 missing include and source files
KooshaPari c4e9e32
fix(codex-rs): restore web_search_detail from snapshot
KooshaPari 50cdd8f
fix(codex-rs): restore explorer builtin role config
KooshaPari eec6db7
fix(codex-rs): restore tui animation frame assets from snapshot
KooshaPari 343b7c2
fix(codex-rs): use ReviewDecision::Denied for mcp-server approvals
KooshaPari File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| use ansi_to_tui::Error; | ||
| use ansi_to_tui::IntoText; | ||
| use ratatui::text::Line; | ||
| use ratatui::text::Text; | ||
|
|
||
| // Expand tabs in a best-effort way for transcript rendering. | ||
| // Tabs can interact poorly with left-gutter prefixes in our TUI and CLI | ||
| // transcript views (e.g., `nl` separates line numbers from content with a tab). | ||
| // Replacing tabs with spaces avoids odd visual artifacts without changing | ||
| // semantics for our use cases. | ||
| fn expand_tabs(s: &str) -> std::borrow::Cow<'_, str> { | ||
| if s.contains('\t') { | ||
| // Keep it simple: replace each tab with 4 spaces. | ||
| // We do not try to align to tab stops since most usages (like `nl`) | ||
| // look acceptable with a fixed substitution and this avoids stateful math | ||
| // across spans. | ||
| std::borrow::Cow::Owned(s.replace('\t', " ")) | ||
| } else { | ||
| std::borrow::Cow::Borrowed(s) | ||
| } | ||
| } | ||
|
|
||
| /// This function should be used when the contents of `s` are expected to match | ||
| /// a single line. If multiple lines are found, a warning is logged and only the | ||
| /// first line is returned. | ||
| pub fn ansi_escape_line(s: &str) -> Line<'static> { | ||
| // Normalize tabs to spaces to avoid odd gutter collisions in transcript mode. | ||
| let s = expand_tabs(s); | ||
| let text = ansi_escape(&s); | ||
| match text.lines.as_slice() { | ||
| [] => "".into(), | ||
| [only] => only.clone(), | ||
| [first, rest @ ..] => { | ||
| tracing::warn!("ansi_escape_line: expected a single line, got {first:?} and {rest:?}"); | ||
| first.clone() | ||
| } | ||
| } | ||
| } | ||
|
|
||
| pub fn ansi_escape(s: &str) -> Text<'static> { | ||
| // to_text() claims to be faster, but introduces complex lifetime issues | ||
| // such that it's not worth it. | ||
| match s.into_text() { | ||
| Ok(text) => text, | ||
| Err(err) => match err { | ||
| Error::NomError(message) => { | ||
| tracing::error!( | ||
| "ansi_to_tui NomError docs claim should never happen when parsing `{s}`: {message}" | ||
| ); | ||
| panic!(); | ||
| } | ||
| Error::Utf8Error(utf8error) => { | ||
| tracing::error!("Utf8Error: {utf8error}"); | ||
| panic!(); | ||
| } | ||
| }, | ||
| } | ||
| } |
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding
model-provideras a workspace member makes Cargo loadcodex-rs/model-provider/Cargo.toml, but that manifest inheritscodex-agent-identity,codex-aws-auth,codex-models-manager, andcodex-response-debug-contextfrom[workspace.dependencies], and none of those keys are defined in this root manifest. Any workspace/package build that reaches the newly advertised provider crate still aborts during manifest parsing, so the provider's inherited dependencies need to be added as part of this repair.Useful? React with 👍 / 👎.