Documentation
¶
Index ¶
- Constants
- func HumanKeyStableSlug(key HumanKey) string
- func StableHash(value string) string
- func SupportsEmbeddingBasis(basis string) bool
- 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 PullRequestCache
- type PullRequestCheck
- type PullRequestCommit
- type PullRequestDetail
- type PullRequestFile
- type PullRequestReviewThread
- 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) LastSuccessfulListSyncAt(ctx context.Context, repoID int64, state string) (time.Time, 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) ListComments(ctx context.Context, threadID int64) ([]Comment, 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) ListWorkflowRuns(ctx context.Context, repoID int64, options WorkflowRunListOptions) ([]WorkflowRun, 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) PullRequestCache(ctx context.Context, repoID int64, number int) (PullRequestCache, error)
- func (s *Store) PullRequestChecks(ctx context.Context, threadID int64) ([]PullRequestCheck, error)
- func (s *Store) PullRequestCommits(ctx context.Context, threadID int64) ([]PullRequestCommit, error)
- func (s *Store) PullRequestFiles(ctx context.Context, threadID int64) ([]PullRequestFile, error)
- func (s *Store) PullRequestReviewThreads(ctx context.Context, threadID int64) ([]PullRequestReviewThread, error)
- func (s *Store) PullRequestReviewThreadsFetchedAt(ctx context.Context, threadID int64) (string, 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) SaveCompleteDurableClusters(ctx context.Context, repoID int64, inputs []DurableClusterInput) (SaveDurableClustersResult, 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) UpsertPullRequestCache(ctx context.Context, detail PullRequestDetail, files []PullRequestFile, ...) error
- func (s *Store) UpsertPullRequestReviewThreads(ctx context.Context, threadID int64, fetchedAt string, ...) 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
- type WorkflowRun
- type WorkflowRunListOptions
Constants ¶
View Source
const ( ClusterSourceRun = "run_cluster" ClusterSourceDurable = "durable_cluster" )
View Source
const ( MaxEmbeddingTextRunes = 6_000 MaxEmbeddingTextBytes = 7_000 )
Variables ¶
This section is empty.
Functions ¶
func HumanKeyStableSlug ¶
func StableHash ¶
func SupportsEmbeddingBasis ¶ added in v0.4.0
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 EmbeddingTask struct {
ThreadID int64 `json:"thread_id"`
Number int `json:"number"`
Kind string `json:"kind"`
Title string `json:"title"`
Text string `json:"-"`
ContentHash string `json:"content_hash"`
TextTruncated bool `json:"text_truncated,omitempty"`
OriginalTextRunes int `json:"original_text_runes,omitempty"`
TextRunes int `json:"text_runes,omitempty"`
}
type EmbeddingTaskOptions ¶
type PortablePruneOptions ¶
type PortablePruneStats ¶
type PortablePruneStats struct {
DBPath string `json:"db_path"`
ManifestPath string `json:"manifest_path,omitempty"`
SHA256 string `json:"sha256,omitempty"`
BodyChars int `json:"body_chars"`
BytesBefore int64 `json:"bytes_before"`
BytesAfter int64 `json:"bytes_after"`
QuickCheck string `json:"quick_check,omitempty"`
ThreadsPruned int64 `json:"threads_pruned"`
CommentsPruned int64 `json:"comments_pruned"`
RepositoriesPruned int64 `json:"repositories_pruned"`
RawJSONPruned int64 `json:"raw_json_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 PullRequestCache ¶ added in v0.2.0
type PullRequestCache struct {
Detail PullRequestDetail `json:"detail"`
Files []PullRequestFile `json:"files"`
Commits []PullRequestCommit `json:"commits"`
Checks []PullRequestCheck `json:"checks"`
}
type PullRequestCheck ¶ added in v0.2.0
type PullRequestCheck struct {
ID int64 `json:"id"`
ThreadID int64 `json:"thread_id"`
Name string `json:"name"`
Status string `json:"status,omitempty"`
Conclusion string `json:"conclusion,omitempty"`
DetailsURL string `json:"details_url,omitempty"`
WorkflowName string `json:"workflow_name,omitempty"`
StartedAt string `json:"started_at,omitempty"`
CompletedAt string `json:"completed_at,omitempty"`
RawJSON string `json:"raw_json,omitempty"`
FetchedAt string `json:"fetched_at"`
}
type PullRequestCommit ¶ added in v0.2.0
type PullRequestCommit struct {
ThreadID int64 `json:"thread_id"`
SHA string `json:"sha"`
Message string `json:"message,omitempty"`
AuthorLogin string `json:"author_login,omitempty"`
AuthorName string `json:"author_name,omitempty"`
CommittedAt string `json:"committed_at,omitempty"`
HTMLURL string `json:"html_url,omitempty"`
RawJSON string `json:"raw_json,omitempty"`
FetchedAt string `json:"fetched_at"`
}
type PullRequestDetail ¶ added in v0.2.0
type PullRequestDetail struct {
ThreadID int64 `json:"thread_id"`
RepoID int64 `json:"repo_id"`
Number int `json:"number"`
BaseSHA string `json:"base_sha,omitempty"`
HeadSHA string `json:"head_sha,omitempty"`
HeadRef string `json:"head_ref,omitempty"`
HeadRepoFullName string `json:"head_repo_full_name,omitempty"`
MergeableState string `json:"mergeable_state,omitempty"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
ChangedFiles int `json:"changed_files"`
RawJSON string `json:"raw_json,omitempty"`
FetchedAt string `json:"fetched_at"`
UpdatedAt string `json:"updated_at"`
}
type PullRequestFile ¶ added in v0.2.0
type PullRequestFile struct {
ThreadID int64 `json:"thread_id"`
Path string `json:"path"`
Status string `json:"status,omitempty"`
Additions int `json:"additions"`
Deletions int `json:"deletions"`
Changes int `json:"changes"`
PreviousPath string `json:"previous_path,omitempty"`
Patch string `json:"patch,omitempty"`
RawJSON string `json:"raw_json,omitempty"`
FetchedAt string `json:"fetched_at"`
}
type PullRequestReviewThread ¶ added in v0.3.3
type PullRequestReviewThread struct {
ThreadID int64 `json:"thread_id"`
ReviewThreadID string `json:"id"`
Path string `json:"path,omitempty"`
Line int `json:"line,omitempty"`
StartLine int `json:"start_line,omitempty"`
IsResolved bool `json:"is_resolved"`
IsOutdated bool `json:"is_outdated"`
ViewerCanResolve bool `json:"viewer_can_resolve"`
ViewerCanUnresolve bool `json:"viewer_can_unresolve"`
ViewerCanReply bool `json:"viewer_can_reply"`
FirstAuthorLogin string `json:"first_author_login,omitempty"`
FirstAuthorType string `json:"first_author_type,omitempty"`
FirstCommentBody string `json:"first_comment_body,omitempty"`
FirstCommentURL string `json:"first_comment_url,omitempty"`
FirstCommentCreatedAt string `json:"first_comment_created_at,omitempty"`
FirstCommentUpdatedAt string `json:"first_comment_updated_at,omitempty"`
CommentsJSON string `json:"comments_json"`
RawJSON string `json:"-"`
FetchedAt string `json:"fetched_at"`
}
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 SearchHit ¶
type SearchHit struct {
ThreadID int64 `json:"thread_id"`
Number int `json:"number"`
Kind string `json:"kind"`
State string `json:"state"`
Title string `json:"title"`
HTMLURL string `json:"html_url"`
AuthorLogin string `json:"author_login,omitempty"`
Snippet string `json:"snippet"`
Score float64 `json:"score,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) LastSuccessfulListSyncAt ¶ added in v0.3.1
func (*Store) LastSuccessfulSyncAt ¶
func (*Store) ListClusterSummaries ¶
func (s *Store) ListClusterSummaries(ctx context.Context, options ClusterSummaryOptions) ([]ClusterSummary, error)
func (*Store) ListComments ¶ added in v0.2.0
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) ListWorkflowRuns ¶ added in v0.2.0
func (s *Store) ListWorkflowRuns(ctx context.Context, repoID int64, options WorkflowRunListOptions) ([]WorkflowRun, error)
func (*Store) MarkOpenThreadClosedFromGitHub ¶
func (*Store) PrunePortablePayloads ¶
func (s *Store) PrunePortablePayloads(ctx context.Context, options PortablePruneOptions) (PortablePruneStats, error)
func (*Store) PullRequestCache ¶ added in v0.2.0
func (*Store) PullRequestChecks ¶ added in v0.2.0
func (*Store) PullRequestCommits ¶ added in v0.2.0
func (*Store) PullRequestFiles ¶ added in v0.2.0
func (*Store) PullRequestReviewThreads ¶ added in v0.3.3
func (*Store) PullRequestReviewThreadsFetchedAt ¶ added in v0.3.3
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) SaveCompleteDurableClusters ¶ added in v0.4.0
func (s *Store) SaveCompleteDurableClusters(ctx context.Context, repoID int64, inputs []DurableClusterInput) (SaveDurableClustersResult, 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) UpsertPullRequestCache ¶ added in v0.2.0
func (s *Store) UpsertPullRequestCache(ctx context.Context, detail PullRequestDetail, files []PullRequestFile, commits []PullRequestCommit, checks []PullRequestCheck, runs []WorkflowRun) error
func (*Store) UpsertPullRequestReviewThreads ¶ added in v0.3.3
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"`
}
type ThreadVectorQuery ¶
type WorkflowRun ¶ added in v0.2.0
type WorkflowRun struct {
RepoID int64 `json:"repo_id"`
RunID string `json:"run_id"`
RunNumber int `json:"run_number"`
HeadBranch string `json:"head_branch,omitempty"`
HeadSHA string `json:"head_sha,omitempty"`
Status string `json:"status,omitempty"`
Conclusion string `json:"conclusion,omitempty"`
WorkflowName string `json:"workflow_name,omitempty"`
Event string `json:"event,omitempty"`
HTMLURL string `json:"html_url,omitempty"`
CreatedAtGH string `json:"created_at_gh,omitempty"`
UpdatedAtGH string `json:"updated_at_gh,omitempty"`
RawJSON string `json:"raw_json,omitempty"`
FetchedAt string `json:"fetched_at"`
}
type WorkflowRunListOptions ¶ added in v0.2.0
Source Files
¶
Click to show internal directories.
Click to hide internal directories.