feat(ai): enhance AI trace warnings with product context
- Added `productName` field to `AdminAiWarning` to include product context in warnings - Updated `collectWarnings` to extract and include `rawName` as `productName` in AI trace warnings - Added `signals` field to `FlyerParseItem` type for detailed product signals - Enhanced Flutter admin panel to display product names in AI trace warnings - Added new `AdminAiTraceResponse` DTO for AI trace data structure
This commit is contained in:
@@ -139,7 +139,8 @@ class _AdminAiPanelState extends ConsumerState<AdminAiPanel> {
|
||||
|
||||
String _formatWarningLine(AdminAiWarning warning) {
|
||||
final rowSuffix = warning.itemIndex == null ? '' : ' (rad ${warning.itemIndex})';
|
||||
return '[${warning.severity}] ${warning.title}$rowSuffix: ${warning.message}';
|
||||
final productSuffix = warning.productName != null ? ' (${warning.productName})' : '';
|
||||
return '[${warning.severity}] ${warning.title}$rowSuffix$productSuffix: ${warning.message}';
|
||||
}
|
||||
|
||||
String _buildErrorReport({
|
||||
@@ -685,11 +686,16 @@ class _WarningsCard extends StatelessWidget {
|
||||
warning.location!,
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
if (warning.itemIndex != null)
|
||||
Text(
|
||||
'Rad: ${warning.itemIndex}',
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
if (warning.itemIndex != null)
|
||||
Text(
|
||||
'Rad: ${warning.itemIndex}',
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
if (warning.productName != null)
|
||||
Text(
|
||||
'Produkt: ${warning.productName}',
|
||||
style: theme.textTheme.bodySmall,
|
||||
),
|
||||
],
|
||||
),
|
||||
trailing: IconButton(
|
||||
|
||||
Reference in New Issue
Block a user