Interface MessageListComponent.SubAgentTreeProvider

Enclosing class:
MessageListComponent
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public static interface MessageListComponent.SubAgentTreeProvider
Supplies the pre-built sub-agent cards (with their nested child-task trees) for a given parent toolCallId. Implemented by the controller, which has the session repositories needed to walk the call tree and load each sub-session's history. Returns an empty list when the call spawned no sub-sessions (or sub-agent rendering is disabled — the NONE default).
  • Field Details

  • Method Details

    • cardsFor

      List<TaskCardComponent> cardsFor(String parentToolCallId, boolean running, String inputJson, String resultText)
      Parameters:
      parentToolCallId - the parent's tool-call id that spawned the sub-agent(s)
      running - true when the parent has no persisted TOOL_RESULT for this call yet — i.e. the sub-agent(s) are still in flight (page loaded mid-turn). Drives the running marker; the child session's own status is unreliable (sessions are never transitioned out of ACTIVE on disk).
      inputJson - the run_agent(s) call's pretty-printed input arguments (the task message etc.), or null. Shown in the card so a sub-agent reads like a normal tool call.
      resultText - the persisted tool-result text (the sub-agent's answer the parent received), or null while running.