MingaEditor.Shell.Traditional.State (Minga v0.1.0)

Copy Markdown View Source

Presentation state for the traditional tab-based editor shell.

These fields are presentation concerns: they control how the editor looks and behaves visually, but have no effect on the core editing model. Each field was migrated from MingaEditor.State as part of Phase F of the Core/Shell separation.

All set_X/get_X methods that operate on shell fields live here. MingaEditor.State retains thin wrappers that delegate through update_shell_state/2 for backward compatibility.

Summary

Functions

Returns the agent session lifecycle state.

Returns the bottom panel state.

Cancels the nav flash animation.

Clears the transient status message.

Clears the git status panel.

Dismisses the hover popup.

Returns the git status panel data, or nil.

Returns the hover popup state, or nil when not showing.

Returns the active modal overlay value (:none when no modal is open).

Returns the nav flash state, or nil when inactive.

Replaces the agent session lifecycle state.

Replaces the bottom panel state.

Sets the git status panel data.

Sets the hover popup state.

Replaces the modal overlay value.

Sets the nav flash state.

Sets the transient status message shown in the modeline.

Replaces the tab bar state.

Replaces the which-key popup state.

Returns true if the given tool should NOT be prompted for installation.

Returns the transient status message, or nil.

Returns the tab bar state, or nil.

Returns the which-key popup state.

Types

t()

@type t() :: %MingaEditor.Shell.Traditional.State{
  agent: MingaEditor.State.Agent.t(),
  bottom_panel: MingaEditor.BottomPanel.t(),
  git_status_panel: MingaEditor.Frontend.Protocol.GUI.git_status_data() | nil,
  hover_popup: MingaEditor.HoverPopup.t() | nil,
  modal: MingaEditor.State.ModalOverlay.t(),
  modeline_click_regions: [
    MingaEditor.Shell.Traditional.Modeline.click_region()
  ],
  nav_flash: MingaEditor.NavFlash.t() | nil,
  signature_help: MingaEditor.SignatureHelp.t() | nil,
  status_msg: String.t() | nil,
  suppress_tool_prompts: boolean(),
  tab_bar: MingaEditor.State.TabBar.t() | nil,
  tab_bar_click_regions: [
    MingaEditor.Shell.Traditional.TabBarRenderer.click_region()
  ],
  tool_declined: MapSet.t(),
  tool_prompt_queue: [atom()],
  warning_popup_timer: reference() | nil,
  whichkey: MingaEditor.State.WhichKey.t()
}

Functions

agent(map)

@spec agent(t()) :: MingaEditor.State.Agent.t()

Returns the agent session lifecycle state.

bottom_panel(map)

@spec bottom_panel(t()) :: MingaEditor.BottomPanel.t()

Returns the bottom panel state.

cancel_nav_flash(ss)

@spec cancel_nav_flash(t()) :: t()

Cancels the nav flash animation.

clear_status(ss)

@spec clear_status(t()) :: t()

Clears the transient status message.

close_git_status_panel(ss)

@spec close_git_status_panel(t()) :: t()

Clears the git status panel.

dismiss_hover_popup(ss)

@spec dismiss_hover_popup(t()) :: t()

Dismisses the hover popup.

git_status_panel(map)

@spec git_status_panel(t()) ::
  MingaEditor.Frontend.Protocol.GUI.git_status_data() | nil

Returns the git status panel data, or nil.

hover_popup(map)

@spec hover_popup(t()) :: MingaEditor.HoverPopup.t() | nil

Returns the hover popup state, or nil when not showing.

modal(map)

@spec modal(t()) :: MingaEditor.State.ModalOverlay.t()

Returns the active modal overlay value (:none when no modal is open).

set_agent(ss, agent)

@spec set_agent(t(), MingaEditor.State.Agent.t()) :: t()

Replaces the agent session lifecycle state.

set_bottom_panel(ss, panel)

@spec set_bottom_panel(t(), MingaEditor.BottomPanel.t()) :: t()

Replaces the bottom panel state.

set_git_status_panel(ss, data)

@spec set_git_status_panel(t(), map() | nil) :: t()

Sets the git status panel data.

set_hover_popup(ss, popup)

@spec set_hover_popup(t(), MingaEditor.HoverPopup.t()) :: t()

Sets the hover popup state.

set_modal(ss, modal)

@spec set_modal(t(), MingaEditor.State.ModalOverlay.t()) :: t()

Replaces the modal overlay value.

This is a low-level setter for MingaEditor.State.ModalOverlay. Normal callers should use ModalOverlay.open/3, transition/3, close/1, or dismiss/1 rather than calling this directly.

set_nav_flash(ss, flash)

@spec set_nav_flash(t(), MingaEditor.NavFlash.t()) :: t()

Sets the nav flash state.

set_status(ss, msg)

@spec set_status(t(), String.t()) :: t()

Sets the transient status message shown in the modeline.

set_tab_bar(ss, tb)

@spec set_tab_bar(t(), MingaEditor.State.TabBar.t() | nil) :: t()

Replaces the tab bar state.

set_whichkey(ss, wk)

@spec set_whichkey(t(), MingaEditor.State.WhichKey.t()) :: t()

Replaces the which-key popup state.

skip_tool_prompt?(ss, tool_name)

@spec skip_tool_prompt?(t(), atom()) :: boolean()

Returns true if the given tool should NOT be prompted for installation.

A tool is skipped when it's already declined this session, already installed, currently being installed, or already in the prompt queue.

status_msg(map)

@spec status_msg(t()) :: String.t() | nil

Returns the transient status message, or nil.

tab_bar(map)

@spec tab_bar(t()) :: MingaEditor.State.TabBar.t() | nil

Returns the tab bar state, or nil.

whichkey(map)

@spec whichkey(t()) :: MingaEditor.State.WhichKey.t()

Returns the which-key popup state.