ae208699d8
Keep the Material-only session UI and narrow its tests to the supported host. Preserve public Cupertino parameters for callers while removing unreachable Cupertino widgets and variants.
34 lines
1.1 KiB
Dart
34 lines
1.1 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../../../../core/api_gateway.dart';
|
|
import 'chat_create_fields.dart';
|
|
|
|
/// Harness identity, independent of favorite/activity state. Native icon sizing
|
|
/// and foreground color keep bundled monochrome marks readable on both hosts.
|
|
class SessionHarnessIcon extends StatelessWidget {
|
|
const SessionHarnessIcon({super.key, required this.session, this.color});
|
|
|
|
final JsonMap session;
|
|
final Color? color;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final value = '${session['backend'] ?? ''}'.trim();
|
|
final backend = value.isEmpty ? 'opencode' : value;
|
|
final Widget mark = switch (backend) {
|
|
'opencode' || 'claude' => ImageIcon(
|
|
AssetImage('assets/harnesses/$backend.png'),
|
|
color: color,
|
|
),
|
|
'codex' => Icon(Icons.code, color: color),
|
|
'pi' => Icon(Icons.functions, color: color),
|
|
_ => Icon(Icons.terminal, color: color),
|
|
};
|
|
return Semantics(
|
|
label: '${chatBackendLabel(backend)} harness',
|
|
image: true,
|
|
child: ExcludeSemantics(child: mark),
|
|
);
|
|
}
|
|
}
|