sight

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 12, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

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

Bridge connects hawk to the sight code-review library. If initialization fails, all operations degrade gracefully and return empty results rather than errors.

func NewBridge

func NewBridge(c *client.EyrieClient, provider string, opts ...sightLib.Option) *Bridge

NewBridge creates a bridge to the sight library using the given eyrie client and provider name. Additional sight options (model, concerns, etc.) are applied to all operations.

func (*Bridge) Describe

func (b *Bridge) Describe(ctx context.Context, diff string) (*sightLib.Description, error)

Describe generates a PR description from a unified diff string. Falls back silently if the bridge is not initialized.

func (*Bridge) Improve

func (b *Bridge) Improve(ctx context.Context, diff string) (*sightLib.ImproveResult, error)

Improve analyzes a diff and suggests code improvements. Falls back silently if the bridge is not initialized.

func (*Bridge) Ready

func (b *Bridge) Ready() bool

Ready reports whether the sight bridge is initialized and usable.

func (*Bridge) Review

func (b *Bridge) Review(ctx context.Context, diff string) (*sightLib.Result, error)

Review performs an AI-powered code review on a unified diff string. Falls back silently if the bridge is not initialized.

type EyrieAdapter

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

EyrieAdapter implements sight's Provider interface using hawk's eyrie client. It translates between sight.Message/sight.ChatOpts and eyrie's client.EyrieMessage/client.ChatOptions.

func NewEyrieAdapter

func NewEyrieAdapter(c *client.EyrieClient, provider string) *EyrieAdapter

NewEyrieAdapter creates an adapter that satisfies sight.Provider using the given eyrie client and provider name (e.g. "anthropic", "openai").

func (*EyrieAdapter) Chat

func (a *EyrieAdapter) Chat(ctx context.Context, messages []sightLib.Message, opts sightLib.ChatOpts) (*sightLib.Response, error)

Chat translates a sight LLM request into an eyrie call and returns the result in sight's Response format.

Jump to

Keyboard shortcuts

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