steer

package
v0.5.2-beta Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package steer provides persistent user steering for autonomous conversations.

Index

Constants

View Source
const MaxMessageLength = 10000

Variables

This section is empty.

Functions

func FormatPendingNotice

func FormatPendingNotice(content string, imageCount int) string

FormatPendingNotice renders the user-facing notice shown when queued steering is injected.

Types

type Message

type Message struct {
	Role      string    `json:"role"`
	Content   string    `json:"content"`
	Images    []string  `json:"images,omitempty"`
	Timestamp time.Time `json:"timestamp"`
}

Message represents a queued steering message.

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store manages the steering queue in Kodelet's shared SQLite database.

func NewSteerStore

func NewSteerStore(ctx context.Context, opts ...StoreOption) (*Store, error)

NewSteerStore opens the shared SQLite database. Database migrations must be applied before the store is used.

func (*Store) Close

func (s *Store) Close() error

Close releases the store's database connection.

func (*Store) Consume

func (s *Store) Consume(ctx context.Context, conversationID string) ([]Message, error)

Consume atomically removes and returns all pending steering messages for a conversation.

func (*Store) Enqueue

func (s *Store) Enqueue(ctx context.Context, conversationID, content string, images []string) (bool, error)

Enqueue appends a steering message and reports whether messages were already queued.

func (*Store) HasPending

func (s *Store) HasPending(ctx context.Context, conversationID string) (bool, error)

HasPending reports whether a conversation has queued steering messages.

func (*Store) Peek

func (s *Store) Peek(ctx context.Context, conversationID string) ([]Message, error)

Peek returns pending steering messages without consuming them.

type StoreOption

type StoreOption func(*storeConfig)

StoreOption configures a steering store.

func WithDBPath

func WithDBPath(dbPath string) StoreOption

WithDBPath overrides the shared database path. It is primarily useful for tests.

Jump to

Keyboard shortcuts

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