Documentation
¶
Index ¶
- Constants
- func EncodeJSONV2(w io.Writer, envelope Envelope) error
- func NewTable(w io.Writer) *tabwriter.Writer
- func PrintForget(w io.Writer, memory domain.Memory)
- func PrintMemory(w io.Writer, memory domain.Memory)
- func PrintMemoryAdded(w io.Writer, memory domain.Memory)
- func PrintMemoryJSON(w io.Writer, memory domain.Memory) error
- func PrintMemoryList(w io.Writer, memories []domain.Memory)
- func PrintMemoryListJSON(w io.Writer, memories []domain.Memory) error
- func PrintSearchResults(w io.Writer, memories []domain.Memory)
- func PrintSearchResultsJSON(w io.Writer, memories []domain.Memory) error
- func PrintSemanticResults(w io.Writer, results []store.SemanticHit, withDistance bool)
- func PrintSemanticResultsJSON(w io.Writer, results []store.SemanticHit) error
- func PrintStats(w io.Writer, stats Stats)
- func PrintStatsJSON(w io.Writer, stats Stats) error
- func SanitizeInline(value string) string
- func ScopeMarker(scope domain.Scope, assignment domain.ScopeAssignment) string
- type Context
- type ContextScopeDTO
- type Database
- type Envelope
- type MatchDTO
- type MemoryDTO
- type ResolutionDTO
- type ScopeDTO
- type ScopeSelection
- type SemanticMatchDTO
- type Stats
- type StructuredError
- type Warning
Constants ¶
View Source
const APIVersion = "thr.cli/v2"
Variables ¶
This section is empty.
Functions ¶
func PrintSearchResultsJSON ¶
func PrintSemanticResults ¶
func PrintSemanticResults(w io.Writer, results []store.SemanticHit, withDistance bool)
func PrintSemanticResultsJSON ¶
func PrintSemanticResultsJSON(w io.Writer, results []store.SemanticHit) error
func PrintStats ¶
func SanitizeInline ¶ added in v0.1.24
func ScopeMarker ¶ added in v0.1.24
func ScopeMarker(scope domain.Scope, assignment domain.ScopeAssignment) string
Types ¶
type Context ¶ added in v0.1.24
type Context struct {
Database Database `json:"database"`
CWD string `json:"cwd"`
ScopeSelection *ScopeSelection `json:"scope_selection,omitempty"`
CurrentScope *ContextScopeDTO `json:"current_scope,omitempty"`
ProspectiveScope *ContextScopeDTO `json:"prospective_scope,omitempty"`
DefaultWriteScope *ContextScopeDTO `json:"default_write_scope,omitempty"`
DefaultReadScopes []ContextScopeDTO `json:"default_read_scopes,omitempty"`
Resolution *ResolutionDTO `json:"resolution,omitempty"`
}
type ContextScopeDTO ¶ added in v0.1.24
type MemoryDTO ¶ added in v0.1.24
type MemoryDTO struct {
ID string `json:"id"`
Text string `json:"text"`
Scope ScopeDTO `json:"scope"`
ScopeAssignment string `json:"scope_assignment"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
ScopeUpdatedAt string `json:"scope_updated_at"`
Revision int64 `json:"revision"`
}
func NewMemoryDTO ¶ added in v0.1.24
type ResolutionDTO ¶ added in v0.1.24
type ScopeDTO ¶ added in v0.1.24
type ScopeDTO struct {
ID string `json:"id"`
Kind string `json:"kind"`
Label string `json:"label"`
}
func NewScopeDTO ¶ added in v0.1.24
type ScopeSelection ¶ added in v0.1.24
type SemanticMatchDTO ¶ added in v0.1.24
type SemanticMatchDTO struct {
Rank int `json:"rank"`
Memory MemoryDTO `json:"memory"`
Match MatchDTO `json:"match"`
}
func NewSemanticMatchDTO ¶ added in v0.1.24
func NewSemanticMatchDTO(rank int, hit store.SemanticHit) SemanticMatchDTO
type Stats ¶
type Stats struct {
DBPath string `json:"db_path"`
ModelCache string `json:"model_cache"`
Memories int64 `json:"memories"`
ModelID string `json:"model_id"`
ModelRevision string `json:"model_revision"`
ModelManifestSHA256 string `json:"model_manifest_sha256"`
ModelVerified bool `json:"model_verified"`
IndexedMemories int64 `json:"indexed_memories"`
StaleMemories int64 `json:"stale_memories"`
MissingEmbeddings int64 `json:"missing_embeddings"`
}
type StructuredError ¶ added in v0.1.24
Click to show internal directories.
Click to hide internal directories.