mirror of
https://github.com/openai/codex.git
synced 2026-12-02 00:31:03 +00:00
## Why A slow or stalled Windows clipboard helper can block the TUI while it reads a pasted image. ## What changed Read and stage clipboard images on a background worker in WSL. Give each paste a five-second deadline and stop and reap the PowerShell helper if the read is cancelled or times out. Keep the draft editable while the paste is pending. Insert the image at the original cursor or selection, preserve later edits outside that range, and cancel the paste if an edit overlaps the range or the draft is no longer current. Block submission while the paste is pending and show a reminder to review the draft before sending. ## Testing Add regression tests for insertion after continued typing, submission blocking, stale completions, temporary file cleanup, and timeouts. Cover helper cleanup after cancellation or timeout and rejection of oversized clipboard output. GitOrigin-RevId: d7b1d520b242244f9749f02e9d62a57d17821340
211 lines
7.3 KiB
TOML
211 lines
7.3 KiB
TOML
[package]
|
|
name = "codex-tui"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
autobins = false
|
|
|
|
[[bin]]
|
|
name = "codex-tui"
|
|
path = "src/main.rs"
|
|
|
|
[[bin]]
|
|
name = "md-events"
|
|
path = "src/bin/md-events.rs"
|
|
|
|
[lib]
|
|
name = "codex_tui"
|
|
path = "src/lib.rs"
|
|
doctest = false
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
codex-build-info = { workspace = true }
|
|
anyhow = { workspace = true }
|
|
axum = { workspace = true, default-features = false, features = ["http1", "tokio"] }
|
|
base64 = { workspace = true }
|
|
cap-fs-ext = "3.4.6"
|
|
cap-std = "3.4.6"
|
|
chrono = { workspace = true, features = ["serde"] }
|
|
clap = { workspace = true, features = ["derive"] }
|
|
codex-ansi-escape = { workspace = true }
|
|
codex-api = { workspace = true }
|
|
codex-prompts = { workspace = true }
|
|
codex-app-server-client = { workspace = true }
|
|
codex-app-server-daemon = { workspace = true }
|
|
codex-app-server-protocol = { workspace = true }
|
|
codex-arg0 = { workspace = true }
|
|
codex-backend-client = { workspace = true }
|
|
codex-install-context = { workspace = true }
|
|
codex-cloud-config = { workspace = true }
|
|
codex-config = { workspace = true }
|
|
codex-context-fragments = { workspace = true }
|
|
codex-connectors = { workspace = true }
|
|
codex-core-plugins = { workspace = true }
|
|
codex-history = { workspace = true }
|
|
codex-exec-server = { workspace = true }
|
|
codex-features = { workspace = true }
|
|
codex-feedback = { workspace = true }
|
|
codex-file-search = { workspace = true }
|
|
codex-git-utils = { workspace = true }
|
|
codex-http-client = { workspace = true }
|
|
codex-login = { workspace = true }
|
|
codex-statsig = { workspace = true }
|
|
codex-mermaid = { workspace = true }
|
|
codex-message-history = { workspace = true }
|
|
codex-model-provider = { workspace = true }
|
|
codex-model-provider-info = { workspace = true }
|
|
codex-models-manager = { workspace = true }
|
|
codex-otel = { workspace = true }
|
|
codex-plugin = { workspace = true }
|
|
codex-protocol = { workspace = true }
|
|
codex-realtime-webrtc = { workspace = true }
|
|
futures = { workspace = true }
|
|
codex-rollout = { workspace = true }
|
|
codex-sandboxing = { workspace = true }
|
|
codex-shell-command = { workspace = true }
|
|
codex-state = { workspace = true }
|
|
codex-terminal-detection = { workspace = true }
|
|
codex-worktree = { workspace = true }
|
|
codex-utils-approval-presets = { workspace = true }
|
|
codex-uds = { workspace = true }
|
|
codex-user-input = { workspace = true }
|
|
codex-utils-absolute-path = { workspace = true }
|
|
codex-utils-cli = { workspace = true }
|
|
codex-utils-elapsed = { workspace = true }
|
|
codex-utils-fuzzy-match = { workspace = true }
|
|
codex-utils-home-dir = { workspace = true }
|
|
codex-utils-oss = { workspace = true }
|
|
codex-utils-path = { workspace = true }
|
|
codex-utils-path-uri = { workspace = true }
|
|
codex-utils-process = { workspace = true }
|
|
codex-utils-plugins = { workspace = true }
|
|
codex-utils-sandbox-summary = { workspace = true }
|
|
codex-utils-sleep-inhibitor = { workspace = true }
|
|
codex-utils-string = { workspace = true }
|
|
color-eyre = { workspace = true }
|
|
crossterm = { workspace = true, features = ["bracketed-paste", "event-stream"] }
|
|
derive_more = { workspace = true, features = ["debug", "is_variant"] }
|
|
diffy = { workspace = true }
|
|
dirs = { workspace = true }
|
|
dunce = { workspace = true }
|
|
http = { workspace = true }
|
|
icu_properties = { workspace = true }
|
|
image = { workspace = true, features = ["jpeg", "png", "gif", "webp"] }
|
|
itertools = { workspace = true }
|
|
lazy_static = { workspace = true }
|
|
pathdiff = { workspace = true }
|
|
pulldown-cmark = { workspace = true, features = ["html"] }
|
|
rand = { workspace = true }
|
|
ratatui = { workspace = true, features = [
|
|
"scrolling-regions",
|
|
"unstable-backend-writer",
|
|
"unstable-rendered-line-info",
|
|
"unstable-widget-ref",
|
|
] }
|
|
ratatui-macros = { workspace = true }
|
|
regex-lite = { workspace = true }
|
|
rmcp = { workspace = true, features = ["server", "transport-streamable-http-server"] }
|
|
semver = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true, features = ["preserve_order"] }
|
|
sha2 = { workspace = true }
|
|
shlex = { workspace = true }
|
|
strum = { workspace = true }
|
|
strum_macros = { workspace = true }
|
|
tempfile = { workspace = true }
|
|
textwrap = { workspace = true }
|
|
thiserror = { workspace = true }
|
|
tokio = { workspace = true, features = [
|
|
"io-std",
|
|
"macros",
|
|
"process",
|
|
"rt-multi-thread",
|
|
"signal",
|
|
"test-util",
|
|
"time",
|
|
] }
|
|
tokio-stream = { workspace = true, features = ["sync"] }
|
|
toml = { workspace = true }
|
|
toml_edit = { workspace = true }
|
|
tracing = { workspace = true, features = ["log"] }
|
|
tracing-appender = { workspace = true }
|
|
tracing-subscriber = { workspace = true, features = ["env-filter"] }
|
|
syntect = { version = "5", default-features = false, features = ["parsing", "plist-load", "regex-onig"] }
|
|
two-face = { version = "0.5", default-features = false, features = ["syntect-onig"] }
|
|
unicode-bidi = { workspace = true }
|
|
unicode-linebreak = { workspace = true }
|
|
unicode-segmentation = { workspace = true }
|
|
unicode-width = { workspace = true }
|
|
vtparse = { workspace = true }
|
|
url = { workspace = true }
|
|
urlencoding = { workspace = true }
|
|
webbrowser = { workspace = true }
|
|
uuid = { workspace = true }
|
|
|
|
codex-windows-sandbox = { workspace = true }
|
|
tokio-util = { workspace = true, features = ["time"] }
|
|
|
|
[target.'cfg(unix)'.dependencies]
|
|
libc = { workspace = true }
|
|
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
core-foundation = "0.10"
|
|
objc2 = "0.6.3"
|
|
objc2-app-kit = { version = "0.3.2", default-features = false, features = ["std", "NSAccessibility", "NSPasteboard", "NSPasteboardItem", "NSWorkspace"] }
|
|
objc2-foundation = { version = "0.3.2", default-features = false, features = ["std", "NSArray", "NSData", "NSDateFormatter", "NSEnumerator", "NSFormatter", "NSLocale", "NSString"] }
|
|
|
|
[target.'cfg(target_os = "linux")'.dependencies]
|
|
nix = { version = "0.31.3", features = ["socket"] }
|
|
wl-clipboard-rs = { workspace = true }
|
|
# Keep the same executor features as the credential store, which also uses zbus.
|
|
zbus = "4.4.0"
|
|
|
|
[target.'cfg(windows)'.dependencies]
|
|
clipboard-win = "5.4.3"
|
|
image = { workspace = true, features = ["bmp"] }
|
|
which = { workspace = true }
|
|
windows-sys = { workspace = true, features = [
|
|
"Win32_Foundation",
|
|
"Win32_Globalization",
|
|
"Win32_Security",
|
|
"Win32_Storage_FileSystem",
|
|
"Win32_System_Console",
|
|
"Win32_System_Diagnostics_ToolHelp",
|
|
"Win32_System_RemoteDesktop",
|
|
"Win32_System_IO",
|
|
"Win32_System_Pipes",
|
|
"Win32_System_Threading",
|
|
"Win32_UI_Shell",
|
|
"Win32_UI_WindowsAndMessaging",
|
|
] }
|
|
winsplit = "0.1"
|
|
|
|
# Clipboard support via `arboard` is not available on Android/Termux.
|
|
# Only include it for non-Android targets so the crate builds on Android.
|
|
[target.'cfg(not(target_os = "android"))'.dependencies]
|
|
arboard = { workspace = true }
|
|
|
|
|
|
[dev-dependencies]
|
|
app_test_support = { workspace = true }
|
|
codex-protocol-test-support = { workspace = true }
|
|
codex-skills = { workspace = true }
|
|
core_test_support = { workspace = true }
|
|
codex-utils-cargo-bin = { workspace = true }
|
|
assert_matches = { workspace = true }
|
|
chrono = { workspace = true, features = ["serde"] }
|
|
futures = { workspace = true }
|
|
insta = { workspace = true }
|
|
opentelemetry_sdk = { workspace = true }
|
|
pretty_assertions = { workspace = true }
|
|
rand = { workspace = true }
|
|
serial_test = { workspace = true }
|
|
tokio-tungstenite = { workspace = true }
|
|
ts-rs = { workspace = true }
|
|
vt100 = { workspace = true }
|
|
uuid = { workspace = true }
|
|
wiremock = { workspace = true }
|