Documentation
¶
Overview ¶
Package steer provides functionality for managing user steering messages for autonomous conversations in kodelet. It handles storing, loading and managing steering messages with file-based persistence.
Index ¶
- Constants
- type Data
- type Message
- type Store
- func (s *Store) ClearPendingSteer(conversationID string) error
- func (s *Store) HasPendingSteer(conversationID string) bool
- func (s *Store) ListSteerFiles() ([]string, error)
- func (s *Store) ReadPendingSteer(conversationID string) ([]Message, error)
- func (s *Store) WriteSteer(conversationID, message string) error
Constants ¶
const MaxMessageLength = 10000
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Data ¶
type Data struct {
Messages []Message `json:"messages"`
}
Data represents the structure of the steer JSON file containing a collection of steering messages.
type Message ¶
type Message struct {
Role string `json:"role"`
Content string `json:"content"`
Timestamp time.Time `json:"timestamp"`
}
Message represents a steering message
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store manages persistent storage of user steering messages for autonomous conversations. It provides thread-safe operations for writing, reading, and clearing steering data with file-based persistence.
func (*Store) ClearPendingSteer ¶
ClearPendingSteer clears all pending steering messages
func (*Store) HasPendingSteer ¶
HasPendingSteer checks if there are pending steering messages
func (*Store) ListSteerFiles ¶
ListSteerFiles returns all steer files for debugging
func (*Store) ReadPendingSteer ¶
ReadPendingSteer reads and returns pending steering messages
func (*Store) WriteSteer ¶
WriteSteer writes a steering message to the steer file