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:
@@ -8,3 +8,14 @@ const double kChatReadingWidth = 760;
|
||||
/// The space on each side of the centred reading column in [width].
|
||||
double chatReadingInset(double width) =>
|
||||
math.max(0, (width - kChatReadingWidth) / 2);
|
||||
|
||||
/// The strip left of the reading column that holds an answer's Copy button,
|
||||
/// outside the answer itself.
|
||||
const double kChatCopyGutterWidth = 48;
|
||||
|
||||
/// The copy gutter a transcript [width] wide gives each answer:
|
||||
/// [kChatCopyGutterWidth] when the margin left of the centred reading column
|
||||
/// fits it, else 0, and Copy stays in the answer's footer (phones, narrow
|
||||
/// panes).
|
||||
double chatCopyGutter(double width) =>
|
||||
chatReadingInset(width) >= kChatCopyGutterWidth ? kChatCopyGutterWidth : 0;
|
||||
|
||||
Reference in New Issue
Block a user