memory

package
v0.2.9 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TodayDate

func TodayDate() string

Types

type IndexManager added in v0.2.4

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

func NewIndexManager added in v0.2.4

func NewIndexManager(cfg *config.Config, workspace string) (*IndexManager, error)

func (*IndexManager) Close added in v0.2.4

func (m *IndexManager) Close() error

func (*IndexManager) ReadFile added in v0.2.4

func (m *IndexManager) ReadFile(relPath string, opts ReadFileOptions) (string, string, error)

func (*IndexManager) Search added in v0.2.4

func (m *IndexManager) Search(ctx context.Context, query string, opts SearchOptions) ([]SearchResult, error)

func (*IndexManager) Status added in v0.2.4

func (m *IndexManager) Status(ctx context.Context) SearchStatus

func (*IndexManager) Sync added in v0.2.4

func (m *IndexManager) Sync(ctx context.Context, force bool) error

type ReadFileOptions added in v0.2.4

type ReadFileOptions struct {
	From  int
	Lines int
}

type SearchManager added in v0.2.4

type SearchManager interface {
	Search(ctx context.Context, query string, opts SearchOptions) ([]SearchResult, error)
	ReadFile(relPath string, opts ReadFileOptions) (text string, resolvedPath string, err error)
	Sync(ctx context.Context, force bool) error
	Status(ctx context.Context) SearchStatus
	Close() error
}

type SearchOptions added in v0.2.4

type SearchOptions struct {
	MaxResults int
	MinScore   float64
}

type SearchResult added in v0.2.4

type SearchResult struct {
	Path      string  `json:"path"`
	StartLine int     `json:"startLine"`
	EndLine   int     `json:"endLine"`
	Score     float64 `json:"score"`
	Snippet   string  `json:"snippet"`
}

type SearchStatus added in v0.2.4

type SearchStatus struct {
	Enabled       bool    `json:"enabled"`
	Provider      string  `json:"provider,omitempty"`
	Model         string  `json:"model,omitempty"`
	DBPath        string  `json:"dbPath,omitempty"`
	Files         int     `json:"files"`
	Chunks        int     `json:"chunks"`
	VectorEnabled bool    `json:"vectorEnabled"`
	VectorReady   bool    `json:"vectorReady"`
	VectorDims    int     `json:"vectorDims"`
	FTSEnabled    bool    `json:"ftsEnabled"`
	FTSReady      bool    `json:"ftsReady"`
	MinScore      float64 `json:"minScore"`
	MaxResults    int     `json:"maxResults"`
	LastError     string  `json:"lastError,omitempty"`
}

type Store

type Store struct {
	Workspace string
	Dir       string
	LongTerm  string
	History   string
}

func New

func New(workspace string) *Store

func (*Store) AppendHistory added in v0.2.3

func (s *Store) AppendHistory(entry string) error

func (*Store) EnsureInitialized

func (s *Store) EnsureInitialized() error

func (*Store) GetContext

func (s *Store) GetContext() string

func (*Store) ReadLongTerm

func (s *Store) ReadLongTerm() string

func (*Store) ReadToday

func (s *Store) ReadToday() string

func (*Store) TodayPath

func (s *Store) TodayPath() string

func (*Store) WriteLongTerm added in v0.2.3

func (s *Store) WriteLongTerm(content string) error

Jump to

Keyboard shortcuts

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