persona

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package persona handles loading and managing persona definitions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager handles persona loading and retrieval.

func NewManager

func NewManager(personaPath string) (*Manager, error)

NewManager creates a new persona manager. If personaPath is empty, creates an empty manager.

func (*Manager) ApplyPersona

func (m *Manager) ApplyPersona(personaName, prompt string) string

ApplyPersona prepends persona content to the given prompt. If persona is empty or not found, returns the original prompt.

func (*Manager) GetPersona

func (m *Manager) GetPersona(name string) string

GetPersona returns the content of a persona by name. Returns empty string if persona not found.

func (*Manager) GetPersonaMCPConfig

func (m *Manager) GetPersonaMCPConfig(name string) string

GetPersonaMCPConfig returns the path to the persona's associated MCP config file. Returns empty string if the persona has no associated MCP config.

func (*Manager) HasPersona

func (m *Manager) HasPersona(name string) bool

HasPersona checks if a persona exists.

func (*Manager) ListPersonas

func (m *Manager) ListPersonas() []string

ListPersonas returns a list of available persona names.

Jump to

Keyboard shortcuts

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