Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartSummarizeDraftsSession ¶
func StartSummarizeDraftsSession( ctx context.Context, sessionManager portrepos.SessionManager, sourceSessionID string, scope entities.ResourceScope, teamID string, ownerID string, ) error
StartSummarizeDraftsSession starts a oneshot summarize-drafts session for the given source session. It performs a deduplication check before creating the session to avoid running multiple summarize sessions for the same source session concurrently.
Types ¶
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
Worker periodically lists all draft memories and starts summarize-drafts sessions for those whose source session no longer exists.
func NewWorker ¶
func NewWorker( memoryRepo portrepos.MemoryRepository, sessionManager portrepos.SessionManager, config WorkerConfig, ) *Worker
NewWorker creates a new memory draft summarizer Worker.
type WorkerConfig ¶
type WorkerConfig struct {
// CheckInterval is how often the worker scans for orphaned draft memories.
// Default: 5m
CheckInterval time.Duration
// Enabled controls whether the worker actually runs.
Enabled bool
}
WorkerConfig holds configuration for the memory draft summarizer worker.
func DefaultWorkerConfig ¶
func DefaultWorkerConfig() WorkerConfig
DefaultWorkerConfig returns the default worker configuration.
Click to show internal directories.
Click to hide internal directories.