Documentation
¶
Index ¶
- Constants
- func GatherStackContext(atmosConfig *schema.AtmosConfiguration) (string, error)
- func GetProviderConfig(atmosConfig *schema.AtmosConfiguration, provider string) (*schema.AIProviderConfig, error)
- func PromptForConsent() (bool, error)
- func QuestionNeedsContext(question string) bool
- func RedactSecrets(text string) string
- func SanitizeContext(context string) string
- func ShouldSendContext(atmosConfig *schema.AtmosConfiguration, question string) (bool, bool, error)
- type Client
Constants ¶
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 ¶
PromptForConsent asks the user for consent to send context to AI.
func QuestionNeedsContext ¶
QuestionNeedsContext determines if a question likely needs repository context.
func RedactSecrets ¶
ReductSecrets replaces sensitive information with a masked value.
func SanitizeContext ¶
SanitizeContext removes sensitive information from context before sending to AI.
func ShouldSendContext ¶
ShouldSendContext determines if context should be sent based on configuration and environment.
Types ¶
type 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. |