prompt

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: BSD-2-Clause Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Content

func Content(ctx context.Context, path string) (string, error)

Content returns the full file content for passing to Docker.

func MoveToCompleted

func MoveToCompleted(ctx context.Context, path string) error

MoveToCompleted moves a prompt file to the completed/ subdirectory.

func SetStatus

func SetStatus(ctx context.Context, path string, status string) error

SetStatus updates the status field in a prompt file's frontmatter.

func Title

func Title(ctx context.Context, path string) (string, error)

Title extracts the first # heading from a prompt file (below frontmatter).

Types

type Frontmatter

type Frontmatter struct {
	Status string `yaml:"status"`
}

Frontmatter represents the YAML frontmatter in a prompt file.

func ReadFrontmatter added in v0.2.0

func ReadFrontmatter(ctx context.Context, path string) (*Frontmatter, error)

ReadFrontmatter reads frontmatter from a file.

type Prompt

type Prompt struct {
	Path   string
	Status string
}

Prompt represents a prompt file with YAML frontmatter.

func ListQueued

func ListQueued(ctx context.Context, dir string) ([]Prompt, error)

ListQueued scans a directory for .md files with status: queued in frontmatter, sorted alphabetically by filename.

Jump to

Keyboard shortcuts

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