testutil

package
v0.12.1 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockAIClient

type MockAIClient struct {
	ProviderNameVal        string
	GetCommitMessageFunc   func(ctx context.Context, prompt string) (string, error)
	SanitizeResponseFunc   func(message, commitType string) string
	MaybeSummarizeDiffFunc func(diff string, maxLength int) (string, bool)
}

MockAIClient is a configurable mock for ai.AIClient.

func (*MockAIClient) GetCommitMessage

func (m *MockAIClient) GetCommitMessage(ctx context.Context, prompt string) (string, error)

func (*MockAIClient) MaybeSummarizeDiff

func (m *MockAIClient) MaybeSummarizeDiff(diff string, maxLength int) (string, bool)

func (*MockAIClient) ProviderName

func (m *MockAIClient) ProviderName() string

func (*MockAIClient) SanitizeResponse

func (m *MockAIClient) SanitizeResponse(message, commitType string) string

Jump to

Keyboard shortcuts

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