PromptInput constructor

const PromptInput({
  1. Key? key,
  2. String agentName = 'Codex',
  3. bool enabled = true,
  4. required bool isSending,
  5. bool promptAppearsStalled = false,
  6. required PromptSendCallback onSend,
  7. required VoidCallback onStop,
  8. bool showAttachmentControl = true,
  9. bool showExecutionPolicy = true,
  10. bool canQueueWhileSending = true,
  11. List<Map<String, Object?>> availableCommands = const <Map<String, Object?>>[],
  12. int availableCommandsRevision = 0,
  13. ChatPromptCapabilities? promptCapabilities,
  14. ChatPermissionRequest? pendingPermissionRequest,
  15. VoidCallback? onAllowPermission,
  16. VoidCallback? onDenyPermission,
  17. VoidCallback? onCancelPermission,
  18. ValueChanged<String>? onSelectPermissionOption,
  19. ChatToolCallExecutionPolicy toolCallExecutionPolicy = ChatToolCallExecutionPolicy.defaultPermissions,
  20. bool hasPermissionReviewer = false,
  21. ValueChanged<ChatToolCallExecutionPolicy>? onToolCallExecutionPolicyChanged,
  22. ChatConfigOption? modelOption,
  23. ChatConfigOption? reasoningEffortOption,
  24. ValueChanged<String>? onModelSelected,
  25. ValueChanged<String>? onReasoningEffortSelected,
  26. List<ChatConfigOption> configOptions = const <ChatConfigOption>[],
  27. SessionConfigSelectionCallback? onConfigOptionSelected,
  28. PromptAttachmentPicker? pickAttachments,
  29. PromptAttachmentKindPicker? pickAttachmentsForKind,
  30. PromptAttachmentController? attachmentController,
  31. PromptImageClipboardReader readClipboardImage = emptyClipboardImage,
  32. PromptDroppedImageReader readDroppedImage = readDroppedImageAttachment,
  33. List<String> workspaceRoots = const <String>[],
  34. String? imageAttachmentLimitation,
  35. List<String> promptHistory = const <String>[],
  36. List<ChatQueuedPrompt> queuedPrompts = const <ChatQueuedPrompt>[],
  37. ValueChanged<int>? onGuideQueuedPrompt,
  38. ValueChanged<int>? onRemoveQueuedPrompt,
  39. VoidCallback? onClearQueuedPrompts,
  40. void onReorderQueuedPrompt(
    1. int oldIndex,
    2. int newIndex
    )?,
  41. ChatInputBudget inputBudget = const ChatInputBudget(),
})

Implementation

const PromptInput({
  super.key,
  this.agentName = 'Codex',
  this.enabled = true,
  required this.isSending,
  this.promptAppearsStalled = false,
  required this.onSend,
  required this.onStop,
  this.showAttachmentControl = true,
  this.showExecutionPolicy = true,
  this.canQueueWhileSending = true,
  this.availableCommands = const <Map<String, Object?>>[],
  this.availableCommandsRevision = 0,
  this.promptCapabilities,
  this.pendingPermissionRequest,
  this.onAllowPermission,
  this.onDenyPermission,
  this.onCancelPermission,
  this.onSelectPermissionOption,
  this.toolCallExecutionPolicy =
      ChatToolCallExecutionPolicy.defaultPermissions,
  this.hasPermissionReviewer = false,
  this.onToolCallExecutionPolicyChanged,
  this.modelOption,
  this.reasoningEffortOption,
  this.onModelSelected,
  this.onReasoningEffortSelected,
  this.configOptions = const <ChatConfigOption>[],
  this.onConfigOptionSelected,
  this.pickAttachments,
  this.pickAttachmentsForKind,
  this.attachmentController,
  this.readClipboardImage = emptyClipboardImage,
  this.readDroppedImage = readDroppedImageAttachment,
  this.workspaceRoots = const <String>[],
  this.imageAttachmentLimitation,
  this.promptHistory = const <String>[],
  this.queuedPrompts = const <ChatQueuedPrompt>[],
  this.onGuideQueuedPrompt,
  this.onRemoveQueuedPrompt,
  this.onClearQueuedPrompts,
  this.onReorderQueuedPrompt,
  this.inputBudget = const ChatInputBudget(),
});