Terminal
A shell command the agent runs — a lint, a test run, a build. The line shows the command, and its output streams in underneath while it runs.
Usage
Terminal
import { Component, DestroyRef, ViewEncapsulation, computed, inject, input, signal,} from '@angular/core';import {A Trace with a collapsible line for each command, its output in a Code Block.
Anatomy
import { ScTrace, ScTraceLine, ScTraceIcon, ScTraceTitle, ScTraceCollapsible, ScTraceCollapsibleTrigger, ScTraceCollapsiblePanelContent, ScCollapsible, ScCollapsibleTrigger, ScCollapsiblePanel,} from '@semantic-components/ui';import { ScCodeBlock, ScCodeBlockContent } from '@semantic-components/ui/code-block';<div scTrace> <div scCollapsible scTraceCollapsible> <button scCollapsibleTrigger scTraceCollapsibleTrigger> <span scTraceLine> <span scTraceIcon><svg siTerminalIcon></svg></span> <span scTraceTitle>Ran pnpm build</span> </span> </button> <div scCollapsiblePanel> <div scTraceCollapsiblePanelContent> <div scCodeBlock size="sm"> <pre scCodeBlockContent wrap class="max-h-64" [code]="output"></pre> </div> </div> </div> </div></div>Exit code
A command that exits with any code other than 0 failed: an error status. It is a tool call, so its states map as in Tool.
| Command | status | Title |
|---|---|---|
| Running | "running" | Running pnpm build |
| Exited with 0 | none | Ran pnpm build |
| Exited with another code | "error" | pnpm lint exited with code 1 |
Open while running
The line opens once the first output arrives, so the output shows while the command runs; after that it stays as it is, or as the person left it. The output streams beside the command and grows in place: a command's result only comes when it exits.
Examples
Exit code
> [email protected] lint> eslint .
app/api/chat/route.ts 14:7 error 'model' is assigned a value but never used no-unused-vars
components/chat.tsx 42:5 error React Hook useEffect has a missing dependency: 'messages' react-hooks/exhaustive-deps
✖ 2 problems (2 errors, 0 warnings)
ELIFECYCLE Command failed with exit code 1.import { Component, ViewEncapsulation } from '@angular/core';import { ScCollapsible, ScCollapsiblePanel, ScCollapsibleTrigger, ScTrace, ScTraceCollapsible, ScTraceCollapsiblePanelContent, ScTraceCollapsibleTrigger, ScTraceIcon,RTL
✓ lib/ai.test.ts (6 tests) 41ms ✓ components/chat.test.tsx (9 tests) 212ms
Tests 15 passed (15)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 and the Code Block.