Subagent
A line for work the agent hands to a subagent. The run is the title, like "Ran the research agent"; open it for the tool calls the subagent made and what it found.
Usage
Subagent
import { Component, DestroyRef, ViewEncapsulation, computed, inject, signal,} from '@angular/core';import { ScBubble,A Trace line, collapsible on the run, with a Trace of its tool calls inside — each as a Tool line — and its report under them.
Anatomy
import { ScTrace, ScTraceLine, ScTraceIcon, ScTraceTitle, ScTraceCollapsible, ScTraceCollapsibleTrigger, ScTraceCollapsiblePanelContent, ScCollapsible, ScCollapsibleTrigger, ScCollapsiblePanel,} from '@semantic-components/ui';<div scTrace> <div scCollapsible scTraceCollapsible> <button scCollapsibleTrigger scTraceCollapsibleTrigger> <span scTraceLine> <span scTraceIcon><svg siCircleCheckIcon></svg></span> <span scTraceTitle>Ran the research agent</span> </span> </button> <div scCollapsiblePanel> <div scTraceCollapsiblePanelContent class="flex flex-col gap-3"> <div scTrace> <span scTraceLine>… Ran grep -rn cacheKey scripts</span> </div> <p>The cache is keyed on the commit SHA.</p> </div> </div> </div></div>States
The subagent streams what it has done so far, then its final result, which replaces it: show "Ran" only once the result is final.
| State | Line status | Title |
|---|---|---|
| Starting, or a partial result | "running" while the chat streams | Running … |
| Final result | none | Ran … |
| Failed, or still running after the chat stops | "error" | Failed to run … |
Examples
While it runs, the line is running and its content shows the tool calls so far; add the result when it finishes.
Running
import { Component, ViewEncapsulation } from '@angular/core';import { ScCollapsible, ScCollapsiblePanel, ScCollapsibleTrigger, ScTrace, ScTraceCollapsible, ScTraceCollapsiblePanelContent, ScTraceCollapsibleTrigger, ScTraceIcon,The task it was given at the top, its model and tools as badges, how long it ran after the title.
Task and tools
Find out why image optimization reruns on every deploy.
The cache is keyed on the commit SHA.
import { Component, ViewEncapsulation } from '@angular/core';import { ScBadge, ScCollapsible, ScCollapsiblePanel, ScCollapsibleTrigger, ScTrace, ScTraceCollapsible, ScTraceCollapsiblePanelContent, ScTraceCollapsibleTrigger,RTL
مفتاح الذاكرة المؤقتة هو معرّف الإيداع، فيُعاد تحسين كل صورة.
import { Dir } from '@angular/cdk/bidi';import { Component, LOCALE_ID, ViewEncapsulation } from '@angular/core';import { ScCollapsible, ScCollapsiblePanel, ScCollapsibleTrigger, ScTrace, ScTraceCollapsible, ScTraceCollapsiblePanelContent, ScTraceCollapsibleTrigger,API reference
See the Trace.