A desktop app that parses Claude Code .jsonl session logs and provides a rich UI for exploring conversations, tool usage, subagents, and token consumption. Features include project browser with auto-discovery of ~/.claude/projects, conversation timeline with inline subagent expansion, agents overview, toolbelt chart, and token usage dashboard. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
65 lines
2.0 KiB
Dart
65 lines
2.0 KiB
Dart
import 'package:flutter/material.dart';
|
|
import '../../../models/log_entry.dart';
|
|
import '../../../theme/app_theme.dart';
|
|
import '../../../widgets/common/expandable_card.dart';
|
|
import '../../../widgets/common/json_tree_view.dart';
|
|
|
|
class SystemMessageCard extends StatelessWidget {
|
|
final SystemEntry entry;
|
|
|
|
const SystemMessageCard({super.key, required this.entry});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
decoration: BoxDecoration(
|
|
color: AppColors.systemBg,
|
|
borderRadius: BorderRadius.circular(8),
|
|
border: Border.all(color: AppColors.system.withAlpha(30)),
|
|
),
|
|
padding: const EdgeInsets.all(12),
|
|
child: Column(
|
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
const Icon(Icons.info_outline,
|
|
size: 14, color: AppColors.system),
|
|
const SizedBox(width: 6),
|
|
Text(
|
|
entry.subtype ?? 'System',
|
|
style: const TextStyle(
|
|
fontSize: 12,
|
|
fontWeight: FontWeight.w500,
|
|
color: AppColors.system,
|
|
),
|
|
),
|
|
if (entry.durationMs != null) ...[
|
|
const Spacer(),
|
|
Text(
|
|
'${(entry.durationMs! / 1000).toStringAsFixed(1)}s',
|
|
style: const TextStyle(
|
|
fontSize: 11,
|
|
color: AppColors.textMuted,
|
|
fontFamily: 'JetBrains Mono',
|
|
),
|
|
),
|
|
],
|
|
],
|
|
),
|
|
const SizedBox(height: 6),
|
|
ExpandableCard(
|
|
backgroundColor: AppColors.surface,
|
|
borderColor: AppColors.surfaceBorder,
|
|
header: const Text(
|
|
'Raw',
|
|
style: TextStyle(fontSize: 11, color: AppColors.textMuted),
|
|
),
|
|
child: JsonTreeView(data: entry.raw),
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|