Documentation
¶
Index ¶
- func DeriveOwner(action keybindings.Action) string
- func IsRevisionsOwner(owner string) bool
- type Continuation
- type Dispatcher
- type IntentOverride
- type ResolveResult
- type Resolver
- func (r *Resolver) ResetSequence()
- func (r *Resolver) ResolveAction(action keybindings.Action, args map[string]any, override IntentOverride) Result
- func (r *Resolver) ResolveBuiltInAction(action keybindings.Action, args map[string]any, override IntentOverride) Result
- func (r *Resolver) ResolveKey(msg tea.KeyMsg, scopes []keybindings.Scope, override IntentOverride) Result
- type Result
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeriveOwner ¶
func DeriveOwner(action keybindings.Action) string
DeriveOwner determines the intent owner from generated built-in metadata. Non-built-in actions have no owner.
func IsRevisionsOwner ¶
IsRevisionsOwner returns true if the owner routes to the revisions model.
Types ¶
type Continuation ¶
Continuation describes possible next keys while in sequence mode.
type Dispatcher ¶
type Dispatcher struct {
// contains filtered or unexported fields
}
Dispatcher resolves key presses against active scopes and bindings.
func NewDispatcher ¶
func NewDispatcher(availableBindings []bindings.Binding) (*Dispatcher, error)
func (*Dispatcher) ResetSequence ¶
func (d *Dispatcher) ResetSequence()
func (*Dispatcher) Resolve ¶
func (d *Dispatcher) Resolve(msg tea.KeyMsg, scopes []bindings.Scope) ResolveResult
Resolve applies dispatch rules for a key in the provided scope chain. Scopes must be ordered from innermost to outermost.
type IntentOverride ¶
IntentOverride lets the caller (e.g. active operation) override the default action-to-intent mapping.
type ResolveResult ¶
type ResolveResult struct {
Action bindings.Action
Scope bindings.Scope
Args map[string]any
Pending bool
Consumed bool
Continuations []Continuation
}
ResolveResult is the outcome of resolving a key press.
type Resolver ¶
type Resolver struct {
// contains filtered or unexported fields
}
Resolver wraps a Dispatcher and extends the pipeline to resolve keys all the way to intents and owners.
func NewResolver ¶
func NewResolver(d *Dispatcher, configured map[keybindings.Action]config.ActionConfig) *Resolver
NewResolver creates a Resolver that wraps the given dispatcher.
func (*Resolver) ResetSequence ¶
func (r *Resolver) ResetSequence()
ResetSequence resets any in-progress key sequence.
func (*Resolver) ResolveAction ¶
func (r *Resolver) ResolveAction(action keybindings.Action, args map[string]any, override IntentOverride) Result
ResolveAction resolves a dispatched action through configured-action aliasing and intent resolution.
func (*Resolver) ResolveBuiltInAction ¶
func (r *Resolver) ResolveBuiltInAction(action keybindings.Action, args map[string]any, override IntentOverride) Result
ResolveBuiltInAction resolves an action while skipping configured Lua overrides.
func (*Resolver) ResolveKey ¶
func (r *Resolver) ResolveKey(msg tea.KeyMsg, scopes []keybindings.Scope, override IntentOverride) Result
ResolveKey resolves a key press through the full pipeline: key → binding → action → intent.