Documentation
¶
Index ¶
- Constants
- func HumanKeyStableSlug(key HumanKey) string
- func StableHash(value string) string
- type ClusterDetail
- type ClusterDetailOptions
- type ClusterMemberDetail
- type ClusterMemberOverride
- type ClusterSummary
- type ClusterSummaryOptions
- type Comment
- type Document
- type DurableClusterInput
- type DurableClusterMemberInput
- type EmbeddingTask
- type EmbeddingTaskOptions
- type HumanKey
- type PortablePruneOptions
- type PortablePruneStats
- type Repository
- type RunRecord
- type SaveDurableClustersResult
- type SearchHit
- type Status
- type Store
- func (s *Store) Close() error
- func (s *Store) CloseClusterLocally(ctx context.Context, repoID, clusterID int64, reason string) error
- func (s *Store) CloseThreadLocally(ctx context.Context, repoID int64, number int, reason string) error
- func (s *Store) ClusterDetail(ctx context.Context, options ClusterDetailOptions) (ClusterDetail, error)
- func (s *Store) ClusterIDForThreadNumber(ctx context.Context, repoID int64, number int, includeClosed bool) (int64, error)
- func (s *Store) DB() *sql.DB
- func (s *Store) DurableClusterDetail(ctx context.Context, options ClusterDetailOptions) (ClusterDetail, error)
- func (s *Store) ExcludeClusterMemberLocally(ctx context.Context, repoID, clusterID int64, number int, reason string) (ClusterMemberOverride, error)
- func (s *Store) IncludeClusterMemberLocally(ctx context.Context, repoID, clusterID int64, number int, reason string) (ClusterMemberOverride, error)
- func (s *Store) LastSuccessfulSyncAt(ctx context.Context, repoID int64) (time.Time, error)
- func (s *Store) ListClusterSummaries(ctx context.Context, options ClusterSummaryOptions) ([]ClusterSummary, error)
- func (s *Store) ListDisplayClusterSummaries(ctx context.Context, options ClusterSummaryOptions) ([]ClusterSummary, error)
- func (s *Store) ListEmbeddingTasks(ctx context.Context, options EmbeddingTaskOptions) ([]EmbeddingTask, error)
- func (s *Store) ListRepositories(ctx context.Context) ([]Repository, error)
- func (s *Store) ListRunClusterSummaries(ctx context.Context, options ClusterSummaryOptions) ([]ClusterSummary, error)
- func (s *Store) ListRuns(ctx context.Context, repoID int64, kind string, limit int) ([]RunRecord, error)
- func (s *Store) ListThreadVectors(ctx context.Context, repoID int64) ([]ThreadVector, error)
- func (s *Store) ListThreadVectorsFiltered(ctx context.Context, query ThreadVectorQuery) ([]ThreadVector, error)
- func (s *Store) ListThreads(ctx context.Context, repoID int64, includeClosed bool) ([]Thread, error)
- func (s *Store) ListThreadsFiltered(ctx context.Context, options ThreadListOptions) ([]Thread, error)
- func (s *Store) MarkOpenThreadClosedFromGitHub(ctx context.Context, thread Thread) (bool, error)
- func (s *Store) Path() string
- func (s *Store) PrunePortablePayloads(ctx context.Context, options PortablePruneOptions) (PortablePruneStats, error)
- func (s *Store) RecordRun(ctx context.Context, run RunRecord) (int64, error)
- func (s *Store) ReopenClusterLocally(ctx context.Context, repoID, clusterID int64) error
- func (s *Store) ReopenThreadLocally(ctx context.Context, repoID int64, number int) error
- func (s *Store) RepositoryByFullName(ctx context.Context, fullName string) (Repository, error)
- func (s *Store) RunClusterDetail(ctx context.Context, options ClusterDetailOptions) (ClusterDetail, error)
- func (s *Store) SaveDurableClusters(ctx context.Context, repoID int64, inputs []DurableClusterInput) (SaveDurableClustersResult, error)
- func (s *Store) SearchDocuments(ctx context.Context, repoID int64, query string, limit int) ([]SearchHit, error)
- func (s *Store) SearchThreads(ctx context.Context, options ThreadSearchOptions) ([]Thread, error)
- func (s *Store) SetClusterCanonicalLocally(ctx context.Context, repoID, clusterID int64, number int, reason string) (ClusterMemberOverride, error)
- func (s *Store) Status(ctx context.Context) (Status, error)
- func (s *Store) ThreadVectorByNumber(ctx context.Context, query ThreadVectorQuery, number int) (Thread, ThreadVector, error)
- func (s *Store) ThreadsByIDs(ctx context.Context, repoID int64, ids []int64) (map[int64]Thread, error)
- func (s *Store) UpsertComment(ctx context.Context, comment Comment) (int64, error)
- func (s *Store) UpsertDocument(ctx context.Context, doc Document) (int64, error)
- func (s *Store) UpsertRepository(ctx context.Context, repo Repository) (int64, error)
- func (s *Store) UpsertThread(ctx context.Context, thread Thread) (int64, error)
- func (s *Store) UpsertThreadVector(ctx context.Context, vector ThreadVector) error
- func (s *Store) WithTx(ctx context.Context, fn func(*Store) error) error
- type Thread
- type ThreadListOptions
- type ThreadSearchOptions
- type ThreadVector
- type ThreadVectorQuery
Constants ¶
View Source
const ( ClusterSourceRun = "run_cluster" ClusterSourceDurable = "durable_cluster" )
Variables ¶
This section is empty.
Functions ¶
func HumanKeyStableSlug ¶
func StableHash ¶
Types ¶
type ClusterDetail ¶
type ClusterDetail struct {
Cluster ClusterSummary `json:"cluster"`
Members []ClusterMemberDetail `json:"members"`
}
type ClusterDetailOptions ¶
type ClusterMemberDetail ¶
type ClusterMemberDetail struct {
Thread Thread `json:"thread"`
Role string `json:"role"`
State string `json:"state"`
ScoreToRepresentative *float64 `json:"score_to_representative,omitempty"`
BodySnippet string `json:"body_snippet,omitempty"`
Summaries map[string]string `json:"summaries,omitempty"`
}
type ClusterMemberOverride ¶
type ClusterSummary ¶
type ClusterSummary struct {
ID int64 `json:"id"`
Source string `json:"source,omitempty"`
StableSlug string `json:"stable_slug"`
Status string `json:"status"`
Title string `json:"title,omitempty"`
RepresentativeThreadID int64 `json:"representative_thread_id,omitempty"`
RepresentativeNumber int `json:"representative_number,omitempty"`
RepresentativeKind string `json:"representative_kind,omitempty"`
RepresentativeTitle string `json:"representative_title,omitempty"`
MemberCount int `json:"member_count"`
UpdatedAt string `json:"updated_at"`
ClosedAt string `json:"closed_at,omitempty"`
}
type ClusterSummaryOptions ¶
type Comment ¶
type Comment struct {
ID int64 `json:"id"`
ThreadID int64 `json:"thread_id"`
GitHubID string `json:"github_id"`
CommentType string `json:"comment_type"`
AuthorLogin string `json:"author_login,omitempty"`
AuthorType string `json:"author_type,omitempty"`
Body string `json:"body"`
IsBot bool `json:"is_bot"`
RawJSON string `json:"-"`
CreatedAtGitHub string `json:"created_at_gh,omitempty"`
UpdatedAtGitHub string `json:"updated_at_gh,omitempty"`
}
type DurableClusterInput ¶
type EmbeddingTask ¶
type EmbeddingTaskOptions ¶
type PortablePruneOptions ¶
type PortablePruneStats ¶
type PortablePruneStats struct {
DBPath string `json:"db_path"`
BodyChars int `json:"body_chars"`
BytesBefore int64 `json:"bytes_before"`
BytesAfter int64 `json:"bytes_after"`
ThreadsPruned int64 `json:"threads_pruned"`
RepositoriesPruned int64 `json:"repositories_pruned"`
FingerprintsPruned int64 `json:"fingerprints_pruned"`
DocumentsDeleted int64 `json:"documents_deleted"`
DocumentsFTSRebuilt bool `json:"documents_fts_rebuilt"`
DroppedTables []string `json:"dropped_tables,omitempty"`
DroppedColumns []string `json:"dropped_columns,omitempty"`
Vacuumed bool `json:"vacuumed"`
}
type Repository ¶
type RunRecord ¶
type RunRecord struct {
ID int64 `json:"id"`
RepoID int64 `json:"repo_id"`
Kind string `json:"kind"`
Scope string `json:"scope"`
Status string `json:"status"`
StartedAt string `json:"started_at"`
FinishedAt string `json:"finished_at,omitempty"`
StatsJSON string `json:"stats_json,omitempty"`
ErrorText string `json:"error_text,omitempty"`
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) CloseClusterLocally ¶
func (*Store) CloseThreadLocally ¶
func (*Store) ClusterDetail ¶
func (s *Store) ClusterDetail(ctx context.Context, options ClusterDetailOptions) (ClusterDetail, error)
func (*Store) ClusterIDForThreadNumber ¶
func (*Store) DurableClusterDetail ¶
func (s *Store) DurableClusterDetail(ctx context.Context, options ClusterDetailOptions) (ClusterDetail, error)
func (*Store) ExcludeClusterMemberLocally ¶
func (*Store) IncludeClusterMemberLocally ¶
func (*Store) LastSuccessfulSyncAt ¶
func (*Store) ListClusterSummaries ¶
func (s *Store) ListClusterSummaries(ctx context.Context, options ClusterSummaryOptions) ([]ClusterSummary, error)
func (*Store) ListDisplayClusterSummaries ¶
func (s *Store) ListDisplayClusterSummaries(ctx context.Context, options ClusterSummaryOptions) ([]ClusterSummary, error)
func (*Store) ListEmbeddingTasks ¶
func (s *Store) ListEmbeddingTasks(ctx context.Context, options EmbeddingTaskOptions) ([]EmbeddingTask, error)
func (*Store) ListRepositories ¶
func (s *Store) ListRepositories(ctx context.Context) ([]Repository, error)
func (*Store) ListRunClusterSummaries ¶
func (s *Store) ListRunClusterSummaries(ctx context.Context, options ClusterSummaryOptions) ([]ClusterSummary, error)
func (*Store) ListThreadVectors ¶
func (*Store) ListThreadVectorsFiltered ¶
func (s *Store) ListThreadVectorsFiltered(ctx context.Context, query ThreadVectorQuery) ([]ThreadVector, error)
func (*Store) ListThreads ¶
func (*Store) ListThreadsFiltered ¶
func (*Store) MarkOpenThreadClosedFromGitHub ¶
func (*Store) PrunePortablePayloads ¶
func (s *Store) PrunePortablePayloads(ctx context.Context, options PortablePruneOptions) (PortablePruneStats, error)
func (*Store) ReopenClusterLocally ¶
func (*Store) ReopenThreadLocally ¶
func (*Store) RepositoryByFullName ¶
func (*Store) RunClusterDetail ¶
func (s *Store) RunClusterDetail(ctx context.Context, options ClusterDetailOptions) (ClusterDetail, error)
func (*Store) SaveDurableClusters ¶
func (s *Store) SaveDurableClusters(ctx context.Context, repoID int64, inputs []DurableClusterInput) (SaveDurableClustersResult, error)
func (*Store) SearchDocuments ¶
func (*Store) SearchThreads ¶
func (*Store) SetClusterCanonicalLocally ¶
func (*Store) ThreadVectorByNumber ¶
func (s *Store) ThreadVectorByNumber(ctx context.Context, query ThreadVectorQuery, number int) (Thread, ThreadVector, error)
func (*Store) ThreadsByIDs ¶
func (*Store) UpsertComment ¶
func (*Store) UpsertDocument ¶
func (*Store) UpsertRepository ¶
func (*Store) UpsertThread ¶
func (*Store) UpsertThreadVector ¶
func (s *Store) UpsertThreadVector(ctx context.Context, vector ThreadVector) error
type Thread ¶
type Thread struct {
ID int64 `json:"id"`
RepoID int64 `json:"repo_id"`
GitHubID string `json:"github_id"`
Number int `json:"number"`
Kind string `json:"kind"`
State string `json:"state"`
Title string `json:"title"`
Body string `json:"body,omitempty"`
AuthorLogin string `json:"author_login,omitempty"`
AuthorType string `json:"author_type,omitempty"`
HTMLURL string `json:"html_url"`
LabelsJSON string `json:"labels_json"`
AssigneesJSON string `json:"assignees_json"`
RawJSON string `json:"-"`
ContentHash string `json:"content_hash"`
IsDraft bool `json:"is_draft"`
CreatedAtGitHub string `json:"created_at_gh,omitempty"`
UpdatedAtGitHub string `json:"updated_at_gh,omitempty"`
ClosedAtGitHub string `json:"closed_at_gh,omitempty"`
MergedAtGitHub string `json:"merged_at_gh,omitempty"`
FirstPulledAt string `json:"first_pulled_at,omitempty"`
LastPulledAt string `json:"last_pulled_at,omitempty"`
UpdatedAt string `json:"updated_at"`
ClosedAtLocal string `json:"closed_at_local,omitempty"`
CloseReasonLocal string `json:"close_reason_local,omitempty"`
}
type ThreadListOptions ¶
type ThreadSearchOptions ¶
type ThreadVector ¶
type ThreadVector struct {
ThreadID int64 `json:"thread_id"`
Basis string `json:"basis"`
Model string `json:"model"`
Dimensions int `json:"dimensions"`
ContentHash string `json:"content_hash"`
Vector []float64 `json:"vector"`
Backend string `json:"backend"`
CreatedAt string `json:"created_at"`
UpdatedAt string `json:"updated_at"`
}
Click to show internal directories.
Click to hide internal directories.