Direct accessors for agent state on EditorState.
Agent lifecycle data is workspace-owned for the Traditional shell. The active agent workspace stores its session pid and MingaEditor.Agent.UIState; state.workspace.agent_ui is only a live mirror for renderers that still read the current workspace struct directly.
Extension shells may own session pids on shell-specific surfaces until they move to the same workspace model.
Summary
Functions
Returns the agent session lifecycle state.
Returns the full agent UI state (wrapping Panel and View).
Returns the agent UI focus.
Returns true if the agent panel input is focused.
Returns the agent panel state (prompt editing and chat display).
Returns the agent session pid for the user's current view, or nil.
Updates agent session lifecycle state via a transform function.
Updates the full agent UI state. Prefer update_panel/2 or update_view/2.
Updates just the panel sub-struct via a transform function.
Updates just the view sub-struct via a transform function.
Returns the agent view state (layout, search, preview, toasts).
Functions
@spec agent(MingaEditor.State.t() | map()) :: MingaEditor.State.Agent.t()
Returns the agent session lifecycle state.
@spec agent_ui(MingaEditor.State.t() | map()) :: MingaEditor.Agent.UIState.t()
Returns the full agent UI state (wrapping Panel and View).
@spec focus(MingaEditor.State.t() | map()) :: atom()
Returns the agent UI focus.
@spec input_focused?(MingaEditor.State.t() | map()) :: boolean()
Returns true if the agent panel input is focused.
@spec panel(MingaEditor.State.t() | map()) :: MingaEditor.Agent.UIState.Panel.t()
Returns the agent panel state (prompt editing and chat display).
@spec session(MingaEditor.State.t() | map()) :: pid() | nil
Returns the agent session pid for the user's current view, or nil.
Traditional reads the active workspace. Extension shells read through shell behaviours until they move onto the same workspace model.
@spec update_agent(MingaEditor.State.t() | map(), (MingaEditor.State.Agent.t() -> MingaEditor.State.Agent.t())) :: MingaEditor.State.t() | map()
Updates agent session lifecycle state via a transform function.
@spec update_agent_ui(MingaEditor.State.t() | map(), (MingaEditor.Agent.UIState.t() -> MingaEditor.Agent.UIState.t())) :: MingaEditor.State.t() | map()
Updates the full agent UI state. Prefer update_panel/2 or update_view/2.
@spec update_panel( MingaEditor.State.t() | map(), (MingaEditor.Agent.UIState.Panel.t() -> MingaEditor.Agent.UIState.Panel.t()) ) :: MingaEditor.State.t() | map()
Updates just the panel sub-struct via a transform function.
@spec update_view( MingaEditor.State.t() | map(), (MingaEditor.Agent.UIState.View.t() -> MingaEditor.Agent.UIState.View.t()) ) :: MingaEditor.State.t() | map()
Updates just the view sub-struct via a transform function.
@spec view(MingaEditor.State.t() | map()) :: MingaEditor.Agent.UIState.View.t()
Returns the agent view state (layout, search, preview, toasts).