chathistory

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChatHistory

func NewChatHistory(cfg ChatHistoryConfig, deps ChatHistoryDeps) (agentkit.Tool, error)

NewChatHistory registers tool/chat-history: read transport chat history on demand.

Types

type ChatHistoryConfig

type ChatHistoryConfig struct {
	DefaultLimit int `json:"defaultLimit"`
	MaxLimit     int `json:"maxLimit"`
}

type ChatHistoryDeps

type ChatHistoryDeps struct {
	Platform agentkit.Platform `json:"platform"`
}

type ChatHistoryInput

type ChatHistoryInput struct {
	SessionID string `json:"sessionId,omitempty" jsonschema:"Optional delivery target; defaults to the current inbox"`
	UserID    string `json:"userId,omitempty" jsonschema:"Optional user target when sessionId is omitted"`
	Limit     int    `json:"limit,omitempty" jsonschema:"Maximum messages to return"`
	Before    string `json:"before,omitempty" jsonschema:"Pagination cursor from a previous response"`
	After     string `json:"after,omitempty" jsonschema:"Only messages after this unix timestamp (seconds)"`
	Order     string `json:"order,omitempty" jsonschema:"Sort order: asc or desc (default desc)"`
	Query     string `json:"query,omitempty" jsonschema:"Optional keyword filter applied to message content"`
	Thread    *bool  `json:"thread,omitempty" jsonschema:"When true, scope to the current thread when available (default true)"`
}

type ChatHistoryOutput

type ChatHistoryOutput struct {
	Messages []chathistory.Message `json:"messages"`
	HasMore  bool                  `json:"hasMore"`
	Cursor   string                `json:"cursor,omitempty"`
	Source   string                `json:"source,omitempty"`
	Count    int                   `json:"count"`
}

Jump to

Keyboard shortcuts

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