largeAgentDescriptionsNotice top-level property
Large cumulative agent descriptions.
Implementation
final StatusNoticeDefinition
largeAgentDescriptionsNotice = StatusNoticeDefinition(
id: 'large-agent-descriptions',
type: StatusNoticeType.warning,
isActive: (ctx) =>
(ctx.agentDescriptionTokens ?? 0) > agentDescriptionsThreshold,
render: (ctx, context) {
final theme = Theme.of(context);
final tokens = ctx.agentDescriptionTokens ?? 0;
return Row(
children: [
Icon(Icons.warning_amber, size: 16, color: theme.colorScheme.error),
const SizedBox(width: 6),
Expanded(
child: Text.rich(
TextSpan(
children: [
TextSpan(
text:
'Large cumulative agent descriptions will impact performance '
'(~${_formatNumber(tokens)} tokens > '
'${_formatNumber(agentDescriptionsThreshold)})',
),
TextSpan(
text: ' \u00B7 /agents to manage',
style: TextStyle(
color: theme.colorScheme.onSurfaceVariant.withValues(
alpha: 0.6,
),
),
),
],
),
style: TextStyle(fontSize: 12, color: theme.colorScheme.error),
),
),
],
);
},
);