prompt

package
v0.8.0 Latest Latest
Warning

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

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

Documentation

Overview

Package prompt provides error constructors for prompt template operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(name string) error

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

func ListEntryTemplates(cause error) error

ListEntryTemplates wraps a failure to list entry templates.

Parameters:

  • cause: the underlying error

Returns:

  • error: "failed to list entry templates: <cause>"

func ListPromptTemplates

func ListPromptTemplates(cause error) error

ListPromptTemplates wraps a failure to list prompt templates.

Parameters:

  • cause: the underlying error

Returns:

  • error: "failed to list prompt templates: <cause>"

func ListTemplates

func ListTemplates(cause error) error

ListTemplates wraps a failure to list embedded templates.

Parameters:

  • cause: the underlying error

Returns:

  • error: "failed to list templates: <cause>"

func MarkerNotFound

func MarkerNotFound(kind string) error

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

func NoPromptTemplate(name string) error

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

func NoTemplate(filename string, cause error) error

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

func NotFound(name string) error

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

func ReadEntryTemplate(name string, cause error) error

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

func ReadPromptTemplate(name string, cause error) error

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

func ReadTemplate(name string, cause error) error

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

func Remove(cause error) error

Remove wraps a failure to remove a prompt template.

Parameters:

  • cause: the underlying OS error.

Returns:

  • error: "remove prompt: <cause>"

func TemplateMissingMarkers

func TemplateMissingMarkers(kind string) error

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.

Jump to

Keyboard shortcuts

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