Conversation
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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Why
This is another small step in the
codex-core->codex-toolsmigration described inAGENTS.md.core/src/tools/spec.rsandcore/src/tools/code_mode/mod.rswere both hand-rolling the same pure transformation: convert visibleToolSpecs into code-mode nested tool definitions, then sort and deduplicate by tool name. That logic does not depend on core runtime state or handlers, so keeping it incodex-coremakesspec.rsharder to peel out later than it needs to be.What Changed
collect_code_mode_tool_definitions()tocodex-rs/tools/src/code_mode.rs.codex-rs/core/src/tools/spec.rswhen assembling theexectool description.codex-rs/core/src/tools/code_mode/mod.rswhen exposing nested tool metadata to the code-mode runtime.This is intended to be a straight refactor with no behavior change and no new test surface.
Verification
cargo test -p codex-toolscargo test -p codex-core tools::spec::testscargo test -p codex-core code_mode_only_