b6aa820378
Keep the Material-only chat conversation implementation while preserving public Cupertino parameters for downstream compatibility. Narrow the matching tests to the Material path.
66 lines
1.9 KiB
Dart
66 lines
1.9 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../../core/api_gateway.dart';
|
|
import '../domain/chat_shells.dart';
|
|
import '../domain/chat_task_metadata.dart';
|
|
import 'chat_background_task_output.dart';
|
|
import 'chat_task_metadata_view.dart';
|
|
import 'chat_task_presentation.dart';
|
|
export 'chat_background_task_output.dart' show ChatBackgroundTaskButton;
|
|
|
|
/// Expanded facts add information instead of repeating the card's title/status.
|
|
class ChatBackgroundTaskDetail extends StatelessWidget {
|
|
const ChatBackgroundTaskDetail({
|
|
super.key,
|
|
required this.shell,
|
|
required this.now,
|
|
required this.output,
|
|
required this.heightBudget,
|
|
required this.onRefresh,
|
|
});
|
|
final JsonMap shell;
|
|
final DateTime now;
|
|
final ChatShellOutputSnapshot? output;
|
|
final double heightBudget;
|
|
final VoidCallback onRefresh;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final command = taskText(shell, 'command');
|
|
return Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
mainAxisSize: MainAxisSize.min,
|
|
children: [
|
|
Wrap(
|
|
spacing: 24,
|
|
runSpacing: 16,
|
|
children: [
|
|
ChatTaskFact(
|
|
icon: Icons.tag,
|
|
label: shellOutputTaskIdentityLabel,
|
|
value: shellIdOf(shell),
|
|
monospace: true,
|
|
),
|
|
if (command != null &&
|
|
!sameTaskText(command, taskDisplayTitle(shell)))
|
|
ChatTaskFact(
|
|
icon: Icons.terminal,
|
|
label: shellOutputCommandLabel,
|
|
value: command,
|
|
monospace: true,
|
|
),
|
|
],
|
|
),
|
|
const SizedBox(height: 16),
|
|
ChatTaskMetadataView(shell: shell, now: now, detail: true),
|
|
const SizedBox(height: 20),
|
|
ChatBackgroundTaskOutput(
|
|
output: output,
|
|
heightBudget: heightBudget,
|
|
onRefresh: onRefresh,
|
|
),
|
|
],
|
|
);
|
|
}
|
|
}
|