mirror of
https://github.com/openai/codex.git
synced 2026-11-13 21:30:47 +00:00
Extend output-free transcript summaries to more tools (#60555)
## What changed - Add summary labels for MCP and dynamic tools, computer activity, terminal interactions, file edits, images, plan updates, agent calls, and historical tool fallbacks. - Keep tool output out of summaries and give summaries disclosure identities even when their cells have no activity IDs. - Bring focused disclosure headers into view and show `expand` or `collapse` in the footer, including for search-expanded entries. ## Testing Add assertions for tool labels, a transcript snapshot verifying that image-generation output stays hidden, and coverage for expanded and collapsed footer hints. GitOrigin-RevId: 076b8d74c17f26b10aa8221c65b8b38dbb5ad5ea
This commit is contained in:
@@ -27,7 +27,9 @@ use ratatui::text::Line;
|
||||
/// Preserve status and output when replay cannot reconstruct a rich completed tool cell.
|
||||
/// Declined commands never ran, and historical terminal interactions do not carry stdin details.
|
||||
/// Pending items retain their last known state without starting a running clock.
|
||||
pub(crate) fn historical_tool_fallback(item: &ThreadItemPayload) -> Option<PlainHistoryCell> {
|
||||
pub(crate) fn historical_tool_fallback(
|
||||
item: &ThreadItemPayload,
|
||||
) -> Option<crate::history_cell::LabeledToolCell> {
|
||||
let lines = match item {
|
||||
ThreadItemPayload::CommandExecution {
|
||||
command,
|
||||
@@ -108,7 +110,16 @@ pub(crate) fn historical_tool_fallback(item: &ThreadItemPayload) -> Option<Plain
|
||||
}
|
||||
_ => return None,
|
||||
};
|
||||
Some(PlainHistoryCell::new(lines))
|
||||
let cell = PlainHistoryCell::new(lines);
|
||||
Some(match item {
|
||||
ThreadItemPayload::CommandExecution {
|
||||
status: CommandExecutionStatus::Declined,
|
||||
command,
|
||||
..
|
||||
} => cell.with_tool_label(format!("Declined · {command}")),
|
||||
ThreadItemPayload::CommandExecution { .. } => cell.with_tool_header(/*count*/ 2),
|
||||
_ => cell.with_tool_header(/*count*/ 1),
|
||||
})
|
||||
}
|
||||
|
||||
// The protocol joins argv with shlex. Keep noncanonical legacy commands verbatim.
|
||||
|
||||
@@ -229,6 +229,9 @@ fn historical_command_fallbacks_preserve_status_output_and_group_boundaries() {
|
||||
/*config*/ None,
|
||||
);
|
||||
assert_eq!(cells.len(), 3);
|
||||
if label == "declined" {
|
||||
assert_eq!(cells[1].tool_call_labels(), ["Declined · cargo check"]);
|
||||
}
|
||||
for cell in [&cells[0], &cells[2]] {
|
||||
assert!(
|
||||
cell.as_any()
|
||||
|
||||
Reference in New Issue
Block a user