prompt

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultTemplate = `` /* 677-byte string literal not displayed */

DefaultTemplate is the built-in journal entry prompt

Variables

This section is empty.

Functions

func Render

func Render(tmpl string, ctx *Context) (string, error)

Render executes a template string with the given context

func RenderDefault

func RenderDefault(ctx *Context) (string, error)

RenderDefault renders the default template with the given context

Types

type Context

type Context struct {
	Persona       string
	Timestamp     time.Time
	Uptime        string
	CPUPercent    float64
	MemoryPercent float64
	MemoryUsedGB  float64
	MemoryTotalGB float64
	DiskPercent   float64
	DiskUsedGB    float64
	DiskTotalGB   float64
}

Context holds all the data available to a prompt template

func NewContext

func NewContext(personaDescription string, snapshot *metrics.Snapshot) *Context

NewContext creates a prompt context from a persona description and metrics snapshot

Jump to

Keyboard shortcuts

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