Documentation / @agentick/react / UseSessionResult
Interface: UseSessionResult
Defined in: react/src/types.ts:111
Return value from useSession hook.
Properties
abort()
abort: (
reason?) =>Promise<void>
Defined in: react/src/types.ts:145
Abort the session's current execution.
Parameters
reason?
string
Returns
Promise<void>
accessor?
optionalaccessor:SessionAccessor
Defined in: react/src/types.ts:156
Session accessor for advanced operations (channels, tool confirmations). Only available if sessionId was provided.
close()
close: () =>
Promise<void>
Defined in: react/src/types.ts:150
Close this session.
Returns
Promise<void>
isSubscribed
isSubscribed:
boolean
Defined in: react/src/types.ts:120
Whether this session is subscribed.
send()
send: (
input) =>ClientExecutionHandle
Defined in: react/src/types.ts:138
Send a message.
If sessionId was provided, sends to that session. Otherwise, creates an ephemeral session.
Parameters
input
string | ContentBlock | ContentBlock[] | Message | Message[] | SendInput<Record<string, unknown>>
Returns
sessionId?
optionalsessionId:string
Defined in: react/src/types.ts:115
Session ID (if provided in options).
subscribe()
subscribe: () =>
void
Defined in: react/src/types.ts:125
Subscribe to this session (only if sessionId provided).
Returns
void
unsubscribe()
unsubscribe: () =>
void
Defined in: react/src/types.ts:130
Unsubscribe from this session.
Returns
void