Dismiss finished shell command cards with Undo
Finished command cards get a Dismiss button and the chat's More menu a Dismiss all finished commands entry. Dismissal applies to every client of the chat; a SnackBar (Material) or transient notice (Cupertino) offers Undo for 5 s. Running commands cannot be dismissed until they end.
This commit is contained in:
@@ -54,6 +54,14 @@ class ChatShellTerminals {
|
||||
void appended(ChatShellRun run, String text, int offset, int end) =>
|
||||
_sessions[run.id]?.append(run, text, offset, end);
|
||||
|
||||
/// [runId]'s card was dismissed: drop its emulator.
|
||||
void removed(String runId) {
|
||||
_resizes.remove(runId)?.cancel();
|
||||
_inputs.remove(runId);
|
||||
_sentSizes.remove(runId);
|
||||
_sessions.remove(runId);
|
||||
}
|
||||
|
||||
/// [run] ended: draw its final output read-only.
|
||||
void finished(ChatShellRun run) {
|
||||
_resizes.remove(run.id)?.cancel();
|
||||
|
||||
Reference in New Issue
Block a user