mirror of
https://github.com/openai/codex.git
synced 2026-11-27 23:31:09 +00:00
Add archive and delete actions to the agents overview (#44433)
## What changed - Add `Ctrl+E` to archive the selected task and its child agents, and `Delete` to permanently delete their history. Both actions require confirmation, with Cancel selected by default. - Expose `agents.archive` and `agents.delete` in keymap configuration and the shortcut picker. Default bindings yield to existing custom bindings and chords. - Show progress while requests run, keeping rendering responsive and blocking task switching. Refresh overview state afterward and keep the dashboard open when the current task is removed. - Report failures and preserve the current attachment and draft when a rejected operation leaves the task loaded. ## Testing Add coverage for confirmation and cancellation, active and background task removal, child-agent attachments, stale refresh invalidation, failure recovery, and draft preservation. Add progress input-isolation tests, shortcut conflict tests, and snapshots for confirmation, errors, progress, and keymap rendering. GitOrigin-RevId: b327bb8834699d0058f9ffb903ace525ae270500
This commit is contained in:
1 parent
bf5ebd98c5
commit
b348fc2667
32 files changed
+1095
-46
No files matched your search
@@ -25,6 +25,8 @@ impl AgentsOverviewView {
|
||||
&self.agents_keymap.new_task,
|
||||
&self.agents_keymap.rename,
|
||||
&self.agents_keymap.stop,
|
||||
&self.agents_keymap.archive,
|
||||
&self.agents_keymap.delete,
|
||||
&self.agents_keymap.hide,
|
||||
&self.agents_keymap.toggle_grouping,
|
||||
]
|
||||
@@ -56,7 +58,11 @@ impl AgentsOverviewView {
|
||||
let key = hint.display_label().replace(" + ", "+");
|
||||
hints.push(
|
||||
vec![
|
||||
if enabled { key.bold() } else { key.dim() },
|
||||
if enabled {
|
||||
key.bold()
|
||||
} else {
|
||||
key.bold().dim()
|
||||
},
|
||||
format!(" {label}").dim(),
|
||||
]
|
||||
.into(),
|
||||
@@ -105,12 +111,17 @@ impl AgentsOverviewView {
|
||||
self.selected_row()
|
||||
.is_some_and(|row| matches!(row.thread.status, ThreadStatus::Active { .. })),
|
||||
);
|
||||
add_hint(
|
||||
self.agents_keymap
|
||||
.primary_hint("hide", &self.agents_keymap.hide),
|
||||
"hide",
|
||||
self.selected_row().is_some(),
|
||||
);
|
||||
for (action, bindings) in [
|
||||
("hide", &self.agents_keymap.hide),
|
||||
("archive", &self.agents_keymap.archive),
|
||||
("delete", &self.agents_keymap.delete),
|
||||
] {
|
||||
add_hint(
|
||||
self.agents_keymap.primary_hint(action, bindings),
|
||||
action,
|
||||
self.selected_row().is_some(),
|
||||
);
|
||||
}
|
||||
add_hint(list_hint(ListAction::Cancel), "back", true);
|
||||
let separator = if hints.iter().map(Line::width).sum::<usize>()
|
||||
+ hints.len().saturating_sub(1) * 2
|
||||
|
||||
Reference in new issue
Block a user