PromptInput constructor
const
PromptInput({
- Key? key,
- String agentName = 'Codex',
- bool enabled = true,
- required bool isSending,
- bool promptAppearsStalled = false,
- required PromptSendCallback onSend,
- required VoidCallback onStop,
- bool showAttachmentControl = true,
- bool showExecutionPolicy = true,
- bool canQueueWhileSending = true,
- List<
Map< availableCommands = const <Map<String, Object?>>[],String, Object?> > - int availableCommandsRevision = 0,
- ChatPromptCapabilities? promptCapabilities,
- ChatPermissionRequest? pendingPermissionRequest,
- VoidCallback? onAllowPermission,
- VoidCallback? onDenyPermission,
- VoidCallback? onCancelPermission,
- ValueChanged<
String> ? onSelectPermissionOption, - ChatToolCallExecutionPolicy toolCallExecutionPolicy = ChatToolCallExecutionPolicy.defaultPermissions,
- bool hasPermissionReviewer = false,
- ValueChanged<
ChatToolCallExecutionPolicy> ? onToolCallExecutionPolicyChanged, - ChatConfigOption? modelOption,
- ChatConfigOption? reasoningEffortOption,
- ValueChanged<
String> ? onModelSelected, - ValueChanged<
String> ? onReasoningEffortSelected, - List<
ChatConfigOption> configOptions = const <ChatConfigOption>[], - SessionConfigSelectionCallback? onConfigOptionSelected,
- PromptAttachmentPicker? pickAttachments,
- PromptAttachmentKindPicker? pickAttachmentsForKind,
- PromptAttachmentController? attachmentController,
- PromptImageClipboardReader readClipboardImage = emptyClipboardImage,
- PromptDroppedImageReader readDroppedImage = readDroppedImageAttachment,
- List<
String> workspaceRoots = const <String>[], - String? imageAttachmentLimitation,
- List<
String> promptHistory = const <String>[], - List<
ChatQueuedPrompt> queuedPrompts = const <ChatQueuedPrompt>[], - ValueChanged<
int> ? onGuideQueuedPrompt, - ValueChanged<
int> ? onRemoveQueuedPrompt, - VoidCallback? onClearQueuedPrompts,
- void onReorderQueuedPrompt()?,
- 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(),
});