Documentation
¶
Overview ¶
Package prompt provides error constructors for prompt template operations.
Index ¶
- func Exists(name string) error
- func ListEntryTemplates(cause error) error
- func ListPromptTemplates(cause error) error
- func ListTemplates(cause error) error
- func MarkerNotFound(kind string) error
- func NoPromptTemplate(name string) error
- func NoTemplate(filename string, cause error) error
- func NotFound(name string) error
- func ReadEntryTemplate(name string, cause error) error
- func ReadPromptTemplate(name string, cause error) error
- func ReadTemplate(name string, cause error) error
- func Remove(cause error) error
- func TemplateMissingMarkers(kind string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Exists ¶
Exists returns an error when a prompt template already exists.
Parameters:
- name: the prompt name that already exists.
Returns:
- error: "prompt <name> already exists"
func ListEntryTemplates ¶
ListEntryTemplates wraps a failure to list entry templates.
Parameters:
- cause: the underlying error
Returns:
- error: "failed to list entry templates: <cause>"
func ListPromptTemplates ¶
ListPromptTemplates wraps a failure to list prompt templates.
Parameters:
- cause: the underlying error
Returns:
- error: "failed to list prompt templates: <cause>"
func ListTemplates ¶
ListTemplates wraps a failure to list embedded templates.
Parameters:
- cause: the underlying error
Returns:
- error: "failed to list templates: <cause>"
func MarkerNotFound ¶
MarkerNotFound returns an error when a section marker is missing.
Parameters:
- kind: marker kind (e.g. "ctx", "plan", "prompt")
Returns:
- error: "<kind> start marker not found"
func NoPromptTemplate ¶
NoPromptTemplate returns an error when no embedded template exists.
Parameters:
- name: the template name that was not found
Returns:
- error: advises the user to use --stdin
func NoTemplate ¶
NoTemplate wraps a failure to find an embedded template.
Parameters:
- filename: Name of the file without a template
- cause: the underlying read error
Returns:
- error: "no template available for <filename>: <cause>"
func NotFound ¶
NotFound returns an error when a prompt template does not exist.
Parameters:
- name: the prompt name that was not found.
Returns:
- error: "prompt <name> not found"
func ReadEntryTemplate ¶
ReadEntryTemplate wraps a failure to read an entry template.
Parameters:
- name: template name that failed to read
- cause: the underlying error
Returns:
- error: "failed to read entry template <name>: <cause>"
func ReadPromptTemplate ¶
ReadPromptTemplate wraps a failure to read a prompt template.
Parameters:
- name: template name that failed to read
- cause: the underlying error
Returns:
- error: "failed to read prompt template <name>: <cause>"
func ReadTemplate ¶
ReadTemplate wraps a failure to read an embedded template.
Parameters:
- name: template name that failed to read
- cause: the underlying error
Returns:
- error: "failed to read template <name>: <cause>"
func Remove ¶
Remove wraps a failure to remove a prompt template.
Parameters:
- cause: the underlying OS error.
Returns:
- error: "remove prompt: <cause>"
func TemplateMissingMarkers ¶
TemplateMissingMarkers returns an error when a template lacks markers.
Parameters:
- kind: marker kind (e.g. "ctx", "plan", "prompt")
Returns:
- error: "template missing <kind> markers"
Types ¶
This section is empty.