prompts

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Loader

type Loader struct{}

Loader handles loading prompts from files

func New

func New() *Loader

New creates a new prompt loader

func (*Loader) GetBuiltinPrompts

func (l *Loader) GetBuiltinPrompts() map[string]string

GetBuiltinPrompts returns a list of built-in prompt templates

func (*Loader) GetTemplate

func (l *Loader) GetTemplate(name string) (string, error)

GetTemplate returns a specific built-in template

func (*Loader) ListTemplates

func (l *Loader) ListTemplates() []string

ListTemplates returns the names of all built-in templates

func (*Loader) LoadPrompt

func (l *Loader) LoadPrompt(promptPath string, variables map[string]string) (string, error)

LoadPrompt loads a prompt from a file with variable substitution

func (*Loader) SaveBuiltinPrompt

func (l *Loader) SaveBuiltinPrompt(name, outputPath string) error

SaveBuiltinPrompt saves a built-in prompt template to file

func (*Loader) ValidatePromptFile

func (l *Loader) ValidatePromptFile(path string) error

ValidatePromptFile checks if a prompt file exists and is readable

Jump to

Keyboard shortcuts

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