Expand description
Session resource types and methods mirroring the JS SDK’s resources/session.ts.
Structs§
- Assistant
Message - An assistant-generated message.
- Assistant
Message Path - Filesystem paths for an
AssistantMessage. - Assistant
Message Time - Timing information for an
AssistantMessage. - Assistant
Message Tokens - Token usage breakdown for an
AssistantMessage. - File
Part - A file attachment part within a message.
- File
Part Input - A file input part for the chat endpoint.
- File
Part Source Text - Text content extracted from a source.
- File
Source - A file-based source.
- Patch
Part - A patch describing file modifications.
- Session
- A conversation session.
- Session
Chat Params - Parameters for the chat endpoint (
POST /session/{id}/message). - Session
Init Params - Parameters for session initialisation (
POST /session/{id}/init). - Session
Messages Response Item - A single item in the session messages response.
- Session
Resource - Provides access to the Session-related API endpoints.
- Session
Revert - Revert metadata attached to a
Session. - Session
Revert Params - Parameters for reverting a session (
POST /session/{id}/revert). - Session
Share - Share metadata attached to a
Session. - Session
Summarize Params - Parameters for summarising a session (
POST /session/{id}/summarize). - Session
Time - Timing information for a
Session. - Snapshot
Part - A snapshot of the session state.
- Step
Finish Part - Marks the end of a reasoning step with cost and token info.
- Step
Finish Tokens - Token usage for a
StepFinishPart. - Step
Start Part - Marks the beginning of a reasoning step.
- Symbol
Source - A symbol-based source (e.g. function, class).
- Symbol
Source Position - A line/character position within a file.
- Symbol
Source Range - Range of a
SymbolSource. - Text
Part - A text part within a message.
- Text
Part Input - A text input part for the chat endpoint.
- Text
Part Input Time - Timing information for a
TextPartInput. - Text
Part Time - Timing information for a
TextPart. - Token
Cache - Cache token breakdown.
- Tool
Part - A tool invocation part within a message.
- Tool
State Completed - A successfully completed tool invocation.
- Tool
State Completed Time - Timing for
ToolStateCompleted. - Tool
State Error - A tool invocation that resulted in an error.
- Tool
State Error Time - Timing for
ToolStateError. - Tool
State Pending - A pending tool invocation.
- Tool
State Running - A currently-running tool invocation.
- Tool
State Running Time - Timing for
ToolStateRunning. - User
Message - A user-sent message.
- User
Message Time - Timing information for a
UserMessage.
Enums§
- File
Part Source - Source of a file part — either a file or a symbol.
- Message
- A message in a session — either from the user or the assistant.
- Part
- A part within a message — discriminated by
type. - Part
Input - An input part — either text or file — discriminated by
type. - Tool
State - The current state of a tool invocation — discriminated by
status.
Type Aliases§
- Session
Abort Response - Response type for aborting a session.
- Session
Delete Response - Response type for deleting a session.
- Session
Init Response - Response type for initialising a session.
- Session
List Response - Response type for listing sessions.
- Session
Messages Response - Response type for listing session messages.
- Session
Summarize Response - Response type for summarising a session.