mirror of
https://github.com/openai/codex.git
synced 2026-11-22 23:00:42 +00:00
## Why When Codex points a user to a document, image, or source line, it can show that file alongside the conversation so the user can inspect it in context. ## What changed Add the `open_in_codex` MCP tool to the terminal workspace. It accepts a file path and an optional one-based line number. Requests queue until the calling conversation is visible and the sidebar can show the file without taking keyboard focus from the chat. The embedded backend loads a sandboxed snapshot using the calling thread's workspace and read permissions. Backends without an in-process permissions reader prompt the user to open the file. Pressing Enter in the focused preview also opens a snapshot as a live, watched document. ## Testing Cover queued previews when returning to the calling conversation, sandboxed reads, confirmation before opening, and live updates after the user opens a snapshot. GitOrigin-RevId: ce55f2dfdc7504e2f07e26f5c6404a591eb64649
39 lines
1.2 KiB
Python
39 lines
1.2 KiB
Python
load("//:defs.bzl", "MACOS_WEBRTC_RUSTC_LINK_FLAGS", "codex_rust_crate")
|
|
|
|
codex_rust_crate(
|
|
name = "tui",
|
|
binaries_with_build_commit = ["codex-tui"],
|
|
compile_data = glob([
|
|
"assets/**",
|
|
]),
|
|
crate_name = "codex_tui",
|
|
extra_binaries = [
|
|
"//codex-rs/bwrap:bwrap",
|
|
"//codex-rs/cli:codex",
|
|
"//codex-rs/rmcp-client:test_stdio_server",
|
|
],
|
|
integration_compile_data_extra = ["src/test_backend.rs"],
|
|
rustc_flags_extra = MACOS_WEBRTC_RUSTC_LINK_FLAGS,
|
|
test_data_extra = glob([
|
|
"src/**/*.rs",
|
|
"src/**/snapshots/**",
|
|
"tests/fixtures/**",
|
|
]),
|
|
test_shard_counts = {
|
|
"tui-unit-tests": 8,
|
|
},
|
|
# The startup symlink test applies its own Seatbelt policy, which cannot be nested.
|
|
test_tags = ["no-sandbox"],
|
|
# Large async test futures can overflow the default libtest stack.
|
|
unit_test_env = {"RUST_MIN_STACK": "25165824"}, # 24 MiB
|
|
unit_test_srcs = glob([
|
|
"src/**/*_test_support.rs",
|
|
"src/**/*_tests.rs",
|
|
"src/**/*_tests/**/*.rs",
|
|
"src/**/test_fixtures.rs",
|
|
"src/**/test_support.rs",
|
|
"src/**/tests.rs",
|
|
"src/**/tests/**/*.rs",
|
|
]) + ["src/test_backend.rs"],
|
|
)
|