mirror of
https://github.com/openai/codex.git
synced 2026-11-24 23:20:47 +00:00
## Why MCP tools can return structured data alongside a JSON text fallback for clients that need it. Printing the whole result in Code Mode can show the same data twice. ## What changed Enable `features.code_mode_mcp_result_dedup` to let `text()` omit `content` when it prints an original, successful MCP result whose only content block is a plain text fallback that parses to the same JSON as `structuredContent`. The JavaScript result retains both fields. Carry the result format through gRPC so the host can distinguish MCP results from ordinary JSON. The feature is off by default. ## Testing Add coverage for both feature flag settings, for printing original MCP results and copies through gRPC, and for comparing equivalent JSON. GitOrigin-RevId: a8b0b42f5375d9744c235a0e663090dd5982e37e
37 lines
1.2 KiB
TOML
37 lines
1.2 KiB
TOML
[package]
|
|
edition.workspace = true
|
|
license.workspace = true
|
|
name = "codex-code-mode-runtime"
|
|
version.workspace = true
|
|
|
|
[lib]
|
|
doctest = false
|
|
name = "codex_code_mode_runtime"
|
|
path = "src/lib.rs"
|
|
|
|
[lints]
|
|
workspace = true
|
|
|
|
[dependencies]
|
|
base64 = { workspace = true }
|
|
codex-code-mode-protocol = { workspace = true }
|
|
codex-plugin-host = { workspace = true }
|
|
codex-protocol = { workspace = true }
|
|
codex-utils-audio = { workspace = true }
|
|
codex-utils-output-truncation = { workspace = true }
|
|
codex-utils-string = { workspace = true }
|
|
deno_core_icudata = { workspace = true }
|
|
futures = { workspace = true, features = ["executor", "std"] }
|
|
opentelemetry = { workspace = true }
|
|
serde = { workspace = true, features = ["derive"] }
|
|
serde_json = { workspace = true, features = ["raw_value"] }
|
|
serde_with = { workspace = true, features = ["macros"] }
|
|
tokio = { workspace = true, features = ["macros", "rt", "sync", "time"] }
|
|
tokio-util = { workspace = true, features = ["codec", "compat", "rt"] }
|
|
tracing = { workspace = true }
|
|
v8 = { workspace = true, features = ["v8_enable_sandbox"] }
|
|
|
|
[dev-dependencies]
|
|
pretty_assertions = { workspace = true }
|
|
tokio = { workspace = true, features = ["test-util"] }
|