mock

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: May 13, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockProvider

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

func New

func New(model string) *MockProvider

func NewFromSteps

func NewFromSteps(steps []Step) *MockProvider

func (*MockProvider) CreateMessage

func (m *MockProvider) CreateMessage(ctx context.Context, req llm.ChatRequest) (llm.Message, error)

func (*MockProvider) Model

func (m *MockProvider) Model() string

func (*MockProvider) SetWorkspace

func (m *MockProvider) SetWorkspace(dir string)

func (*MockProvider) StreamMessage

func (m *MockProvider) StreamMessage(ctx context.Context, req llm.ChatRequest, onDelta func(string)) (llm.Message, error)

type ReadAndReplaceStep

type ReadAndReplaceStep struct {
	Path     string
	OldLine  string // exact line to find (must match end of the actual file line)
	NewLines string // replacement text
}

type Step

type Step struct {
	Type    StepType
	Tool    *ToolCallStep
	Text    string
	Replace *ReadAndReplaceStep
}

type StepType

type StepType int
const (
	StepToolCall StepType = iota
	StepText
	// StepReadAndReplace reads a file and constructs replace_in_file args at runtime
	StepReadAndReplace
)

type ToolCallStep

type ToolCallStep struct {
	Name      string
	Arguments string
}

Jump to

Keyboard shortcuts

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