Move code mode tool files under tools/code_mode and split functionality (#14476)

- **Summary**
- migrate the code mode handler, service, worker, process, runner, and
bridge assets into the `tools/code_mode` module tree
- split Execution, protocol, and handler logic into dedicated files and
relocate the tool definition into `code_mode/spec.rs`
- update core references and tests to stitch the new organization
together
- **Testing**
  - Not run (not requested)
This commit is contained in:
pakrym-oai
2026-03-12 09:54:11 -07:00
committed by GitHub
parent 09aa71adb7
commit c0528b9bd9
13 changed files with 1101 additions and 1029 deletions

View File

@@ -1,7 +1,6 @@
pub(crate) mod agent_jobs;
pub mod apply_patch;
mod artifacts;
mod code_mode;
mod dynamic;
mod grep_files;
mod js_repl;
@@ -32,10 +31,10 @@ use crate::function_tool::FunctionCallError;
use crate::sandboxing::SandboxPermissions;
use crate::sandboxing::merge_permission_profiles;
use crate::sandboxing::normalize_additional_permissions;
pub(crate) use crate::tools::code_mode::CodeModeExecuteHandler;
pub(crate) use crate::tools::code_mode::CodeModeWaitHandler;
pub use apply_patch::ApplyPatchHandler;
pub use artifacts::ArtifactsHandler;
pub use code_mode::CodeModeHandler;
pub use code_mode::CodeModeWaitHandler;
use codex_protocol::models::PermissionProfile;
use codex_protocol::protocol::AskForApproval;
pub use dynamic::DynamicToolHandler;