AgentToolCall constructor
const
AgentToolCall({
- Key? key,
- required AgentToolCallPart call,
- ValueChanged<
AgentApprovalDecision> ? onDecision, - bool offerAlwaysAllow = true,
- Widget? icon,
- String? approvalTitle,
- AgentDisclosurePolicy policy = const AgentDisclosurePolicy(),
- bool? expanded,
- bool? defaultExpanded,
- ValueChanged<
bool> ? onExpandedChanged, - String statusLabelBuilder(
- AgentToolCallStatus status
- String decisionLabelBuilder(
- AgentApprovalDecision decision
- String allowOnceLabel = 'Allow once',
- String alwaysAllowLabel = 'Always allow',
- String denyLabel = 'Deny',
- String outputLabel = 'Tool output',
- String showAllLabel = 'Show all',
- String showLessLabel = 'Show less',
- String semanticLabel = 'Tool call',
- AgentGlyphBuilder? glyphBuilder,
- DisclosureStyler disclosureStyle = const DisclosureStyler.create(),
- DataListStyler inputStyle = const DataListStyler.create(),
- ButtonStyler allowOnceStyle = const ButtonStyler.create(),
- ButtonStyler alwaysAllowStyle = const ButtonStyler.create(),
- ButtonStyler denyStyle = const ButtonStyler.create(),
- AgentToolCallStyler style = const AgentToolCallStyler.create(),
- AgentToolCallSpec? styleSpec,
Creates the row, or the approval card, of call.
Implementation
const AgentToolCall({
super.key,
required this.call,
this.onDecision,
this.offerAlwaysAllow = true,
this.icon,
this.approvalTitle,
this.policy = const AgentDisclosurePolicy(),
this.expanded,
this.defaultExpanded,
this.onExpandedChanged,
this.statusLabelBuilder,
this.decisionLabelBuilder,
this.allowOnceLabel = 'Allow once',
this.alwaysAllowLabel = 'Always allow',
this.denyLabel = 'Deny',
this.outputLabel = 'Tool output',
this.showAllLabel = 'Show all',
this.showLessLabel = 'Show less',
this.semanticLabel = 'Tool call',
this.glyphBuilder,
this.disclosureStyle = const DisclosureStyler.create(),
this.inputStyle = const DataListStyler.create(),
this.allowOnceStyle = const ButtonStyler.create(),
this.alwaysAllowStyle = const ButtonStyler.create(),
this.denyStyle = const ButtonStyler.create(),
this.style = const AgentToolCallStyler.create(),
this.styleSpec,
});