compact

package
v0.62.1 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package compact provides AI-powered issue compaction using Claude Haiku.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCurrentCommitHash

func GetCurrentCommitHash() string

GetCurrentCommitHash returns the current git HEAD commit hash for the beads repository. Returns empty string if not in a git repository or if git command fails.

Types

type BatchResult

type BatchResult struct {
	IssueID       string
	OriginalSize  int
	CompactedSize int
	Err           error
}

BatchResult holds the result of a single issue compaction in a batch.

type Compactor

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

Compactor handles issue compaction using AI summarization.

func New

func New(store compactableStore, apiKey string, config *Config) (*Compactor, error)

New creates a new Compactor instance with the given configuration. The store parameter must implement compactableStore interface.

func (*Compactor) CompactTier1

func (c *Compactor) CompactTier1(ctx context.Context, issueID string) error

CompactTier1 compacts a single issue at Tier 1 (basic summarization).

func (*Compactor) CompactTier1Batch

func (c *Compactor) CompactTier1Batch(ctx context.Context, issueIDs []string) ([]BatchResult, error)

CompactTier1Batch compacts multiple issues at Tier 1 concurrently.

type Config

type Config struct {
	APIKey       string
	Concurrency  int
	DryRun       bool
	AuditEnabled bool
	Actor        string
}

Config holds configuration for the compaction process.

Jump to

Keyboard shortcuts

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