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.

Closes the dashboard home screen.

Clears the git status panel.

Returns the dashboard home screen state, or nil.

Dismisses the hover popup.

Returns the git status panel data, or nil.

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

Returns the nav flash state, or nil when inactive.

Returns the picker UI state.

Returns the prompt UI state.

Replaces the agent session lifecycle state.

Replaces the bottom panel state.

Sets the dashboard home screen state.

Sets the git status panel data.

Sets the hover popup state.

Sets the nav flash state.

Replaces the picker UI state.

Replaces the prompt UI 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.

Applies a function to the picker UI state.

Returns the which-key popup state.

Types

t()

@type t() :: %MingaEditor.Shell.Traditional.State{
  agent: MingaEditor.State.Agent.t(),
  bottom_panel: MingaEditor.BottomPanel.t(),
  dashboard: MingaEditor.Dashboard.state() | nil,
  git_status_panel: MingaEditor.Frontend.Protocol.GUI.git_status_data() | nil,
  hover_popup: MingaEditor.HoverPopup.t() | nil,
  modeline_click_regions: [
    MingaEditor.Shell.Traditional.Modeline.click_region()
  ],
  nav_flash: MingaEditor.NavFlash.t() | nil,
  picker_ui: MingaEditor.State.Picker.t(),
  prompt_ui: MingaEditor.State.Prompt.t(),
  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_dashboard(ss)

@spec close_dashboard(t()) :: t()

Closes the dashboard home screen.

close_git_status_panel(ss)

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

Clears the git status panel.

dashboard(map)

@spec dashboard(t()) :: MingaEditor.Dashboard.state() | nil

Returns the dashboard home screen state, or nil.

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.

picker_ui(map)

@spec picker_ui(t()) :: MingaEditor.State.Picker.t()

Returns the picker UI state.

prompt_ui(map)

@spec prompt_ui(t()) :: MingaEditor.State.Prompt.t()

Returns the prompt UI state.

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_dashboard(ss, dash)

@spec set_dashboard(t(), MingaEditor.Dashboard.state()) :: t()

Sets the dashboard home screen 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_nav_flash(ss, flash)

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

Sets the nav flash state.

set_picker_ui(ss, pui)

@spec set_picker_ui(t(), MingaEditor.State.Picker.t()) :: t()

Replaces the picker UI state.

set_prompt_ui(ss, prompt)

@spec set_prompt_ui(t(), MingaEditor.State.Prompt.t()) :: t()

Replaces the prompt UI 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.

update_picker_ui(ss, fun)

@spec update_picker_ui(t(), (MingaEditor.State.Picker.t() ->
                         MingaEditor.State.Picker.t())) :: t()

Applies a function to the picker UI state.

whichkey(map)

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

Returns the which-key popup state.