Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetActiveVersion ¶
GetActiveVersion returns the active version from versions.json
func ListVersions ¶
ListVersions returns all available prompt versions
func LoadPrompt ¶
LoadPrompt loads a prompt by version string. If version is empty or "latest", uses the active version from versions.json. Returns the prompt content as a string.
func LoadPromptWithVersion ¶ added in v0.14.2
LoadPromptWithVersion loads a prompt by version string and returns the resolved version ID. If version is empty or "latest", the active version is used and its ID is returned. Returns (content, versionUsed, error).
func SetEmbeddedFS ¶
SetEmbeddedFS sets the embedded filesystem for prompts This should be called from main() with the embedded FS
Types ¶
type VersionMetadata ¶
type VersionMetadata struct {
File string `json:"file"`
Hash string `json:"hash"`
Description string `json:"description"`
Created string `json:"created"`
Tags []string `json:"tags"`
Notes string `json:"notes"`
}
VersionMetadata represents metadata for a prompt version
func GetVersionMetadata ¶
func GetVersionMetadata(version string) (*VersionMetadata, error)
GetVersionMetadata returns metadata for a specific version
type VersionsManifest ¶
type VersionsManifest struct {
SchemaVersion string `json:"schema_version"`
Versions map[string]VersionMetadata `json:"versions"`
Active string `json:"active"`
Notes []string `json:"notes"`
}
VersionsManifest represents the versions.json file structure