mirror of
https://github.com/openai/codex.git
synced 2026-11-17 22:59:25 +00:00
Rename tui_app_server to tui (#16104)
This is a follow-up to https://github.com/openai/codex/pull/15922. That previous PR deleted the old `tui` directory and left the new `tui_app_server` directory in place. This PR renames `tui_app_server` to `tui` and fixes up all references.
This commit is contained in:
1 parent
3d1abf3f3d
commit
61429a6c10
1128 files changed
+151
-3814
No files matched your search
@@ -35,9 +35,9 @@ In the codex-rs folder where the rust code lives:
|
|||||||
- If a file exceeds roughly 800 LoC, add new functionality in a new module instead of extending
|
- If a file exceeds roughly 800 LoC, add new functionality in a new module instead of extending
|
||||||
the existing file unless there is a strong documented reason not to.
|
the existing file unless there is a strong documented reason not to.
|
||||||
- This rule applies especially to high-touch files that already attract unrelated changes, such
|
- This rule applies especially to high-touch files that already attract unrelated changes, such
|
||||||
as `codex-rs/tui_app_server/src/app.rs`, `codex-rs/tui_app_server/src/bottom_pane/chat_composer.rs`,
|
as `codex-rs/tui/src/app.rs`, `codex-rs/tui/src/bottom_pane/chat_composer.rs`,
|
||||||
`codex-rs/tui_app_server/src/bottom_pane/footer.rs`, `codex-rs/tui_app_server/src/chatwidget.rs`,
|
`codex-rs/tui/src/bottom_pane/footer.rs`, `codex-rs/tui/src/chatwidget.rs`,
|
||||||
`codex-rs/tui_app_server/src/bottom_pane/mod.rs`, and similarly central orchestration modules.
|
`codex-rs/tui/src/bottom_pane/mod.rs`, and similarly central orchestration modules.
|
||||||
- When extracting code from a large module, move the related tests and module/type docs toward
|
- When extracting code from a large module, move the related tests and module/type docs toward
|
||||||
the new implementation so the invariants stay close to the code that owns them.
|
the new implementation so the invariants stay close to the code that owns them.
|
||||||
- When running Rust commands (e.g. `just fix` or `cargo test`) be patient with the command and never try to kill them using the PID. Rust lock can make the execution slow, this is expected.
|
- When running Rust commands (e.g. `just fix` or `cargo test`) be patient with the command and never try to kill them using the PID. Rust lock can make the execution slow, this is expected.
|
||||||
@@ -66,12 +66,10 @@ Likewise, when reviewing code, do not hesitate to push back on PRs that would un
|
|||||||
|
|
||||||
## TUI style conventions
|
## TUI style conventions
|
||||||
|
|
||||||
See `codex-rs/tui_app_server/styles.md`.
|
See `codex-rs/tui/styles.md`.
|
||||||
|
|
||||||
## TUI code conventions
|
## TUI code conventions
|
||||||
|
|
||||||
- When a change lands in `codex-rs/tui` and `codex-rs/tui_app_server` has a parallel implementation of the same behavior, reflect the change in `codex-rs/tui_app_server` too unless there is a documented reason not to.
|
|
||||||
|
|
||||||
- Use concise styling helpers from ratatui’s Stylize trait.
|
- Use concise styling helpers from ratatui’s Stylize trait.
|
||||||
- Basic spans: use "text".into()
|
- Basic spans: use "text".into()
|
||||||
- Styled spans: use "text".red(), "text".green(), "text".magenta(), "text".dim(), etc.
|
- Styled spans: use "text".red(), "text".green(), "text".magenta(), "text".dim(), etc.
|
||||||
|
|||||||
+2
-2
@@ -49,7 +49,7 @@ members = [
|
|||||||
"sandboxing",
|
"sandboxing",
|
||||||
"stdio-to-uds",
|
"stdio-to-uds",
|
||||||
"otel",
|
"otel",
|
||||||
"tui_app_server",
|
"tui",
|
||||||
"tools",
|
"tools",
|
||||||
"v8-poc",
|
"v8-poc",
|
||||||
"utils/absolute-path",
|
"utils/absolute-path",
|
||||||
@@ -149,7 +149,7 @@ codex-state = { path = "state" }
|
|||||||
codex-stdio-to-uds = { path = "stdio-to-uds" }
|
codex-stdio-to-uds = { path = "stdio-to-uds" }
|
||||||
codex-terminal-detection = { path = "terminal-detection" }
|
codex-terminal-detection = { path = "terminal-detection" }
|
||||||
codex-tools = { path = "tools" }
|
codex-tools = { path = "tools" }
|
||||||
codex-tui = { path = "tui_app_server" }
|
codex-tui = { path = "tui" }
|
||||||
codex-v8-poc = { path = "v8-poc" }
|
codex-v8-poc = { path = "v8-poc" }
|
||||||
codex-utils-absolute-path = { path = "utils/absolute-path" }
|
codex-utils-absolute-path = { path = "utils/absolute-path" }
|
||||||
codex-utils-approval-presets = { path = "utils/approval-presets" }
|
codex-utils-approval-presets = { path = "utils/approval-presets" }
|
||||||
|
|||||||
@@ -24,10 +24,10 @@ use codex_execpolicy::ExecPolicyCheckCommand;
|
|||||||
use codex_responses_api_proxy::Args as ResponsesApiProxyArgs;
|
use codex_responses_api_proxy::Args as ResponsesApiProxyArgs;
|
||||||
use codex_state::StateRuntime;
|
use codex_state::StateRuntime;
|
||||||
use codex_state::state_db_path;
|
use codex_state::state_db_path;
|
||||||
use codex_tui_app_server::AppExitInfo;
|
use codex_tui::AppExitInfo;
|
||||||
use codex_tui_app_server::Cli as TuiCli;
|
use codex_tui::Cli as TuiCli;
|
||||||
use codex_tui_app_server::ExitReason;
|
use codex_tui::ExitReason;
|
||||||
use codex_tui_app_server::update_action::UpdateAction;
|
use codex_tui::update_action::UpdateAction;
|
||||||
use codex_utils_cli::CliConfigOverrides;
|
use codex_utils_cli::CliConfigOverrides;
|
||||||
use owo_colors::OwoColorize;
|
use owo_colors::OwoColorize;
|
||||||
use std::io::IsTerminal;
|
use std::io::IsTerminal;
|
||||||
@@ -1228,7 +1228,7 @@ async fn run_interactive_tui(
|
|||||||
|
|
||||||
let normalized_remote = remote
|
let normalized_remote = remote
|
||||||
.as_deref()
|
.as_deref()
|
||||||
.map(codex_tui_app_server::normalize_remote_addr)
|
.map(codex_tui::normalize_remote_addr)
|
||||||
.transpose()
|
.transpose()
|
||||||
.map_err(std::io::Error::other)?;
|
.map_err(std::io::Error::other)?;
|
||||||
if remote_auth_token_env.is_some() && normalized_remote.is_none() {
|
if remote_auth_token_env.is_some() && normalized_remote.is_none() {
|
||||||
@@ -1241,7 +1241,7 @@ async fn run_interactive_tui(
|
|||||||
.map(read_remote_auth_token_from_env_var)
|
.map(read_remote_auth_token_from_env_var)
|
||||||
.transpose()
|
.transpose()
|
||||||
.map_err(std::io::Error::other)?;
|
.map_err(std::io::Error::other)?;
|
||||||
codex_tui_app_server::run_main(
|
codex_tui::run_main(
|
||||||
interactive,
|
interactive,
|
||||||
arg0_paths,
|
arg0_paths,
|
||||||
codex_core::config_loader::LoaderOverrides::default(),
|
codex_core::config_loader::LoaderOverrides::default(),
|
||||||
|
|||||||
@@ -931,7 +931,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
|
|||||||
if page.composer.flush_paste_burst_if_due() { needs_redraw = true; }
|
if page.composer.flush_paste_burst_if_due() { needs_redraw = true; }
|
||||||
if page.composer.is_in_paste_burst() {
|
if page.composer.is_in_paste_burst() {
|
||||||
let _ = frame_tx
|
let _ = frame_tx
|
||||||
.send(Instant::now() + codex_tui_app_server::ComposerInput::recommended_flush_delay());
|
.send(Instant::now() + codex_tui::ComposerInput::recommended_flush_delay());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Keep spinner pulsing only while loading.
|
// Keep spinner pulsing only while loading.
|
||||||
@@ -1492,7 +1492,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
|
|||||||
_ => {
|
_ => {
|
||||||
if page.submitting {
|
if page.submitting {
|
||||||
// Ignore input while submitting
|
// Ignore input while submitting
|
||||||
} else if let codex_tui_app_server::ComposerAction::Submitted(text) =
|
} else if let codex_tui::ComposerAction::Submitted(text) =
|
||||||
page.composer.input(key)
|
page.composer.input(key)
|
||||||
{
|
{
|
||||||
// Submit only if we have an env id
|
// Submit only if we have an env id
|
||||||
@@ -1526,7 +1526,7 @@ pub async fn run_main(cli: Cli, _codex_linux_sandbox_exe: Option<PathBuf>) -> an
|
|||||||
if page.composer.is_in_paste_burst() {
|
if page.composer.is_in_paste_burst() {
|
||||||
let _ = frame_tx.send(
|
let _ = frame_tx.send(
|
||||||
Instant::now()
|
Instant::now()
|
||||||
+ codex_tui_app_server::ComposerInput::recommended_flush_delay(),
|
+ codex_tui::ComposerInput::recommended_flush_delay(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// Always schedule an immediate redraw for key edits in the composer.
|
// Always schedule an immediate redraw for key edits in the composer.
|
||||||
@@ -2136,8 +2136,8 @@ mod tests {
|
|||||||
use codex_cloud_tasks_client::TaskId;
|
use codex_cloud_tasks_client::TaskId;
|
||||||
use codex_cloud_tasks_client::TaskStatus;
|
use codex_cloud_tasks_client::TaskStatus;
|
||||||
use codex_cloud_tasks_client::TaskSummary;
|
use codex_cloud_tasks_client::TaskSummary;
|
||||||
use codex_tui_app_server::ComposerAction;
|
use codex_tui::ComposerAction;
|
||||||
use codex_tui_app_server::ComposerInput;
|
use codex_tui::ComposerInput;
|
||||||
use crossterm::event::KeyCode;
|
use crossterm::event::KeyCode;
|
||||||
use crossterm::event::KeyEvent;
|
use crossterm::event::KeyEvent;
|
||||||
use crossterm::event::KeyModifiers;
|
use crossterm::event::KeyModifiers;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
use codex_tui_app_server::ComposerInput;
|
use codex_tui::ComposerInput;
|
||||||
|
|
||||||
pub struct NewTaskPage {
|
pub struct NewTaskPage {
|
||||||
pub composer: ComposerInput,
|
pub composer: ComposerInput,
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ use crate::app::AttemptView;
|
|||||||
use crate::util::format_relative_time_now;
|
use crate::util::format_relative_time_now;
|
||||||
use codex_cloud_tasks_client::AttemptStatus;
|
use codex_cloud_tasks_client::AttemptStatus;
|
||||||
use codex_cloud_tasks_client::TaskStatus;
|
use codex_cloud_tasks_client::TaskStatus;
|
||||||
use codex_tui_app_server::render_markdown_text;
|
use codex_tui::render_markdown_text;
|
||||||
|
|
||||||
pub fn draw(frame: &mut Frame, app: &mut App) {
|
pub fn draw(frame: &mut Frame, app: &mut App) {
|
||||||
let area = frame.area();
|
let area = frame.area();
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
load("//:defs.bzl", "codex_rust_crate")
|
load("//:defs.bzl", "codex_rust_crate")
|
||||||
|
|
||||||
codex_rust_crate(
|
codex_rust_crate(
|
||||||
name = "tui_app_server",
|
name = "tui",
|
||||||
crate_name = "codex_tui_app_server",
|
crate_name = "codex_tui",
|
||||||
compile_data = glob(
|
compile_data = glob(
|
||||||
include = ["**"],
|
include = ["**"],
|
||||||
exclude = [
|
exclude = [
|
||||||
@@ -6,19 +6,15 @@ license.workspace = true
|
|||||||
autobins = false
|
autobins = false
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "codex-tui-app-server"
|
name = "codex-tui"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|
||||||
[[bin]]
|
[[bin]]
|
||||||
name = "codex-tui"
|
name = "md-events"
|
||||||
path = "src/bin/codex-tui.rs"
|
|
||||||
|
|
||||||
[[bin]]
|
|
||||||
name = "md-events-app-server"
|
|
||||||
path = "src/bin/md-events.rs"
|
path = "src/bin/md-events.rs"
|
||||||
|
|
||||||
[lib]
|
[lib]
|
||||||
name = "codex_tui_app_server"
|
name = "codex_tui"
|
||||||
path = "src/lib.rs"
|
path = "src/lib.rs"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loaded 100 of 1128 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user