shortcuts

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Intent

type Intent string
const (
	IntentNone       Intent = ""
	IntentQuickNote  Intent = "quick_note"
	IntentCopyLast   Intent = "copy_last"
	IntentInsertLast Intent = "insert_last"
	IntentSummarize  Intent = "summarize"
)

type IntentLexicon added in v0.18.0

type IntentLexicon struct {
	Intent  Intent
	Locale  string
	Phrases []Phrase
}

type Phrase added in v0.18.0

type Phrase struct {
	Value    string
	Prefix   bool
	Priority int
}

type Registry added in v0.18.0

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

func DefaultRegistry added in v0.18.0

func DefaultRegistry() *Registry

func NewRegistry added in v0.18.0

func NewRegistry() *Registry

func (*Registry) RegisterLeadingFillers added in v0.18.0

func (r *Registry) RegisterLeadingFillers(locale string, fillers ...string)

func (*Registry) RegisterLexicon added in v0.18.0

func (r *Registry) RegisterLexicon(lexicon IntentLexicon)

type Resolution

type Resolution struct {
	Intent  Intent
	Payload string
	Alias   string
}

func Resolve

func Resolve(text string) Resolution

func ResolveWithLocale added in v0.18.0

func ResolveWithLocale(text, locale string) Resolution

type Resolver added in v0.18.0

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

func DefaultResolver added in v0.18.0

func DefaultResolver() *Resolver

func NewResolver added in v0.18.0

func NewResolver(registry *Registry) *Resolver

func (*Resolver) Resolve added in v0.18.0

func (r *Resolver) Resolve(text, locale string) Resolution

Jump to

Keyboard shortcuts

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