Show dismissed commands as an answer footer chip; move Copy to the left gutter

Dismissed shell runs leave the transcript and fold into a "N commands"
chip in the footer of the first answer at or after each run (the last
answer for newer runs, or a row of its own without any answer). The chip
opens the turn sheet (wide) or a full-screen page (narrow) listing the
commands; each opens its output read-only with Copy output, Send to agent
and Restore.

On a wide conversation the answer's Copy button moves out of the footer
into a 48 px gutter left of the reading column (chatCopyGutter), shown on
hover or focus on desktops and always on touch; narrow widths keep it in
the footer.
This commit is contained in:
2026-11-09 23:47:14 +00:00
parent f2520a09b8
commit cf9f71f27c
21 changed files with 1534 additions and 77 deletions
@@ -31,6 +31,8 @@ class ChatShellRun {
this.cols = 0,
this.rows = 0,
this.text = '',
this.dismissedAt = 0,
this.purged = false,
});
final String id;
@@ -68,6 +70,13 @@ class ChatShellRun {
/// removed); only a whole-output readback carries it.
final String text;
/// When the operator dismissed the run (epoch ms; 0 when not dismissed).
final int dismissedAt;
/// True when an older server deleted the dismissed run's command and
/// output: only its status and times are left, and it cannot be restored.
final bool purged;
/// Whether earlier output is not shown here.
bool get truncated => outputStart > 0 || gap;
@@ -111,6 +120,8 @@ class ChatShellRun {
cols: _int(value['cols']),
rows: _int(value['rows']),
text: '${value['text'] ?? ''}',
dismissedAt: _int(value['dismissed_at']),
purged: value['purged'] == true,
);
}
@@ -137,6 +148,8 @@ class ChatShellRun {
cols: next.cols == 0 ? cols : next.cols,
rows: next.rows == 0 ? rows : next.rows,
text: text,
dismissedAt: next.dismissedAt,
purged: next.purged,
);
/// This run with one live output chunk covering bytes [offset, end). A