1
0
mirror of https://git.savannah.gnu.org/git/guix.git synced 2026-06-14 06:54:06 +02:00
Files
guix/gnu/packages/patches/rust-codex-0.124.0-code-mode-stub-toolname.patch
Danny Milosavljevic a1a82d2525 gnu: codex: Update to 0.124.0.
* gnu/packages/patches/rust-codex-0.124.0-code-mode-stub-toolname.patch: New file.
* gnu/packages/patches/rust-codex-0.124.0-remove-patch-sections.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add references to them.
* gnu/packages/codex.scm (codex): Update to 0.124.0.
* gnu/packages/rust-crates.scm: Update.
* gnu/packages/rust-sources.scm (rust-codex-0.124.0): New variable.

Change-Id: I90570206d39c533edfc6d70e229ee3f7eda9dcf2
2026-04-26 22:47:11 +02:00

26 lines
1.4 KiB
Diff

Author: Danny Milosavljevic <dannym@friendly-machines.com>
Date: 2026-04-26
License: ASL2.0
Subject: Stub CodeModeTurnHost::invoke_tool signature uses ToolName.
In codex 0.117 the upstream trait took `tool_name: String`, so the
disable-code-mode patch's `cfg(not(feature = "v8-runtime"))` stub used
String to match. In codex 0.124 the upstream trait takes
`codex_protocol::ToolName`, and core/src/tools/code_mode/mod.rs's impl
of CodeModeTurnHost passes `ToolName`, so the stub must match the new
signature here too. This patch is applied only to codex 0.124+ on top
of the shared disable-code-mode patch; codex-acp (which still pins
rust-v0.117.0 where code-mode has no codex-protocol dep) keeps the
String-based stub.
--- a/codex-rs/code-mode/src/lib.rs
+++ b/codex-rs/code-mode/src/lib.rs
@@ -77,7 +77,7 @@
#[cfg(not(feature = "v8-runtime"))]
#[async_trait::async_trait]
pub trait CodeModeTurnHost: Send + Sync {
- async fn invoke_tool(&self, tool_name: String, input: Option<serde_json::Value>, cancellation_token: tokio_util::sync::CancellationToken) -> Result<serde_json::Value, String>;
+ async fn invoke_tool(&self, tool_name: codex_protocol::ToolName, input: Option<serde_json::Value>, cancellation_token: tokio_util::sync::CancellationToken) -> Result<serde_json::Value, String>;
async fn notify(&self, call_id: String, cell_id: String, text: String) -> Result<(), String>;
}