utils

package
v1.8.1 Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConfirmAdditinalContext added in v1.7.6

func ConfirmAdditinalContext() (bool, error)

ConfirmAdditinalContext prompts the user to accept or reject additional context

func ConfirmPrompt added in v1.3.0

func ConfirmPrompt(path string) (bool, error)

ConfirmPrompt prompts the user to accept or reject the changes in a file path

func DetectLanguageFromCodeBlock added in v1.3.3

func DetectLanguageFromCodeBlock(content string) string

func GetGitignorePatterns

func GetGitignorePatterns(cwd string) ([]string, error)

GetGitignorePatterns reads and returns the patterns from the .gitignore file. If the file does not exist, it returns an empty pattern list.

func GetSupportedLanguage

func GetSupportedLanguage(path string) string

func GracefulShutdown

func GracefulShutdown(ctx context.Context, stop context.CancelFunc, cleanup func())

func InputPrompt added in v1.3.0

func InputPrompt(reader *bufio.Reader) (string, error)

InputPrompt prompts the user to enter their request for code assistance in a charming way

func IsDefaultIgnored

func IsDefaultIgnored(path string) bool

func IsGitIgnored

func IsGitIgnored(path string, patterns []string) bool

IsGitIgnored checks if a file path matches any of the patterns in .gitignore.

func RenderAndPrintMarkdown added in v1.3.0

func RenderAndPrintMarkdown(content string, language string, theme string) error

RenderAndPrintMarkdown handles the rendering of markdown content,

Types

This section is empty.

Jump to

Keyboard shortcuts

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