chat

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrAgentAuthPolicyNotDefined is returned when agent authorization policy is not defined
	ErrAgentAuthPolicyNotDefined = errors.New("agent authorization policy not defined")

	// ErrAgentAuthDenied is returned when agent authorization is denied
	ErrAgentAuthDenied = errors.New("agent request not authorized")
)

Functions

func AuthorizeAgentRequest

func AuthorizeAgentRequest(ctx context.Context, policyClient interfaces.PolicyClient, noAuthz bool, message string) error

AuthorizeAgentRequest checks policy-based authorization for agent execution.

func CollectThreadComments

func CollectThreadComments(ctx context.Context, repo interfaces.Repository, ticketID types.TicketID, currentSession *session.Session) []ticket.Comment

CollectThreadComments retrieves thread comments posted between sessions.

func LoadHistory

func LoadHistory(ctx context.Context, repo interfaces.Repository, ticketID types.TicketID, storageSvc *storage.Service) (*gollem.History, error)

LoadHistory loads the chat history for a ticket from storage. It first tries to load from latest.json, falling back to history/{id}.json.

func SaveHistory

func SaveHistory(ctx context.Context, repo interfaces.Repository, storageClient interfaces.StorageClient, storageSvc *storage.Service, ticketID types.TicketID, history *gollem.History) error

SaveHistory saves a gollem History to storage and records it in the repository.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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