ai

package
v1.209.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultMaxContextFiles is the default maximum number of stack files to include in AI context.
	DefaultMaxContextFiles = 10
	// DefaultMaxContextLines is the default maximum number of lines per stack file in AI context.
	DefaultMaxContextLines = 500
)

Variables

This section is empty.

Functions

func GatherStackContext

func GatherStackContext(atmosConfig *schema.AtmosConfiguration) (string, error)

GatherStackContext reads stack configurations and returns them as context for AI.

func GetProviderConfig

func GetProviderConfig(atmosConfig *schema.AtmosConfiguration, provider string) (*schema.AIProviderConfig, error)

GetProviderConfig returns the configuration for a specific provider.

func PromptForConsent

func PromptForConsent() (bool, error)

PromptForConsent asks the user for consent to send context to AI.

func QuestionNeedsContext

func QuestionNeedsContext(question string) bool

QuestionNeedsContext determines if a question likely needs repository context.

func RedactSecrets

func RedactSecrets(text string) string

ReductSecrets replaces sensitive information with a masked value.

func SanitizeContext

func SanitizeContext(context string) string

SanitizeContext removes sensitive information from context before sending to AI.

func ShouldSendContext

func ShouldSendContext(atmosConfig *schema.AtmosConfiguration, question string) (bool, bool, error)

ShouldSendContext determines if context should be sent based on configuration and environment.

Types

type Client

type Client = registry.Client

Client is the AI client interface. It is an alias to registry.Client to maintain backward compatibility.

func NewClient

func NewClient(atmosConfig *schema.AtmosConfiguration) (Client, error)

NewClient creates a new AI client based on the provider configuration.

func NewClientWithContext

func NewClientWithContext(ctx context.Context, atmosConfig *schema.AtmosConfiguration) (Client, error)

NewClientWithContext creates a new AI client with the given context.

Directories

Path Synopsis
agent
base
Package base provides shared utilities for AI provider implementations.
Package base provides shared utilities for AI provider implementations.
base/openaicompat
Package openaicompat provides shared utilities for OpenAI-compatible API providers.
Package openaicompat provides shared utilities for OpenAI-compatible API providers.
Package registry provides the AI provider registry for client creation.
Package registry provides the AI provider registry for client creation.

Jump to

Keyboard shortcuts

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