⌘S discard dialog

This commit is contained in:
Ian Gulliver
2026-10-20 11:25:34 -07:00
parent f5002c1688
commit 14aa3f2d98
2 changed files with 10 additions and 5 deletions
+9 -4
View File
@@ -24,10 +24,15 @@ func runGo(_ key: String, _ store: Store, _ overlays: Overlays) {
overlays.leftTab = .lead
overlays.leadFocus += 1
case "s":
if let taskId = store.selectedTaskId {
Task {
await confirmMerge(taskId, store, overlays)
guard let taskId = store.selectedTaskId else {
break
}
Task {
if let task = store.findTask(taskId), task.state == .discardSuggested {
await confirmDiscard(task, store, overlays, anchor: nil)
return
}
await confirmMerge(taskId, store, overlays)
}
case "/":
overlays.showAlert(ShortcutsHelp())
@@ -64,7 +69,7 @@ private let shortcuts: [(String, [(String, String)])] = [
("⌘N", "New task in the current project"),
("⌘P", "Open the Project tab"),
("⌘L", "Open the Lead tab and its composer"),
("⌘S", "Merge the right pane's task"),
("⌘S", "Merge the right pane's task, or discard it when the agent suggests discarding"),
("⌘[ ⌘]", "Bring the previous or next server's window forward"),
("⌘/", "Show these shortcuts"),
("Esc", "Close the switcher or a dialog"),