Extract user input preparation into codex-user-input (#61949)

## What changed

Move local attachment snapshotting and conversion from `UserInput` to model request content out of `codex-protocol` into a dedicated `codex-user-input` crate. Update core, the TUI, and the queue extension to use the new crate, replacing the `ResponseInputItem` conversion methods with `from_user_input`.

Move the associated attachment and message conversion tests alongside the implementation, preserving coverage for image positions, media labels, serialization, and error placeholders.

GitOrigin-RevId: 77d0f94a4cd4c2edc008b9e2e63a989995aab058
This commit is contained in:
Adam Perry @ OpenAI
2026-11-17 02:43:52 +00:00
committed by copyberry
parent ad161203cb
commit 5b3d2c7fce
24 changed files with 814 additions and 723 deletions
+1
View File
@@ -18,6 +18,7 @@ codex-core = { workspace = true }
codex-extension-api = { workspace = true }
codex-protocol = { workspace = true }
codex-thread-store = { workspace = true }
codex-user-input = { workspace = true }
serde_json = { workspace = true }
thiserror = { workspace = true }
tokio = { workspace = true, features = ["rt", "sync", "time"] }
+1 -1
View File
@@ -19,7 +19,6 @@ use codex_extension_api::ThreadLifecycleContributor;
use codex_extension_api::ThreadResumeInput;
use codex_protocol::ThreadId;
use codex_protocol::error::CodexErr;
use codex_protocol::models::snapshot_local_user_input;
use codex_protocol::protocol::AgentStatus;
use codex_protocol::protocol::Event;
use codex_protocol::protocol::EventMsg;
@@ -31,6 +30,7 @@ use codex_thread_store::MAX_QUEUE_ITEMS;
use codex_thread_store::QueueStore;
use codex_thread_store::QueuedUserSubmissionRecord;
use codex_thread_store::ThreadStoreError;
use codex_user_input::snapshot_local_user_input;
use thiserror::Error;
use tokio::sync::Mutex;
use tokio::sync::OwnedMutexGuard;