SagentsLiveDebugger.Live.Components.SubagentsTab (Sagents LiveDebugger v0.4.0-rc.2)

Copy Markdown

Component for displaying sub-agents in the debugger.

Provides a collapsible list of sub-agents with:

  • Status badges
  • Duration display
  • Token usage display
  • Expandable detail views (Config, Messages, Middleware, Tools)
  • Streaming content indicator

Messages and middleware are rendered using the shared MessageComponents for consistent display with expandable tool calls, content parts, and metadata.

Summary

Functions

Renders the config view for a sub-agent.

Renders the messages view for a sub-agent.

Renders the status badge for a sub-agent.

Renders a single sub-agent entry with header and optional detail view.

Renders the middleware view for a sub-agent.

Renders the sub-agents view container.

Renders a token usage badge showing input/output tokens.

Renders the tools view for a sub-agent.

Functions

config_view(assigns)

Renders the config view for a sub-agent.

Attributes

  • subagent (:map) (required)

messages_view(assigns)

Renders the messages view for a sub-agent.

Uses the shared message_item component for consistent message rendering with expandable tool calls, content parts, and metadata.

Attributes

  • subagent (:map) (required)

status_badge(assigns)

Renders the status badge for a sub-agent.

Attributes

  • status (:atom) (required)

subagent_entry(assigns)

Renders a single sub-agent entry with header and optional detail view.

Attributes

  • subagent (:map) (required)
  • expanded (:boolean) - Defaults to false.
  • selected_tab (:string) - Defaults to "config".

subagent_middleware_view(assigns)

Renders the middleware view for a sub-agent.

Uses the shared middleware_item component for consistent middleware rendering with expandable configurations.

Attributes

  • subagent (:map) (required)

subagents_view(assigns)

Renders the sub-agents view container.

Assigns

  • subagents - Map of sub-agent ID to sub-agent data
  • expanded_subagent - ID of currently expanded sub-agent (or nil)
  • subagent_tab - Currently selected tab within expanded sub-agent ("config", "messages", "middleware", "tools")

Attributes

  • subagents (:map) (required)
  • expanded_subagent (:string) - Defaults to nil.
  • subagent_tab (:string) - Defaults to "config".

token_usage_badge(assigns)

Renders a token usage badge showing input/output tokens.

Attributes

  • token_usage (:map) (required)

tools_view(assigns)

Renders the tools view for a sub-agent.

Uses the shared tool_item component for consistent tool rendering with expandable descriptions and parameters.

Attributes

  • subagent (:map) (required)