Documentation
¶
Index ¶
- Constants
- func Register()
- type Provider
- func (m *Provider) ContextWindow(string) int
- func (m *Provider) DefaultModel() string
- func (m *Provider) EstimateTokens(s string) int
- func (m *Provider) Name() string
- func (m *Provider) Pricing(string) provider.Pricing
- func (m *Provider) Review(ctx context.Context, req provider.Request) (provider.Response, error)
- func (m *Provider) TestConnection(ctx context.Context) error
Constants ¶
const DefaultCommitMessage = "feat(store): add user lookup by name\n\nSynthetic commit message from the mock provider."
DefaultCommitMessage is the canned plain-text response the mock returns for a FreeForm request (ADR-0015), exercising the --suggest-commit path.
const DefaultCommitMessages = "feat(store): add user lookup by name\n" +
commitDelimiter + "\nfeat(store): support finding users by their name\n" +
commitDelimiter + "\nfeat: add name-based user lookup to the store"
DefaultCommitMessages is the canned multi-suggestion FreeForm response (ADR-0019 --generate path), returned when the prompt requests delimited messages. Three distinct subjects, delimiter-joined.
const DefaultResponseContent = `` /* 265-byte string literal not displayed */
DefaultResponseContent is the canned JSON the mock provider returns when no override is set on ResponseContent. It matches the ADR-0014 JSON findings schema so the renderer's happy path is exercised end-to-end in any CLI integration test that doesn't explicitly stage its own payload. The single finding's title is "mock review output" — historically asserted by CLI tests that previously expected a plain-text body; the string survives the format change as a finding-title match.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Provider ¶
type Provider struct {
NameValue string
DefaultModelName string
Window int
PricingValue provider.Pricing
ResponseContent string
Latency time.Duration
InputTokens int
OutputTokens int
CachedInput int
// Error injection
ReviewErr error
TestConnErr error
// Call telemetry
ReviewCalls int
TestCalls int
LastRequest provider.Request
// contains filtered or unexported fields
}