Help us shape the future of Go! Take the 2026 Go Developer Survey

prompt

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service interface {
	// GetPrompt returns the raw template content with {{SOUL.MD}} /
	// {{USER.MD}} / {{MEMORY.MD}} placeholders preserved. Intended for
	// the settings UI so edits round-trip without loss.
	GetPrompt(ctx context.Context, key string) (string, error)
	// ResolvePrompt returns the content with all reference placeholders
	// expanded against the latest SOUL / USER / MEMORY values. Runtime
	// consumers (agent session init, IM gateway) must use this instead
	// of GetPrompt so updates to SOUL / USER / MEMORY propagate without
	// requiring users to re-save every dependent prompt.
	ResolvePrompt(ctx context.Context, key string) (string, error)
	// SavePrompt stores the content as-is (raw, with placeholders
	// preserved).
	SavePrompt(ctx context.Context, key string, content string) error
	// PromptFilePath returns the absolute on-disk path used to persist the
	// given prompt key, or "" if the key is not file-backed (e.g. stored in
	// the prompt DB).
	// Callers use this to render "saved to <path>" hints in the UI without
	// the frontend having to know the on-disk layout.
	PromptFilePath(key string) (string, error)
}

func NewService

func NewService() (Service, error)

Jump to

Keyboard shortcuts

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