projectcontext

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxItems = 8
	MaxItems        = 25
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildRequest

type BuildRequest struct {
	ProjectID       string   `json:"project_id,omitempty"`
	Query           string   `json:"query,omitempty"`
	PathPrefix      string   `json:"path_prefix,omitempty"`
	ChangedPaths    []string `json:"changed_paths,omitempty"`
	DiffScope       string   `json:"diff_scope,omitempty"`
	MaxDiffBytes    int      `json:"max_diff_bytes,omitempty"`
	MaxItems        int      `json:"max_items,omitempty"`
	MaxSnippetBytes int      `json:"max_snippet_bytes,omitempty"`
	IncludeImpact   bool     `json:"include_impact"`
}

type ContextPack

type ContextPack struct {
	ProjectID    string                              `json:"project_id"`
	Query        string                              `json:"query,omitempty"`
	PathPrefix   string                              `json:"path_prefix,omitempty"`
	ChangedPaths []string                            `json:"changed_paths,omitempty"`
	Limits       Limits                              `json:"limits"`
	TextHits     []projectingestion.TextSearchResult `json:"text_hits,omitempty"`
	Files        []projectingestion.FileMetadata     `json:"files,omitempty"`
	Symbols      []projectingestion.SymbolMetadata   `json:"symbols,omitempty"`
	Impact       *projectreliability.ImpactAnalysis  `json:"impact,omitempty"`
	Manifest     ContextPackManifest                 `json:"manifest"`
	Partial      bool                                `json:"partial,omitempty"`
	Warnings     []string                            `json:"warnings,omitempty"`
	Limitations  []string                            `json:"limitations,omitempty"`
}

type ContextPackManifest added in v0.1.12

type ContextPackManifest struct {
	Version             string                  `json:"version"`
	GeneratedAt         time.Time               `json:"generated_at"`
	Mode                string                  `json:"mode"`
	ProjectID           string                  `json:"project_id"`
	Query               string                  `json:"query,omitempty"`
	PathPrefix          string                  `json:"path_prefix,omitempty"`
	ChangedPaths        []string                `json:"changed_paths,omitempty"`
	GraphStatus         string                  `json:"graph_status"`
	SearchIndexStatuses []SearchIndexSnapshot   `json:"search_index_statuses,omitempty"`
	FileIDs             []string                `json:"file_ids,omitempty"`
	SymbolIDs           []string                `json:"symbol_ids,omitempty"`
	ChunkIDs            []string                `json:"chunk_ids,omitempty"`
	FileTimestamps      []FileTimestampSnapshot `json:"file_timestamps,omitempty"`
	RedactedHashes      []RedactedHash          `json:"redacted_hashes,omitempty"`
	ContainsSource      bool                    `json:"contains_source"`
	ExportMode          string                  `json:"export_mode"`
	Warnings            []string                `json:"warnings,omitempty"`
	Limitations         []string                `json:"limitations,omitempty"`
}

type FileTimestampSnapshot added in v0.1.12

type FileTimestampSnapshot struct {
	FileID     string    `json:"file_id"`
	ModifiedAt time.Time `json:"modified_at"`
}

type Limits

type Limits struct {
	MaxItems        int `json:"max_items"`
	MaxSnippetBytes int `json:"max_snippet_bytes"`
}

type RedactedHash added in v0.1.12

type RedactedHash struct {
	Kind  string `json:"kind"`
	Value string `json:"value"`
}

type SearchIndexSnapshot added in v0.1.12

type SearchIndexSnapshot struct {
	Source         string `json:"source"`
	IndexStatus    string `json:"index_status"`
	IngestionRunID string `json:"ingestion_run_id,omitempty"`
	Degraded       bool   `json:"degraded,omitempty"`
	DegradedReason string `json:"degraded_reason,omitempty"`
}

type Service

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

func NewService

func NewService(ingestion Ingestion, impact ImpactAnalyzer) *Service

func (*Service) Build

func (service *Service) Build(ctx context.Context, request BuildRequest) (ContextPack, error)

Jump to

Keyboard shortcuts

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