9551eceaed
Remove obsolete control-family flags and icon metadata across all callers, dead alternate themes and host helpers, obsolete test setup, and the unused icon-font dependency. Preserve native Material Back transitions. Make navigation fixtures independent of update plugins and answer auxiliary shell snapshots so the complete application suite can run deterministically.
62 lines
1.7 KiB
Dart
62 lines
1.7 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../conversation/chat_card_styles.dart';
|
|
import 'chat_shell_run.dart';
|
|
import 'chat_shell_runs_controller.dart';
|
|
import 'chat_shell_terminal_keys.dart';
|
|
import 'chat_shell_terminal_view.dart';
|
|
|
|
/// The output area of one command card: the run's terminal emulator, which
|
|
/// takes typing while the command runs (with the key toolbar below it), or
|
|
/// its retained output read-only once it ended.
|
|
class ChatShellOutputView extends StatelessWidget {
|
|
const ChatShellOutputView({
|
|
super.key,
|
|
required this.run,
|
|
required this.controller,
|
|
required this.viewKey,
|
|
required this.fullScreen,
|
|
});
|
|
|
|
final ChatShellRun run;
|
|
final ChatShellRunsController controller;
|
|
|
|
/// Replaced when the full-screen view closes, so the card's view sizes the
|
|
/// terminal to itself again.
|
|
final Key viewKey;
|
|
|
|
/// True while the full-screen view sizes the terminal.
|
|
final bool fullScreen;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
if (!run.running && run.output.isEmpty) {
|
|
return Text(
|
|
'No output.',
|
|
key: const Key('chat-shell-output-empty'),
|
|
style: chatCardSecondaryStyle(context),
|
|
);
|
|
}
|
|
final session = controller.terminals.session(run);
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
ChatShellTerminalView(
|
|
key: viewKey,
|
|
session: session,
|
|
autoResize: !fullScreen,
|
|
),
|
|
if (session.live && !fullScreen)
|
|
Padding(
|
|
padding: const EdgeInsets.only(top: 8),
|
|
child: ChatShellTerminalKeys(
|
|
session: session,
|
|
field: chatShellTouchFirst(),
|
|
),
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|