AgentToolCall constructor

const AgentToolCall({
  1. Key? key,
  2. required AgentToolCallPart call,
  3. ValueChanged<AgentApprovalDecision>? onDecision,
  4. bool offerAlwaysAllow = true,
  5. Widget? icon,
  6. String? approvalTitle,
  7. AgentDisclosurePolicy policy = const AgentDisclosurePolicy(),
  8. bool? expanded,
  9. bool? defaultExpanded,
  10. ValueChanged<bool>? onExpandedChanged,
  11. String statusLabelBuilder(
    1. AgentToolCallStatus status
    )?,
  12. String decisionLabelBuilder(
    1. AgentApprovalDecision decision
    )?,
  13. String allowOnceLabel = 'Allow once',
  14. String alwaysAllowLabel = 'Always allow',
  15. String denyLabel = 'Deny',
  16. String outputLabel = 'Tool output',
  17. String showAllLabel = 'Show all',
  18. String showLessLabel = 'Show less',
  19. String semanticLabel = 'Tool call',
  20. AgentGlyphBuilder? glyphBuilder,
  21. DisclosureStyler disclosureStyle = const DisclosureStyler.create(),
  22. DataListStyler inputStyle = const DataListStyler.create(),
  23. ButtonStyler allowOnceStyle = const ButtonStyler.create(),
  24. ButtonStyler alwaysAllowStyle = const ButtonStyler.create(),
  25. ButtonStyler denyStyle = const ButtonStyler.create(),
  26. AgentToolCallStyler style = const AgentToolCallStyler.create(),
  27. 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,
});