Plan

The steps the agent decides on before it starts, and how far it has got. Each step is done, running or pending, and the title counts how many are done.

Usage

Plan

Migrate the dialog components to Base UI.
Install @base-ui/reactReplace the Radix importsRename asChild to renderRun the type checker

Migrated Dialog and AlertDialog. The type checker passes.

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

A Trace whose collapsible line is the plan, its steps a Trace inside. When the steps are not known up front, use a Task instead.

Anatomy

import {  ScTrace, ScTraceLine, ScTraceIcon, ScTraceTitle, ScTraceDescription,  ScTraceCollapsible, ScTraceCollapsibleTrigger, ScTraceCollapsiblePanelContent,  ScCollapsible, ScCollapsibleTrigger, ScCollapsiblePanel,} from '@semantic-components/ui';
<div scTrace>  <div scCollapsible scTraceCollapsible [open]="true">    <button scCollapsibleTrigger scTraceCollapsibleTrigger>      <span scTraceLine status="running">        <span scTraceIcon><svg siRouteIcon></svg></span>        <span scTraceTitle>Plan: migrate to Base UI</span>        <span scTraceDescription>2 of 4 done</span>      </span>    </button>    <div scCollapsiblePanel>      <div scTraceCollapsiblePanelContent>        <div scTrace>          <span scTraceLine status="pending">…</span>        </div>      </div>    </div>  </div></div>

Updating in place

The plan streams as one piece of data, sent again whenever a step moves on: the page replaces it rather than adding a new one, so the same plan updates.

Examples

A description above the steps, inside the plan.

Description

Store the theme in a cookie so the server renders the right one and the page does not flash on load.

Add a dark variant to the theme tokensRead the theme from a cookie on the serverAdd a toggle to the settings pageCheck contrast on the charts
import { Component, ViewEncapsulation } from '@angular/core';import {  ScCollapsible,  ScCollapsiblePanel,  ScCollapsibleTrigger,  ScTrace,  ScTraceCollapsible,  ScTraceCollapsiblePanelContent,  ScTraceCollapsibleTrigger,  ScTraceDescription,

RTL

تثبيت ‎@base-ui/reactاستبدال استيرادات Radixإعادة تسمية asChild إلى renderتشغيل مدقق الأنواع
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.