MingaEditor.State.AgentGroup (Minga v0.1.0)

Copy Markdown View Source

An agent group in the tab bar.

Each agent session gets its own group. The group tracks the agent's status, the files it modified, and provides visual identity (icon, color, label) in the tab bar.

Tabs with group_id: 0 are ungrouped (the user's own tabs). Tabs with group_id > 0 belong to an agent group. There is no "manual workspace" concept; ungrouped tabs are simply tabs without a group.

Colors

Each group has a 24-bit RGB accent color for group separators and capsule rendering. Colors cycle through a 6-color palette.

Summary

Types

Agent status for group display.

SF Symbol name for group icon.

t()

An agent group.

Functions

Auto-names the group from an agent prompt, unless the user has set a custom name. Takes first line, truncates to 30 chars.

Creates a new agent group with a unique id.

Renames the group (marks as custom so auto-naming stops).

Sets the agent status on the group.

Sets the group icon (SF Symbol name).

Updates the group label.

Types

agent_status()

@type agent_status() :: :idle | :thinking | :tool_executing | :error | nil

Agent status for group display.

icon()

@type icon() :: String.t()

SF Symbol name for group icon.

t()

@type t() :: %MingaEditor.State.AgentGroup{
  agent_status: agent_status(),
  color: non_neg_integer(),
  custom_name: boolean(),
  icon: icon(),
  id: pos_integer(),
  label: String.t(),
  session: pid() | nil
}

An agent group.

Functions

auto_name(group, prompt)

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

Auto-names the group from an agent prompt, unless the user has set a custom name. Takes first line, truncates to 30 chars.

new(id, label, session \\ nil)

@spec new(pos_integer(), String.t(), pid() | nil) :: t()

Creates a new agent group with a unique id.

rename(group, name)

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

Renames the group (marks as custom so auto-naming stops).

set_agent_status(group, status)

@spec set_agent_status(t(), agent_status()) :: t()

Sets the agent status on the group.

set_icon(group, icon)

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

Sets the group icon (SF Symbol name).

set_label(group, label)

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

Updates the group label.