memory

package
v0.2.5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attempt

type Attempt struct {
	Action     string  `json:"action"`
	Input      string  `json:"input,omitempty"`
	Output     string  `json:"output"`
	Score      float64 `json:"score"`
	UserAction string  `json:"user_action,omitempty"`
}

type ConflictRecord

type ConflictRecord struct {
	FilePattern  string    `json:"file_pattern"`
	Resolution   string    `json:"resolution"`
	UserAccepted bool      `json:"user_accepted"`
	Timestamp    time.Time `json:"timestamp"`
}

type LongTerm

type LongTerm struct {
	RepoPatterns    map[string]RepoProfile `json:"repo_patterns"`
	UserStyle       UserPreferences        `json:"user_style"`
	ConflictHistory []ConflictRecord       `json:"conflict_history"`
}

type RepoProfile

type RepoProfile struct {
	CommitStyle string    `json:"commit_style"`
	HotFiles    []string  `json:"hot_files"`
	TestCommand string    `json:"test_command"`
	LastSync    time.Time `json:"last_sync"`
	Approvals   int       `json:"approvals"`
	Rejections  int       `json:"rejections"`
	Edits       int       `json:"edits"`
}

type Session

type Session struct {
	Task       string
	Attempts   []Attempt
	LastOutput string
	RepoRoot   string
	StartTime  time.Time
	// contains filtered or unexported fields
}

func NewSession

func NewSession(repoRoot string) *Session

func (*Session) RepoContext

func (s *Session) RepoContext() string

func (*Session) SetRepoContext

func (s *Session) SetRepoContext(c string)

func (*Session) StepsJSON

func (s *Session) StepsJSON() string

func (*Session) Summary

func (s *Session) Summary() string

func (*Session) Update

func (s *Session) Update(action, result string)

func (*Session) UpdateScore

func (s *Session) UpdateScore(score float64)

func (*Session) UpdateUserAction

func (s *Session) UpdateUserAction(ua string)

type Store

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

func NewStore

func NewStore() *Store

func (*Store) PersistSession

func (s *Store) PersistSession(repoRoot string, session *Session)

func (*Store) RecordConflict

func (s *Store) RecordConflict(rec ConflictRecord)

func (*Store) RepoContext

func (s *Store) RepoContext(repoRoot string) string

func (*Store) RepoProfile

func (s *Store) RepoProfile(repoRoot string) RepoProfile

func (*Store) UpdateRepoProfile

func (s *Store) UpdateRepoProfile(repoRoot string, fn func(*RepoProfile))

func (*Store) UpdateUserStyle

func (s *Store) UpdateUserStyle(fn func(*UserPreferences))

func (*Store) UserStyle

func (s *Store) UserStyle() UserPreferences

type UserPreferences

type UserPreferences struct {
	PrefersShortCommits bool   `json:"prefers_short_commits"`
	AlwaysRunTests      bool   `json:"always_run_tests"`
	DefaultApprovalMode string `json:"default_approval_mode"`
}

Jump to

Keyboard shortcuts

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