Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatContextPartProvider ¶
type ChatContextPartProvider interface {
ContextPartProvider
}
ChatContextPartProvider manages chat context for a single session
func NewChatCtxManager ¶
func NewChatCtxManager(eventBus events.EventBus) ChatContextPartProvider
NewChatCtxManager creates a new chat context manager
type ContextManager ¶
type ContextManager interface {
GetContextParts(ctx context.Context) (map[string]string, error) // Returns all context parts
ClearContext() error
}
ContextManager manages conversation context
func NewContextManager ¶
func NewContextManager(registry *ContextPartProviderRegistry) ContextManager
NewContextManager creates a new context manager with registry
type ContextPart ¶
ContextPart represents a part of the context with its key
type ContextPartProvider ¶
type ContextPartProvider interface {
GetPart(ctx context.Context) (ContextPart, error)
ClearPart() error
}
ContextPartProvider provides context from various sources
type ContextPartProviderRegistry ¶
type ContextPartProviderRegistry struct {
// contains filtered or unexported fields
}
ContextPartProviderRegistry manages multiple context providers
func NewContextPartProviderRegistry ¶
func NewContextPartProviderRegistry() *ContextPartProviderRegistry
NewContextPartProviderRegistry creates a new context registry
func (*ContextPartProviderRegistry) GetProviders ¶
func (r *ContextPartProviderRegistry) GetProviders() []ContextPartProvider
GetProviders returns all registered providers
func (*ContextPartProviderRegistry) Register ¶
func (r *ContextPartProviderRegistry) Register(provider ContextPartProvider)
Register adds a provider to the registry
type FileContextPartsProvider ¶
type FileContextPartsProvider struct {
// contains filtered or unexported fields
}
func NewFileContextPartsProvider ¶
func NewFileContextPartsProvider(eventBus events.EventBus) *FileContextPartsProvider
func (*FileContextPartsProvider) ClearPart ¶
func (p *FileContextPartsProvider) ClearPart() error
func (*FileContextPartsProvider) GetOrderedFiles ¶
func (p *FileContextPartsProvider) GetOrderedFiles() []string
GetOrderedFiles returns the ordered list of file paths (for testing)
func (*FileContextPartsProvider) GetPart ¶
func (p *FileContextPartsProvider) GetPart(ctx context.Context) (ContextPart, error)
func (*FileContextPartsProvider) GetStoredFiles ¶
func (p *FileContextPartsProvider) GetStoredFiles() map[string]string
GetStoredFiles returns the map of stored file paths to content (for testing)
type InMemoryChatContextPartProvider ¶
type InMemoryChatContextPartProvider struct {
// contains filtered or unexported fields
}
InMemoryChatContextPartProvider implements ChatCtxManager with in-memory storage
func (*InMemoryChatContextPartProvider) ClearPart ¶
func (m *InMemoryChatContextPartProvider) ClearPart() error
ClearPart removes all context
func (*InMemoryChatContextPartProvider) GetPart ¶
func (m *InMemoryChatContextPartProvider) GetPart(ctx context.Context) (ContextPart, error)
GetPart returns the formatted conversation context
type InMemoryManager ¶
type InMemoryManager struct {
// contains filtered or unexported fields
}
InMemoryManager implements ContextManager with registry-based providers
func (*InMemoryManager) ClearContext ¶
func (m *InMemoryManager) ClearContext() error
ClearContext clears the chat context only (maintains current behavior)
func (*InMemoryManager) GetContextParts ¶
GetContextParts retrieves all context parts from registered providers
type ProjectContextPartProvider ¶
type ProjectContextPartProvider interface {
ContextPartProvider
}
ProjectContextPartProvider manages project-specific context files (GENIE.md/CLAUDE.md)
func NewProjectCtxManager ¶
func NewProjectCtxManager(subscriber events.Subscriber) ProjectContextPartProvider
NewProjectCtxManager creates a new project context manager
type TodoContextPartProvider ¶
type TodoContextPartProvider struct {
// contains filtered or unexported fields
}
TodoContextPartProvider manages todo context by listening to TodoWrite executions
func NewTodoContextPartProvider ¶
func NewTodoContextPartProvider(eventBus events.EventBus) *TodoContextPartProvider
NewTodoContextPartProvider creates a new todo context provider
func (*TodoContextPartProvider) ClearPart ¶
func (p *TodoContextPartProvider) ClearPart() error
ClearPart clears the stored todos
func (*TodoContextPartProvider) GetPart ¶
func (p *TodoContextPartProvider) GetPart(ctx context.Context) (ContextPart, error)
GetPart returns the current todos as context
func (*TodoContextPartProvider) GetTodosJSON ¶
func (p *TodoContextPartProvider) GetTodosJSON() string
GetTodosJSON returns the current todos JSON (for testing)