Documentation
¶
Index ¶
- func TitleFromMessage(text, fallback string) string
- type Client
- func (c *Client) BaseURL() string
- func (c *Client) CreateSession(ctx context.Context, directory string) (*Session, error)
- func (c *Client) GetSession(ctx context.Context, sessionID string) (*Session, error)
- func (c *Client) Health(ctx context.Context) error
- func (c *Client) ListMessages(ctx context.Context, sessionID string) ([]MessageResponse, error)
- func (c *Client) ListProviders(ctx context.Context) ([]Provider, []string, error)
- func (c *Client) ListSessions(ctx context.Context) ([]Session, error)
- func (c *Client) ReplyQuestion(ctx context.Context, requestID string, answers [][]string) error
- func (c *Client) SendMessageEvents(ctx context.Context, sessionID, text, _ string, modelID, _ string) <-chan StreamEvent
- type MessageInfo
- type MessageResponse
- type Model
- type ModelRef
- type Part
- type Provider
- type Session
- type SessionTime
- type StreamEvent
- type ToolEvent
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TitleFromMessage ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements Backend by running the `claude` CLI in headless streaming mode (one process per turn, conversations resumed by session ID).
func (*Client) CreateSession ¶
func (*Client) GetSession ¶
func (*Client) ListMessages ¶
func (*Client) ListProviders ¶
func (*Client) ReplyQuestion ¶
func (*Client) SendMessageEvents ¶
type MessageInfo ¶
type MessageResponse ¶
type MessageResponse struct {
Info MessageInfo `json:"info"`
Parts []Part `json:"parts"`
}
type Session ¶
type Session struct {
ID string `json:"id"`
Title string `json:"title"`
Directory string `json:"directory"`
Model *ModelRef `json:"model"`
Time SessionTime `json:"time"`
}
type SessionTime ¶
type StreamEvent ¶
Click to show internal directories.
Click to hide internal directories.