Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
bb0117d
Add TUI IDE context command
etraut-openai Apr 30, 2026
ce500f4
codex: address PR review feedback (#20294)
etraut-openai Apr 30, 2026
7019ac7
codex: fix CI failure on PR #20294
etraut-openai Apr 30, 2026
f278fb3
codex: bound IDE frame reads by deadline (#20294)
etraut-openai Apr 30, 2026
e2b0f4f
codex: fix CI failure on PR #20294
etraut-openai Apr 30, 2026
c1ac634
codex: cancel Windows IDE IPC timeouts (#20294)
etraut-openai Apr 30, 2026
88627eb
codex: avoid retrying IDE timeouts (#20294)
etraut-openai Apr 30, 2026
c38f7d5
codex: enforce Unix IDE IPC deadline (#20294)
etraut-openai Apr 30, 2026
072e3bd
codex: address PR review feedback (#20294)
etraut-openai Apr 30, 2026
a9e1f5c
codex: fix Windows IDE IPC build (#20294)
etraut-openai Apr 30, 2026
47f8836
codex: fix IDE context submit latency (#20294)
etraut-openai Apr 30, 2026
de8faf9
codex: keep IDE IPC connection alive (#20294)
etraut-openai Apr 30, 2026
bb84d7c
codex: drain IDE IPC messages continuously (#20294)
etraut-openai Apr 30, 2026
ba93b13
codex: preserve IDE IPC framing while idle (#20294)
etraut-openai Apr 30, 2026
5efbf4c
codex: trim IDE context model (#20294)
etraut-openai Apr 30, 2026
aa60e62
codex: remove redundant IDE context tests (#20294)
etraut-openai Apr 30, 2026
867005c
codex: match IDE context IPC timeout
etraut-openai Apr 30, 2026
605d097
codex: retry stale IDE context clients
etraut-openai Apr 30, 2026
1502d54
codex: simplify IDE context IPC fetch
etraut-openai Apr 30, 2026
221f26d
codex: keep IDE IPC reader attached
etraut-openai Apr 30, 2026
f1c0334
codex: buffer partial IDE IPC frames
etraut-openai Apr 30, 2026
e00ef81
codex: simplify TUI IDE context support (#13834)
etraut-openai Apr 30, 2026
7693e73
Simplify TUI IDE context IPC client
etraut-openai Apr 30, 2026
fc78c3e
Simplify TUI IDE context state
etraut-openai Apr 30, 2026
ecf3845
Address IDE context review feedback
etraut-openai Apr 30, 2026
b23dcb9
codex: fix CI failure on PR #20294
etraut-openai Apr 30, 2026
e6711d4
codex: address PR review feedback (#20294)
etraut-openai Apr 30, 2026
b58e723
codex: address PR review feedback (#20294)
etraut-openai Apr 30, 2026
e4b50b4
codex: fix Windows clippy on PR #20294
etraut-openai Apr 30, 2026
6b7cc41
codex: address PR review feedback (#20294)
etraut-openai Apr 30, 2026
62bdcad
codex: fix Bazel clippy on PR #20294
etraut-openai Apr 30, 2026
ae7f369
codex: address PR review feedback (#20294)
etraut-openai Apr 30, 2026
2ea29eb
codex: address PR review feedback (#20294)
etraut-openai Apr 30, 2026
69f88a1
codex: address PR review feedback (#20294)
etraut-openai Apr 30, 2026
ef922b4
Simplify TUI IDE context handling
etraut-openai Apr 30, 2026
83c58ac
Merge origin/main into TUI IDE context PR
etraut-openai Apr 30, 2026
60356f3
Merge origin/main into tui IDE context
etraut-openai May 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions codex-rs/tui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ libc = { workspace = true }
which = { workspace = true }
windows-sys = { version = "0.52", features = [
"Win32_Foundation",
"Win32_Security",
"Win32_Storage_FileSystem",
"Win32_System_Console",
"Win32_System_IO",
"Win32_System_Pipes",
"Win32_System_Threading",
] }
winsplit = "0.1"

Expand Down
21 changes: 14 additions & 7 deletions codex-rs/tui/src/bottom_pane/chat_composer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@
//! overall state machine, since it affects which transitions are even possible from a given UI
//! state.
//!
use crate::bottom_pane::footer::goal_status_indicator_line;
use crate::key_hint;
use crate::key_hint::KeyBinding;
use crate::key_hint::has_ctrl_or_alt;
Expand Down Expand Up @@ -167,7 +166,6 @@ use super::footer::footer_hint_items_width;
use super::footer::footer_line_width;
use super::footer::inset_footer_hint_area;
use super::footer::max_left_width_for_right;
use super::footer::mode_indicator_line as collaboration_mode_indicator_line;
use super::footer::passive_footer_status_line;
use super::footer::render_context_right;
use super::footer::render_footer_from_props;
Expand All @@ -176,6 +174,7 @@ use super::footer::render_footer_line;
use super::footer::reset_mode_after_activity;
use super::footer::side_conversation_context_line;
use super::footer::single_line_footer_layout;
use super::footer::status_line_right_indicator_line;
use super::footer::toggle_shortcut_mode;
use super::footer::uses_passive_footer_status_layout;
use super::paste_burst::CharDecision;
Expand Down Expand Up @@ -385,6 +384,7 @@ pub(crate) struct ChatComposer {
config: ChatComposerConfig,
collaboration_mode_indicator: Option<CollaborationModeIndicator>,
goal_status_indicator: Option<GoalStatusIndicator>,
ide_context_active: bool,
connectors_enabled: bool,
plugins_command_enabled: bool,
fast_command_enabled: bool,
Expand Down Expand Up @@ -565,6 +565,7 @@ impl ChatComposer {
config,
collaboration_mode_indicator: None,
goal_status_indicator: None,
ide_context_active: false,
connectors_enabled: false,
plugins_command_enabled: false,
fast_command_enabled: false,
Expand Down Expand Up @@ -724,6 +725,10 @@ impl ChatComposer {
self.goal_status_indicator = indicator;
}

pub fn set_ide_context_active(&mut self, active: bool) {
self.ide_context_active = active;
}

pub fn set_personality_command_enabled(&mut self, enabled: bool) {
self.personality_command_enabled = enabled;
}
Expand Down Expand Up @@ -1083,14 +1088,16 @@ impl ChatComposer {
if let Some(vim_mode) = self.vim_mode_indicator_span() {
spans.push(vim_mode);
}
if let Some(collab) =
collaboration_mode_indicator_line(self.collaboration_mode_indicator, show_cycle_hint)
.or_else(|| goal_status_indicator_line(self.goal_status_indicator.as_ref()))
{
if let Some(indicators) = status_line_right_indicator_line(
self.collaboration_mode_indicator,
self.goal_status_indicator.as_ref(),
self.ide_context_active,
show_cycle_hint,
) {
if !spans.is_empty() {
spans.push(" | ".dim());
}
spans.extend(collab.spans);
spans.extend(indicators.spans);
}
if spans.is_empty() {
None
Expand Down
70 changes: 68 additions & 2 deletions codex-rs/tui/src/bottom_pane/footer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,34 @@ pub(crate) fn goal_status_indicator_line(
Some(Line::from(vec![Span::from(label).magenta()]))
}

pub(crate) fn status_line_right_indicator_line(
collaboration_mode_indicator: Option<CollaborationModeIndicator>,
goal_status_indicator: Option<&GoalStatusIndicator>,
ide_context_active: bool,
show_cycle_hint: bool,
) -> Option<Line<'static>> {
let primary_indicator = mode_indicator_line(collaboration_mode_indicator, show_cycle_hint)
.or_else(|| goal_status_indicator_line(goal_status_indicator));
let ide_context_indicator = ide_context_active.then(|| Line::from(vec!["IDE context".cyan()]));
let mut line: Option<Line<'static>> = None;

for indicator in [primary_indicator, ide_context_indicator]
.into_iter()
.flatten()
{
if let Some(line) = line.as_mut() {
line.push_span(" · ".dim());
for span in indicator.spans {
line.push_span(span);
}
} else {
line = Some(indicator);
}
}

line
}

pub(crate) fn side_conversation_context_line(label: &str) -> Line<'static> {
if let Some(rest) = label.strip_prefix("Side ") {
Line::from(vec!["Side".magenta().bold(), format!(" {rest}").magenta()])
Expand Down Expand Up @@ -1261,6 +1289,7 @@ mod tests {
height: u16,
props: &FooterProps,
collaboration_mode_indicator: Option<CollaborationModeIndicator>,
ide_context_active: bool,
context_line: Line<'static>,
) {
terminal
Expand Down Expand Up @@ -1321,9 +1350,16 @@ mod tests {
)
};
let right_line = if status_line_active {
let full = mode_indicator_line(collaboration_mode_indicator, show_cycle_hint);
let compact = mode_indicator_line(
let full = status_line_right_indicator_line(
collaboration_mode_indicator,
/*goal_status_indicator*/ None,
ide_context_active,
show_cycle_hint,
);
let compact = status_line_right_indicator_line(
collaboration_mode_indicator,
/*goal_status_indicator*/ None,
ide_context_active,
/*show_cycle_hint*/ false,
);
let full_width = full.as_ref().map(|line| line.width() as u16).unwrap_or(0);
Expand Down Expand Up @@ -1448,6 +1484,7 @@ mod tests {
height,
props,
collaboration_mode_indicator,
/*ide_context_active*/ false,
context_line,
);
assert_snapshot!(name, terminal.backend());
Expand All @@ -1466,11 +1503,32 @@ mod tests {
height,
props,
collaboration_mode_indicator,
/*ide_context_active*/ false,
context_line,
);
terminal.backend().vt100().screen().contents()
}

fn snapshot_footer_with_indicators(
name: &str,
width: u16,
props: &FooterProps,
collaboration_mode_indicator: Option<CollaborationModeIndicator>,
ide_context_active: bool,
) {
let height = footer_height(props).max(1);
let mut terminal = Terminal::new(TestBackend::new(width, height)).unwrap();
draw_footer_frame(
&mut terminal,
height,
props,
collaboration_mode_indicator,
ide_context_active,
context_window_line(/*percent*/ None, /*used_tokens*/ None),
);
assert_snapshot!(name, terminal.backend());
}

#[test]
fn footer_snapshots() {
snapshot_footer(
Expand Down Expand Up @@ -1769,6 +1827,14 @@ mod tests {
context_window_line(Some(50), /*used_tokens*/ None),
);

snapshot_footer_with_indicators(
"footer_status_line_enabled_mode_and_ide_context_right",
/*width*/ 120,
&props,
Some(CollaborationModeIndicator::Plan),
/*ide_context_active*/ true,
);

let props = FooterProps {
mode: FooterMode::ComposerEmpty,
esc_backtrack_hint: false,
Expand Down
5 changes: 5 additions & 0 deletions codex-rs/tui/src/bottom_pane/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,11 @@ impl BottomPane {
self.request_redraw();
}

pub fn set_ide_context_active(&mut self, active: bool) {
self.composer.set_ide_context_active(active);
self.request_redraw();
}

pub fn set_personality_command_enabled(&mut self, enabled: bool) {
self.composer.set_personality_command_enabled(enabled);
self.request_redraw();
Expand Down
1 change: 1 addition & 0 deletions codex-rs/tui/src/bottom_pane/slash_commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ mod tests {
assert_eq!(
commands,
vec![
SlashCommand::Ide,
SlashCommand::Copy,
SlashCommand::Diff,
SlashCommand::Mention,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
source: tui/src/bottom_pane/footer.rs
expression: terminal.backend()
---
" Plan mode (shift+tab to cycle) · IDE context "
Loading
Loading