Repository navigation
Transcript ReturnLine
The line that closes a child agent's work: "Map UsageState transitions returned", with a status pill and an Open action for the child's chat. This sheet also covers InterruptedNotice, the line that closes a run stopped by a host restart, with Resume.
import 'package:agent_kit/agent_kit.dart';
Done and failed: the two ReturnLine specimens from the gallery's "Return line and interrupted notice" group. The done line carries the "Result ready" pill; the failed line carries "Failed". Both show Open because the specimens pass onOpen.
Interrupted: InterruptedNotice(onResume: ...) with the default text. The Resume button is drawn because the callback is set.
ReturnLine
| Parameter | Type | Notes |
|---|---|---|
result |
ChildResult |
Required, positional. Uses task (bold), state (the verb and the pill) and childId. |
onOpen |
ValueChanged<String>? |
"Open". Gets result.childId. Not drawn when null. |
Verb and pill for each WorkState:
| State | Verb | Pill |
|---|---|---|
running |
is running | running |
done |
returned | "Result ready" (done) |
failed |
failed | failed |
cancelled |
was cancelled | "Cancelled" (idle) |
waitingForAnswer |
is waiting for an answer | idle |
idle |
is idle | idle |
timedOut |
timed out | "Timed out" (failed) |
InterruptedNotice
| Parameter | Type | Notes |
|---|---|---|
text |
String |
Default "Interrupted by a restart". Drawn beside the interrupted mark. |
onResume |
VoidCallback? |
"Resume", with a refresh glyph. Not drawn when null. |
In the chat pane, onResume is set only when the backend has KitCapability.resume (packages/agent_kit/lib/src/compositions/agent_chat_pane.dart, lines 571 to 574). Without it the notice has no button.
-
colors.borderSubtle: the top and bottom rules of both lines. -
colors.iconSecondary: the eye glyph onReturnLine. -
muted: the verb.ink: the bold task name and the Open and Resume buttons. - Pills and the interrupted mark come from
StatusMark, so their colours are that widget's, not set here.
The text is 13/16 at weight 500, set from a fixed TypeSpec in the file, not from typeScale.
ReturnLine reads sizeClassOf(context).isCompact. When compact, the pill is hidden and Open stays. The task and verb text can wrap to two lines, then ellipsis. InterruptedNotice does not read the size class.
-
ReturnLine:Semantics(container: true, label: '<task> <verb>'). The Open button keeps its own button semantics. -
InterruptedNotice:Semantics(container: true, label: <text>). The Resume button keeps its own button semantics. - No keyboard handling in either file. Taps on the buttons are
KitTextButton's.
- Gallery scene: Components. Specimens "Return line and interrupted notice" in
TranscriptSpecimens(apps/gallery/lib/components/transcript.dart, lines 114 to 119). The results are_childResult(done, task "Map UsageState transitions") and_childFailed(failed, task "Survey quota handling in Codex"). - Golden:
apps/gallery/test/component_shots_test.dartwritesreturn_linefromReturnLineindices 1 and 2, andinterrupted_noticefromInterruptedNoticeindex 1, light and dark. Index 0 of each is inside the transcript list. - Other tests, in
packages/agent_kit/test/transcript/transcript_test.dart:- "a child result opens the child" (line 460);
- "the interrupted notice resumes" (line 472).
- Transcript goldens in
packages/agent_kit/test/goldens/transcript_turn_*.pngandtranscript_states_*.png.
Generated from docs/components/transcript/ReturnLine.md. Edit the file there; changes made on the wiki are overwritten.
Guides
- Package layout and pinning
- agent_kit_core
- Backend mapping
- agent_kit and the gallery
- Icon and README assets
Component sheets
theme
status
transcript
- ActivityGroupView
- AssistantProse
- ChildQuestionRow
- CodeBlock
- DiffView
- ExecOutput
- FileEditRow
- PlanChecklist
- ReturnLine
- SystemLineView
- TranscriptList
- UserBubble
composer
chrome
context
history
outline
workspace
compositions
providers