Task

A piece of work the agent is doing, such as finding the project files or updating a page. Each step — a search, a read, an edit — appears under the task when the agent takes it.

Usage

Task

Add Open Graph metadata to the home page.

Added Open Graph defaults to app/layout.tsx and a title, description and image for the home page in app/page.tsx.

import {  Component,  DestroyRef,  ViewEncapsulation,  computed,  inject,  input,  signal,} from '@angular/core';import {

A Trace with a collapsible line for each task. Keep the running task open, and close each one once it is done.

Anatomy

import {  ScTrace, ScTraceLine, ScTraceIcon, ScTraceTitle,  ScTraceCollapsible, ScTraceCollapsibleTrigger, ScTraceCollapsiblePanelContent,  ScCollapsible, ScCollapsibleTrigger, ScCollapsiblePanel,} from '@semantic-components/ui';
<div scTrace>  <div scCollapsible scTraceCollapsible [open]="choice() ?? running()">    <button scCollapsibleTrigger scTraceCollapsibleTrigger>      <span scTraceLine [status]="running() ? 'running' : undefined">        <span scTraceTitle>Updating the page metadata</span>      </span>    </button>    <div scCollapsiblePanel>      <div scTraceCollapsiblePanelContent>        <div scTrace>          <span scTraceLine>…</span>        </div>      </div>    </div>  </div></div>

Task or Plan

Both are a list of steps under a collapsible line; they differ in when the steps are known. Use a Plan when the agent decides the steps before it starts; a Task when they come from the work itself, the next one known only once the last is taken.

AspectPlanTask
StepsEvery step, from the startEach step, once the agent takes it
Pending stepsYes, waiting their turnNone
TitleThe goal, with progress: "2 of 4 done"What the agent is doing, then what it did
Per replyOne planOne or more tasks, each closing when it is done

Status

The task's status comes from its steps. Its title is in the present tense while it runs, in the past tense once it is done: "Updating the page metadata", "Failed to update the page metadata", "Updated the page metadata".

Examples

Steps with icons, a read linking to its file.

Steps

Searched for app/page.tsxRead app/page.tsx
import { Component, ViewEncapsulation } from '@angular/core';import { RouterLink } from '@angular/router';import {  ScCollapsible,  ScCollapsiblePanel,  ScCollapsibleTrigger,  ScTrace,  ScTraceCollapsible,  ScTraceCollapsiblePanelContent,  ScTraceCollapsibleTrigger,

RTL

عُدّل app/layout.tsxتعديل app/page.tsx
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.