prompt

package
v0.16.3 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const MaxPromptSize = 250 * 1024

MaxPromptSize is the maximum size of a prompt in bytes (250KB) If the prompt with diffs exceeds this, we fall back to just commit info

View Source
const PreviousAttemptsForCommitHeader = `` /* 355-byte string literal not displayed */

PreviousAttemptsForCommitHeader introduces previous review attempts for the same commit

View Source
const PreviousAttemptsHeader = `` /* 357-byte string literal not displayed */

PreviousAttemptsHeader introduces previous addressing attempts section

View Source
const PreviousReviewsHeader = `` /* 478-byte string literal not displayed */

PreviousReviewsHeader introduces the previous reviews section

View Source
const ProjectGuidelinesHeader = `` /* 202-byte string literal not displayed */

ProjectGuidelinesHeader introduces the project-specific guidelines section

View Source
const SystemPromptAddress = `` /* 1018-byte string literal not displayed */

SystemPromptAddress is the instruction for addressing review findings

View Source
const SystemPromptDirty = `` /* 789-byte string literal not displayed */

SystemPromptDirty is the base instruction for reviewing uncommitted (dirty) changes

View Source
const SystemPromptRange = `` /* 875-byte string literal not displayed */

SystemPromptRange is the base instruction for commit range reviews

View Source
const SystemPromptSingle = `` /* 870-byte string literal not displayed */

SystemPromptSingle is the base instruction for single commit reviews

Variables

This section is empty.

Functions

func BuildSimple

func BuildSimple(repoPath, sha, agentName string) (string, error)

BuildSimple constructs a simpler prompt without database context

Types

type Builder

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

Builder constructs review prompts

func NewBuilder

func NewBuilder(db *storage.DB) *Builder

NewBuilder creates a new prompt builder

func (*Builder) Build

func (b *Builder) Build(repoPath, gitRef string, repoID int64, contextCount int, agentName string) (string, error)

Build constructs a review prompt for a commit or range with context from previous reviews

func (*Builder) BuildAddressPrompt

func (b *Builder) BuildAddressPrompt(repoPath string, review *storage.Review, previousAttempts []storage.Response) (string, error)

BuildAddressPrompt constructs a prompt for addressing review findings

func (*Builder) BuildDirty

func (b *Builder) BuildDirty(repoPath, diff string, repoID int64, contextCount int, agentName string) (string, error)

BuildDirty constructs a review prompt for uncommitted (dirty) changes. The diff is provided directly since it was captured at enqueue time.

type ReviewContext

type ReviewContext struct {
	SHA       string
	Review    *storage.Review
	Responses []storage.Response
}

ReviewContext holds a commit SHA and its associated review (if any) plus responses

Jump to

Keyboard shortcuts

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