mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Refine hook activity rendering in the TUI (#42118)
## What changed - Show revealed running hooks in the bottom activity area instead of the conversation viewport or transcript overlay. Fold the hook message into the active status row when space permits and reflow it below the row without displacing background-process controls or status details. - Keep fast hooks hidden, collapse concurrent hooks to a shared summary when needed, and support hook activity outside an active agent turn. - Simplify durable hook output into user-facing messages and actionable failure, block, and stop states. Suppress model-facing context and quiet successful completions from all TUI history surfaces. ## Testing - Add lifecycle, layout, narrow-width, multi-width Unicode, transcript, restart, and completion-output coverage for hook status and history rendering. GitOrigin-RevId: 4c52b7a736e9e466e109107eb3c04a39d089597f
This commit is contained in:
1 parent
ea7e0714da
commit
bc39b0ed59
35 files changed
+903
-945
No files matched your search
@@ -1902,7 +1902,7 @@ impl ChatWidget {
|
||||
/// Returns a cache key describing the current in-flight cells for the transcript overlay.
|
||||
///
|
||||
/// `Ctrl+T` renders committed transcript cells plus a render-only live tail derived from the
|
||||
/// current active, hook, and asynchronous usage cells, and the overlay caches that tail; this
|
||||
/// current active and asynchronous usage cells, and the overlay caches that tail; this
|
||||
/// key is what it uses to decide whether it must recompute. When there are no live cells, this
|
||||
/// returns `None` so the overlay can drop the tail entirely.
|
||||
///
|
||||
@@ -1911,14 +1911,9 @@ impl ChatWidget {
|
||||
/// the main viewport updates.
|
||||
pub(crate) fn active_cell_transcript_key(&self) -> Option<ActiveCellTranscriptKey> {
|
||||
let cell = self.transcript.active_cell.as_ref();
|
||||
let hook_cell = self.active_hook_cell.as_ref();
|
||||
let token_activity_cell = self.pending_token_activity_output();
|
||||
let rate_limit_reset_hint = self.pending_rate_limit_reset_hint();
|
||||
if cell.is_none()
|
||||
&& hook_cell.is_none()
|
||||
&& token_activity_cell.is_none()
|
||||
&& rate_limit_reset_hint.is_none()
|
||||
{
|
||||
if cell.is_none() && token_activity_cell.is_none() && rate_limit_reset_hint.is_none() {
|
||||
return None;
|
||||
}
|
||||
Some(ActiveCellTranscriptKey {
|
||||
@@ -1926,11 +1921,7 @@ impl ChatWidget {
|
||||
is_stream_continuation: cell
|
||||
.map(|cell| cell.is_stream_continuation())
|
||||
.unwrap_or(false),
|
||||
animation_tick: cell
|
||||
.and_then(|cell| cell.transcript_animation_tick())
|
||||
.or_else(|| {
|
||||
hook_cell.and_then(super::history_cell::HistoryCell::transcript_animation_tick)
|
||||
}),
|
||||
animation_tick: cell.and_then(|cell| cell.transcript_animation_tick()),
|
||||
})
|
||||
}
|
||||
|
||||
@@ -1948,14 +1939,6 @@ impl ChatWidget {
|
||||
if let Some(cell) = self.transcript.active_cell.as_ref() {
|
||||
lines.extend(cell.transcript_hyperlink_lines(width));
|
||||
}
|
||||
if let Some(hook_cell) = self.active_hook_cell.as_ref() {
|
||||
// Compute hook lines first so hidden hooks do not add a separator.
|
||||
let hook_lines = hook_cell.transcript_hyperlink_lines(width);
|
||||
if !hook_lines.is_empty() && !lines.is_empty() {
|
||||
lines.push(HyperlinkLine::from(""));
|
||||
}
|
||||
lines.extend(hook_lines);
|
||||
}
|
||||
if let Some(token_activity_cell) = self.pending_token_activity_output() {
|
||||
let token_activity_lines = token_activity_cell.transcript_hyperlink_lines(width);
|
||||
if !token_activity_lines.is_empty() && !lines.is_empty() {
|
||||
|
||||
Reference in new issue
Block a user