Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions lib/features/settings/preferences_mcp_section.dart
Original file line number Diff line number Diff line change
Expand Up @@ -349,6 +349,11 @@ class _ActivityRow extends material.StatelessWidget {
style: material.TextStyle(
color: entry.error != null ? wb.destructive : wb.mutedForeground),
).xSmall(),
// The guard rule that refused the call, when one did.
if (entry.refusalRule != null)
Text('refused by ${entry.refusalRule}')
.xSmall()
.muted(),
],
),
);
Expand Down
2 changes: 2 additions & 0 deletions test/features/settings/preferences_mcp_section_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ void main() {
sqlText: 'DELETE FROM orders',
durationMs: 1,
error: 'Data-modifying statements are not allowed over MCP.',
refusalRule: 'data_modifying',
),
];
await pump(tester);
Expand All @@ -192,6 +193,7 @@ void main() {
expect(find.text('1 row(s) · 12 ms'), findsOneWidget);
expect(find.text('Data-modifying statements are not allowed over MCP.'),
findsOneWidget);
expect(find.text('refused by data_modifying'), findsOneWidget);

await tester.tap(find.byKey(const material.ValueKey('mcp_clear_log')));
await tester.pump();
Expand Down
Loading