CallbackSubmissionChatSession class
Callback adapter with an explicit admission callback. The legacy adapter continues to use onSend, with its existing completion timing.
- Inheritance
-
- Object
- ChatSession
- CallbackChatSession
- CallbackSubmissionChatSession
- Implemented types
Constructors
-
CallbackSubmissionChatSession({required Listenable changes, required ChatSessionState readState(), required Future<
void> onSend(String text, List<PromptAttachment> attachments), required Future<void> onStop(), required Future<ChatSubmitResult> onSubmit(ChatSubmission), Future<void> onResolvePermission(ChatPermissionDecision)?, Future<void> onSelectPermissionOption(String)?, Future<void> onSetConfigOption(String, Object)?, ValueChanged<ChatToolCallExecutionPolicy> ? onSetExecutionPolicy, ValueChanged<int> ? onGuideQueuedPrompt, ValueChanged<int> ? onRemoveQueuedPrompt, VoidCallback? onClearQueuedPrompts, void onReorderQueuedPrompt(int, int)?})
Properties
- changes → Listenable
-
finalinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- onClearQueuedPrompts → VoidCallback?
-
finalinherited
-
onGuideQueuedPrompt
→ ValueChanged<
int> ? -
finalinherited
-
onRemoveQueuedPrompt
→ ValueChanged<
int> ? -
finalinherited
- onReorderQueuedPrompt → void Function(int, int)?
-
finalinherited
-
onResolvePermission
→ Future<
void> Function(ChatPermissionDecision)? -
finalinherited
-
onSelectPermissionOption
→ Future<
void> Function(String)? -
finalinherited
-
onSend
→ Future<
void> Function(String text, List<PromptAttachment> attachments) -
finalinherited
-
onSetConfigOption
→ Future<
void> Function(String, Object)? -
finalinherited
-
onSetExecutionPolicy
→ ValueChanged<
ChatToolCallExecutionPolicy> ? -
finalinherited
-
onStop
→ Future<
void> Function() -
finalinherited
-
onSubmit
→ Future<
ChatSubmitResult> Function(ChatSubmission) -
final
- readState → ChatSessionState Function()
-
finalinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state → ChatSessionState
-
no setterinherited
Methods
-
addListener(
VoidCallback listener) → void -
Register a closure to be called when the object notifies its listeners.
inherited
-
clearQueuedPrompts(
) → void -
inherited
-
guideQueuedPrompt(
int id) → void -
inherited
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
removeListener(
VoidCallback listener) → void -
Remove a previously registered closure from the list of closures that the
object notifies.
inherited
-
removeQueuedPrompt(
int id) → void -
inherited
-
reorderQueuedPrompt(
int oldIndex, int newIndex) → void -
inherited
-
resolvePermission(
ChatPermissionDecision decision) → Future< void> -
inherited
-
selectPermissionOption(
String optionId) → Future< void> -
inherited
-
send(
String text, {List< PromptAttachment> attachments = const []}) → Future<void> -
inherited
-
setConfigOption(
String id, Object value) → Future< void> -
inherited
-
setExecutionPolicy(
ChatToolCallExecutionPolicy policy) → void -
inherited
-
stop(
) → Future< void> -
inherited
-
submit(
ChatSubmission submission) → Future< ChatSubmitResult> -
override
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited