chathistory

package
v0.3.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	ID          string `json:"id"`
	SenderID    string `json:"senderId,omitempty"`
	SenderName  string `json:"senderName,omitempty"`
	Role        string `json:"role"`
	Content     string `json:"content"`
	Timestamp   int64  `json:"timestamp"`
	ThreadID    string `json:"threadId,omitempty"`
	MessageType string `json:"messageType,omitempty"`
}

Message is one chat-visible message from the transport platform.

type Provider

type Provider interface {
	ReadChatHistory(ctx context.Context, req Request) (Result, error)
}

Provider reads chat history from the underlying transport.

type Request

type Request struct {
	SessionID agentkit.SessionID
	UserID    string
	Limit     int
	Before    string // page cursor (page_token)
	After     string // start time, unix seconds
	Order     string // asc | desc
	Query     string // optional client-side keyword filter
	Thread    bool   // when true and session has :t:, scope to thread messages
}

Request describes a history read against a delivery session.

type Result

type Result struct {
	Messages []Message
	HasMore  bool
	Cursor   string
	Source   string
}

Result is a page of transport history.

type Router

type Router interface {
	ChatHistoryFor(platformID string) Provider
}

Router resolves a leaf platform by PlatformID.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL