Pure lifecycle owner for activation of the full-screen agent presentation.
Activation records one coherent editor return target and saved layout. Completion or cancellation deactivates the presentation and clears every activation-local field together, preventing stale return targets or key prefixes from leaking into a replacement activation.
Summary
Functions
Activates or replaces the presentation's complete return context.
Returns whether the agent presentation is active.
Cancels presentation use with the same cleanup guarantee as completion.
Completes presentation use and returns the layout to restore.
Returns the focused agent panel.
Switches keyboard focus inside the agent presentation.
Installs a pending multi-key prefix.
Returns the pending multi-key prefix.
Replaces the editor return target for the active presentation.
Clears a pending multi-key prefix.
Returns the editor return target.
Types
@type focus() :: :chat | :file_viewer
@type prefix() :: nil | :g | :z | :bracket_next | :bracket_prev | Minga.Keymap.Bindings.Node.t()
@type t() :: %MingaEditor.Agent.UIState.Presentation{ active: boolean(), focus: focus(), pending_prefix: prefix(), return_target: MingaEditor.Agent.UIState.ReturnTarget.t() | nil, saved_file_tree: MingaEditor.State.FileTree.t() | nil, saved_windows: MingaEditor.State.Windows.t() | nil }
Functions
@spec activate( t(), MingaEditor.State.Windows.t() | nil, MingaEditor.State.FileTree.t() | nil, MingaEditor.Agent.UIState.ReturnTarget.t() | nil ) :: t()
Activates or replaces the presentation's complete return context.
Returns whether the agent presentation is active.
@spec cancel(t()) :: {t(), MingaEditor.State.Windows.t() | nil, MingaEditor.State.FileTree.t() | nil}
Cancels presentation use with the same cleanup guarantee as completion.
@spec complete(t()) :: {t(), MingaEditor.State.Windows.t() | nil, MingaEditor.State.FileTree.t() | nil}
Completes presentation use and returns the layout to restore.
Returns the focused agent panel.
Switches keyboard focus inside the agent presentation.
Installs a pending multi-key prefix.
Returns the pending multi-key prefix.
@spec replace_return_target(t(), MingaEditor.Agent.UIState.ReturnTarget.t() | nil) :: t()
Replaces the editor return target for the active presentation.
Clears a pending multi-key prefix.
@spec return_target(t()) :: MingaEditor.Agent.UIState.ReturnTarget.t() | nil
Returns the editor return target.