aipair

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2026 License: MIT Imports: 15 Imported by: 0

Documentation

Overview

Package aipair implements an interactive streaming AI coding assistant REPL scoped to a specific task. It is the backend for the `cloop ai-pair` command.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Message

type Message struct {
	Role    string // "user" or "assistant"
	Content string
}

Message is a single turn in the conversation history.

type Session

type Session struct {
	State   *state.ProjectState
	Plan    *pm.Plan
	Prov    provider.Provider
	Model   string
	Timeout time.Duration
	WorkDir string

	// OnSave is called after mutations that change the plan state.
	OnSave func() error
	// contains filtered or unexported fields
}

Session holds all state for a running ai-pair session.

func New

func New(s *state.ProjectState, prov provider.Provider, model, workDir string, taskID int) (*Session, error)

New creates a Session scoped to the given task ID. If taskID is 0 the first pending/in-progress task is used.

func (*Session) Run

func (sess *Session) Run(ctx context.Context, in io.Reader, out io.Writer) error

Run starts the interactive REPL, reading from in and writing to out. It returns when the user types /quit or in reaches EOF.

Jump to

Keyboard shortcuts

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