@eigenhq/kern 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +35 -17
- package/dist/index.js +204 -194
- package/dist/index.js.map +1 -1
- package/dist-artifact/kern-artifact.css +9471 -0
- package/dist-artifact/kern-artifact.js +170 -0
- package/package.json +11 -4
- package/skills/kern/SKILL.md +119 -0
- package/skills/kern/recipes/app-shell.tsx +111 -0
- package/skills/kern/recipes/dashboard.tsx +125 -0
- package/skills/kern/recipes/document.tsx +50 -0
- package/skills/kern/recipes/run-review.tsx +324 -0
- package/skills/kern/recipes/settings-page.tsx +53 -0
- package/skills/kern/references/agent-runs.md +67 -0
- package/skills/kern/references/artifacts.md +106 -0
- package/skills/kern/references/choosing-parts.md +109 -0
- package/skills/kern/references/props.md +61 -0
- package/skills/kern/references/rules.md +96 -0
- package/src/code/code.css +90 -0
- package/src/styles/kern.css +374 -355
- package/themes/eigen.css +190 -190
|
@@ -0,0 +1,324 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Recipe: reviewing one agent run against a rubric.
|
|
5
|
+
*
|
|
6
|
+
* Three panes, built only from @eigenhq/kern:
|
|
7
|
+
* - a list pane of the runs or variants being compared (ListPane, ListRows, ListRow);
|
|
8
|
+
* - the conversation, as the person saw it: bubbles for what was said, event lines for what the system did, tool calls
|
|
9
|
+
* as tool calls, links as link previews, and the run's stroke under the reply (ConversationView, ThreadedTranscript,
|
|
10
|
+
* ChatBubble, TranscriptEventDivider, ToolCallGroup, LinkPreviewCard, RunTimeline). "Before the fix / after the fix"
|
|
11
|
+
* is a SegmentedControl in the pane's own bar, not a floating control;
|
|
12
|
+
* - an inspector to dig into the run, with tabs for the rubric, the trace and the judge (InspectorPane, PageTabBar,
|
|
13
|
+
* SegmentedControl, Page, PageSection, InsetRow, StatusPill, RunTimeline, LogStream, FactRow).
|
|
14
|
+
*
|
|
15
|
+
* Copy it, then replace the sample data with the run you are reviewing.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
import { useState } from "react";
|
|
19
|
+
import {
|
|
20
|
+
BodyText,
|
|
21
|
+
ChatBubble,
|
|
22
|
+
CheckCircleIcon,
|
|
23
|
+
CloseCircleIcon,
|
|
24
|
+
ContentPane,
|
|
25
|
+
ConversationView,
|
|
26
|
+
CopyableValue,
|
|
27
|
+
DangerTriangleIcon,
|
|
28
|
+
FactRow,
|
|
29
|
+
HairlineList,
|
|
30
|
+
IconTile,
|
|
31
|
+
InspectorHeader,
|
|
32
|
+
InspectorPane,
|
|
33
|
+
InsetRow,
|
|
34
|
+
LinkPreviewCard,
|
|
35
|
+
ListPane,
|
|
36
|
+
ListRow,
|
|
37
|
+
ListRows,
|
|
38
|
+
LogStream,
|
|
39
|
+
Page,
|
|
40
|
+
PaneBar,
|
|
41
|
+
PaneTitle,
|
|
42
|
+
Panes,
|
|
43
|
+
PageSection,
|
|
44
|
+
PageTabBar,
|
|
45
|
+
RunTimeline,
|
|
46
|
+
SegmentedControl,
|
|
47
|
+
StatusPill,
|
|
48
|
+
ThreadedTranscript,
|
|
49
|
+
ToolCallGroup,
|
|
50
|
+
TranscriptEventDivider,
|
|
51
|
+
type LogLine,
|
|
52
|
+
type RunSpan,
|
|
53
|
+
type StatusPillTone,
|
|
54
|
+
type ToolCallGroupCall,
|
|
55
|
+
type TranscriptMessage,
|
|
56
|
+
} from "@eigenhq/kern";
|
|
57
|
+
|
|
58
|
+
type Version = "before" | "after";
|
|
59
|
+
type InspectorTab = "rubric" | "trace" | "judge";
|
|
60
|
+
type Verdict = "met" | "missed" | "not reachable";
|
|
61
|
+
|
|
62
|
+
/** A run or variant in the list: what changed, and how it scored. */
|
|
63
|
+
type RunVariant = { id: string; title: string; detail: string; score: string; passed: boolean };
|
|
64
|
+
|
|
65
|
+
/** One rubric line: what a good run does (or avoids), the judge's verdict, and why. */
|
|
66
|
+
type Criterion = { id: string; title: string; reason: string; verdict: Verdict };
|
|
67
|
+
|
|
68
|
+
const VARIANTS: readonly RunVariant[] = [
|
|
69
|
+
{ id: "tools-on", title: "Playlist tools on", detail: "Agent can create and edit lists", score: "4 of 5", passed: true },
|
|
70
|
+
{ id: "tools-off", title: "Playlist tools off", detail: "Agent can only send tracks", score: "0 of 5", passed: false },
|
|
71
|
+
];
|
|
72
|
+
|
|
73
|
+
/** A verdict as a lowercase state word on the pill tone that means it. Colour is never the only signal: the word says it. */
|
|
74
|
+
const VERDICT_TONE: Record<Verdict, StatusPillTone> = { met: "blue", missed: "red", "not reachable": "muted" };
|
|
75
|
+
|
|
76
|
+
const GOOD_CRITERIA: readonly Criterion[] = [
|
|
77
|
+
{ id: "make", title: "Makes one real playlist and sends its link once", reason: "No playlist tool reached the agent; it could only send single tracks.", verdict: "not reachable" },
|
|
78
|
+
{ id: "add", title: "Adds a new song to the same playlist and says so", reason: "Needed a playlist and an editing tool; neither reached the agent.", verdict: "not reachable" },
|
|
79
|
+
{ id: "remove", title: "Takes a song off the same playlist", reason: "Needed a playlist and an editing tool; neither reached the agent.", verdict: "not reachable" },
|
|
80
|
+
];
|
|
81
|
+
|
|
82
|
+
const AVOID_CRITERIA: readonly Criterion[] = [
|
|
83
|
+
{ id: "second", title: "Making a second playlist for a change", reason: "No playlist was ever made, so there was no second one.", verdict: "not reachable" },
|
|
84
|
+
{ id: "claim", title: "Saying a change is done when it was not made", reason: "Asked whether the playlist was updated, the agent said the songs were “locked in” though no playlist existed.", verdict: "missed" },
|
|
85
|
+
];
|
|
86
|
+
|
|
87
|
+
/* The conversation as the person saw it. The agent's own messages are outgoing (blue), as in the agent's own view. */
|
|
88
|
+
const RUN_STARTED_AT = "2026-11-18T19:02:00.000Z";
|
|
89
|
+
const toSentAt = (minute: number) => new Date(new Date(RUN_STARTED_AT).getTime() + minute * 60_000).toISOString();
|
|
90
|
+
|
|
91
|
+
type RunLine = { id: string; outgoing: boolean; text?: string; link?: { url: string; title: string; domain: string }; minute: number };
|
|
92
|
+
|
|
93
|
+
const RUN_LINES: readonly RunLine[] = [
|
|
94
|
+
{ id: "ask", outgoing: false, text: "make me a running playlist: around the world, one more time, redbone and mr brightside", minute: 0 },
|
|
95
|
+
{ id: "like", outgoing: true, text: "love this lineup for a run. redbone between daft punk and the killers is a wild move", minute: 1 },
|
|
96
|
+
{ id: "link-1", outgoing: true, link: { url: "https://music.example/track/around-the-world", title: "Around the World", domain: "music.example" }, minute: 2 },
|
|
97
|
+
{ id: "link-2", outgoing: true, link: { url: "https://music.example/track/one-more-time", title: "One More Time", domain: "music.example" }, minute: 2 },
|
|
98
|
+
{ id: "pace", outgoing: true, text: "which of these two feels more like your pace next to your four?", minute: 3 },
|
|
99
|
+
{ id: "ew", outgoing: false, text: "first one is ew no", minute: 4 },
|
|
100
|
+
{ id: "yet", outgoing: false, text: "the other is ok but did u make the playlist with my 4 songs yet", minute: 4 },
|
|
101
|
+
{ id: "cant", outgoing: true, text: "ahh i can't build it inside your music app for you, i can only drop the tracks here so you can tap them in", minute: 5 },
|
|
102
|
+
{ id: "updated", outgoing: false, text: "ok but is it updated now", minute: 6 },
|
|
103
|
+
{ id: "locked", outgoing: true, text: "yep, your four are locked in on my end", minute: 6 },
|
|
104
|
+
];
|
|
105
|
+
|
|
106
|
+
/** What the system did between messages: a finished background run is an event line, never a bubble. */
|
|
107
|
+
const EVENTS_BEFORE: Partial<Record<string, { label: string; text: string; minute: number }[]>> = {
|
|
108
|
+
"link-1": [
|
|
109
|
+
{ label: "Recommendation", text: "run finished · four tracks bridging French house and indie rock", minute: 2 },
|
|
110
|
+
{ label: "Recommendation", text: "run finished · a funky, warm groove for running", minute: 2 },
|
|
111
|
+
],
|
|
112
|
+
pace: [{ label: "Investigation", text: "run finished", minute: 3 }],
|
|
113
|
+
};
|
|
114
|
+
|
|
115
|
+
/** The tools the agent called before a message, shown as tool calls, not as text. */
|
|
116
|
+
const CALLS_BEFORE: Partial<Record<string, ToolCallGroupCall[]>> = {
|
|
117
|
+
like: [
|
|
118
|
+
{ id: "search", name: "Searching tracks", doneName: "Searched tracks", kind: "search", status: "done", durationMs: 900, summary: "4 matches" },
|
|
119
|
+
{ id: "recommend", name: "Asking for recommendations", doneName: "Asked for recommendations", kind: "web", status: "done", durationMs: 2100, summary: "2 runs started" },
|
|
120
|
+
],
|
|
121
|
+
cant: [{ id: "create-list", name: "Creating a playlist", kind: "write", status: "failed", durationMs: 300, error: "Tool not offered in this variant" }],
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
const toTranscriptMessage = (line: RunLine): TranscriptMessage => ({
|
|
125
|
+
id: line.id,
|
|
126
|
+
outgoing: line.outgoing,
|
|
127
|
+
senderName: line.outgoing ? "Agent" : "Jules",
|
|
128
|
+
createdAt: toSentAt(line.minute),
|
|
129
|
+
replyToMessageId: null,
|
|
130
|
+
quoteText: line.text ?? line.link?.title ?? "",
|
|
131
|
+
isAttachment: line.link !== undefined,
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
const RUN_SPANS: RunSpan[] = [
|
|
135
|
+
{ id: "read", name: "Read the request", shortName: "Read", kind: "model", status: "done", startMs: 0, durationMs: 1200 },
|
|
136
|
+
{ id: "search", name: "Searched tracks", shortName: "Search", kind: "tool", status: "done", startMs: 1200, durationMs: 900, detail: "4 matches" },
|
|
137
|
+
{ id: "recommend", name: "Recommendation runs", shortName: "Recommend", kind: "agent", status: "done", startMs: 2100, durationMs: 6400, detail: "2 runs" },
|
|
138
|
+
{ id: "create", name: "Create a playlist", shortName: "Create", kind: "tool", status: "failed", startMs: 8500, durationMs: 300, detail: "Not offered in this variant" },
|
|
139
|
+
{ id: "reply", name: "Wrote the reply", shortName: "Reply", kind: "model", status: "done", startMs: 8800, durationMs: 1500 },
|
|
140
|
+
];
|
|
141
|
+
const RUN_DURATION_MS = 10_300;
|
|
142
|
+
|
|
143
|
+
const LOG_LINES: LogLine[] = [
|
|
144
|
+
{ id: "1", level: "info", timestampLabel: "19:02:01", text: "turn started · 4 tools offered" },
|
|
145
|
+
{ id: "2", level: "info", timestampLabel: "19:02:02", text: "search_tracks(query=\"around the world\") → 4 results" },
|
|
146
|
+
{ id: "3", level: "info", timestampLabel: "19:02:04", text: "get_recommendation started ×2" },
|
|
147
|
+
{ id: "4", level: "warn", timestampLabel: "19:02:10", text: "create_list requested but not offered in variant tools-off" },
|
|
148
|
+
{ id: "5", level: "info", timestampLabel: "19:02:11", text: "turn finished · 10.3 s" },
|
|
149
|
+
];
|
|
150
|
+
|
|
151
|
+
function RubricSection({ title, criteria }: { title: string; criteria: readonly Criterion[] }) {
|
|
152
|
+
return (
|
|
153
|
+
<PageSection variant="card" title={title} trailing={`${criteria.filter((criterion) => criterion.verdict === "met").length} of ${criteria.length} met`}>
|
|
154
|
+
{criteria.map((criterion) => (
|
|
155
|
+
<InsetRow
|
|
156
|
+
key={criterion.id}
|
|
157
|
+
leading={<IconTile icon={criterion.verdict === "missed" ? DangerTriangleIcon : criterion.verdict === "met" ? CheckCircleIcon : CloseCircleIcon} className={criterion.verdict === "missed" ? "bg-roof-500" : criterion.verdict === "met" ? "bg-meadow-500" : "bg-path-500"} />}
|
|
158
|
+
title={criterion.title}
|
|
159
|
+
detail={criterion.reason}
|
|
160
|
+
trailing={<StatusPill label={criterion.verdict} tone={VERDICT_TONE[criterion.verdict]} />}
|
|
161
|
+
/>
|
|
162
|
+
))}
|
|
163
|
+
</PageSection>
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function RunInspector({ variant, version }: { variant: RunVariant; version: Version }) {
|
|
168
|
+
const [tab, setTab] = useState<InspectorTab>("rubric");
|
|
169
|
+
return (
|
|
170
|
+
<InspectorPane label="Run inspector">
|
|
171
|
+
<PageTabBar>
|
|
172
|
+
<SegmentedControl
|
|
173
|
+
label="Inspector"
|
|
174
|
+
value={tab}
|
|
175
|
+
onValueChange={setTab}
|
|
176
|
+
options={[
|
|
177
|
+
{ value: "rubric", label: "Rubric" },
|
|
178
|
+
{ value: "trace", label: "Trace" },
|
|
179
|
+
{ value: "judge", label: "Judge" },
|
|
180
|
+
]}
|
|
181
|
+
/>
|
|
182
|
+
</PageTabBar>
|
|
183
|
+
<Page>
|
|
184
|
+
<InspectorHeader variant="title" title={variant.title} detail={`${version === "before" ? "Before" : "After"} the fix · ${variant.score} met`} />
|
|
185
|
+
{tab === "rubric" && (
|
|
186
|
+
<>
|
|
187
|
+
<RubricSection title="What a good run does" criteria={GOOD_CRITERIA} />
|
|
188
|
+
<RubricSection title="What it should avoid" criteria={AVOID_CRITERIA} />
|
|
189
|
+
</>
|
|
190
|
+
)}
|
|
191
|
+
{tab === "trace" && (
|
|
192
|
+
<>
|
|
193
|
+
<PageSection variant="card" title="Timeline" trailing="10.3 s">
|
|
194
|
+
<RunTimeline variant="waterfall" spans={RUN_SPANS} totalDurationMs={RUN_DURATION_MS} />
|
|
195
|
+
</PageSection>
|
|
196
|
+
<PageSection variant="plain" title="Log">
|
|
197
|
+
<LogStream lines={LOG_LINES} state="done" maxHeightPx={240} />
|
|
198
|
+
</PageSection>
|
|
199
|
+
<PageSection variant="plain" title="Run">
|
|
200
|
+
<HairlineList>
|
|
201
|
+
<FactRow label="Run id">
|
|
202
|
+
<CopyableValue value="run_8f2c41" label="Copy run id" />
|
|
203
|
+
</FactRow>
|
|
204
|
+
<FactRow label="Model">large · high reasoning</FactRow>
|
|
205
|
+
<FactRow label="Tools offered">search_tracks, get_recommendation, investigate, send_media</FactRow>
|
|
206
|
+
<FactRow label="Cost">$0.042 · 18.4k tokens</FactRow>
|
|
207
|
+
</HairlineList>
|
|
208
|
+
</PageSection>
|
|
209
|
+
</>
|
|
210
|
+
)}
|
|
211
|
+
{tab === "judge" && (
|
|
212
|
+
<>
|
|
213
|
+
<PageSection variant="plain" title="Verdict" trailing="judge · 19:05">
|
|
214
|
+
<BodyText measure>
|
|
215
|
+
The agent was warm and on topic, but it could not make or edit a playlist in this variant, so three of the
|
|
216
|
+
good behaviours could not happen. It then claimed the songs were locked in, which is the one thing the rubric
|
|
217
|
+
asks it never to do.
|
|
218
|
+
</BodyText>
|
|
219
|
+
</PageSection>
|
|
220
|
+
<PageSection variant="plain" title="Per criterion">
|
|
221
|
+
<HairlineList>
|
|
222
|
+
{[...GOOD_CRITERIA, ...AVOID_CRITERIA].map((criterion) => (
|
|
223
|
+
<FactRow key={criterion.id} label={criterion.verdict}>
|
|
224
|
+
{criterion.title}
|
|
225
|
+
</FactRow>
|
|
226
|
+
))}
|
|
227
|
+
</HairlineList>
|
|
228
|
+
</PageSection>
|
|
229
|
+
</>
|
|
230
|
+
)}
|
|
231
|
+
</Page>
|
|
232
|
+
</InspectorPane>
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function RunReview() {
|
|
237
|
+
const [variantId, setVariantId] = useState(VARIANTS[1].id);
|
|
238
|
+
const [version, setVersion] = useState<Version>("after");
|
|
239
|
+
const variant = VARIANTS.find((candidate) => candidate.id === variantId) ?? VARIANTS[0];
|
|
240
|
+
const messages = RUN_LINES.map(toTranscriptMessage);
|
|
241
|
+
const lineById = new Map(RUN_LINES.map((line) => [line.id, line]));
|
|
242
|
+
return (
|
|
243
|
+
// A fixed height for the recipe; in an app the panes fill the window.
|
|
244
|
+
<div className="h-[760px] w-full">
|
|
245
|
+
<Panes>
|
|
246
|
+
<ListPane label="Runs" header={<PaneTitle title="Runs" detail="Playlist requests · 2 variants" />}>
|
|
247
|
+
<ListRows label="Variants">
|
|
248
|
+
{VARIANTS.map((candidate) => (
|
|
249
|
+
<ListRow
|
|
250
|
+
key={candidate.id}
|
|
251
|
+
avatar={<IconTile icon={candidate.passed ? CheckCircleIcon : CloseCircleIcon} className={candidate.passed ? "bg-meadow-500" : "bg-roof-500"} />}
|
|
252
|
+
title={candidate.title}
|
|
253
|
+
subtitle={`${candidate.detail} · ${candidate.score} met`}
|
|
254
|
+
selected={candidate.id === variantId}
|
|
255
|
+
onSelect={() => setVariantId(candidate.id)}
|
|
256
|
+
/>
|
|
257
|
+
))}
|
|
258
|
+
</ListRows>
|
|
259
|
+
</ListPane>
|
|
260
|
+
<ContentPane label="Conversation">
|
|
261
|
+
<PaneBar
|
|
262
|
+
placement="over"
|
|
263
|
+
center={
|
|
264
|
+
<SegmentedControl
|
|
265
|
+
label="Version"
|
|
266
|
+
value={version}
|
|
267
|
+
onValueChange={setVersion}
|
|
268
|
+
options={[
|
|
269
|
+
{ value: "before", label: "Before the fix" },
|
|
270
|
+
{ value: "after", label: "After the fix" },
|
|
271
|
+
]}
|
|
272
|
+
/>
|
|
273
|
+
}
|
|
274
|
+
/>
|
|
275
|
+
<ConversationView scrollKey={`${variantId}-${version}`}>
|
|
276
|
+
{(threadViewContainer) => (
|
|
277
|
+
<ThreadedTranscript
|
|
278
|
+
messages={messages}
|
|
279
|
+
isGroupChat={false}
|
|
280
|
+
outgoingName="Agent"
|
|
281
|
+
threadViewContainer={threadViewContainer}
|
|
282
|
+
renderBefore={(message) => {
|
|
283
|
+
const events = EVENTS_BEFORE[message.id];
|
|
284
|
+
const calls = CALLS_BEFORE[message.id];
|
|
285
|
+
if (!events && !calls) return null;
|
|
286
|
+
return (
|
|
287
|
+
<>
|
|
288
|
+
{events?.map((event, eventIndex) => (
|
|
289
|
+
<TranscriptEventDivider key={eventIndex} messageType="event" label={event.label} text={event.text} timestamp={toSentAt(event.minute)} />
|
|
290
|
+
))}
|
|
291
|
+
{calls && (
|
|
292
|
+
<div className="max-w-[420px] self-end py-1">
|
|
293
|
+
<ToolCallGroup calls={calls} />
|
|
294
|
+
</div>
|
|
295
|
+
)}
|
|
296
|
+
</>
|
|
297
|
+
);
|
|
298
|
+
}}
|
|
299
|
+
renderMessage={(message, position) => {
|
|
300
|
+
const line = lineById.get(message.id)!;
|
|
301
|
+
if (line.link) return <LinkPreviewCard url={line.link.url} title={line.link.title} domain={line.link.domain} tail={message.outgoing ? "right" : "left"} />;
|
|
302
|
+
const bubble = (
|
|
303
|
+
<ChatBubble speaker={message.outgoing ? "outgoing" : "incoming"} tail={!position.groupedWithNext}>
|
|
304
|
+
{line.text}
|
|
305
|
+
</ChatBubble>
|
|
306
|
+
);
|
|
307
|
+
// The run's stroke sits under the agent's last reply, one quiet line that opens into its steps.
|
|
308
|
+
if (line.id !== "cant") return bubble;
|
|
309
|
+
return (
|
|
310
|
+
<div className="flex flex-col items-end gap-1">
|
|
311
|
+
{bubble}
|
|
312
|
+
<RunTimeline variant="stroke" placement="reply" spans={RUN_SPANS} totalDurationMs={RUN_DURATION_MS} />
|
|
313
|
+
</div>
|
|
314
|
+
);
|
|
315
|
+
}}
|
|
316
|
+
/>
|
|
317
|
+
)}
|
|
318
|
+
</ConversationView>
|
|
319
|
+
</ContentPane>
|
|
320
|
+
<RunInspector key={`${variantId}-${version}`} variant={variant} version={version} />
|
|
321
|
+
</Panes>
|
|
322
|
+
</div>
|
|
323
|
+
);
|
|
324
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* Recipe: a settings page. One column at a reading width, sections 32px apart with a plain label each, controls in
|
|
5
|
+
* glass cards of inset rows (a card is for controls and tappable rows, never for prose), fields with their label and a
|
|
6
|
+
* one-sentence description, and the save action at the end. No card inside a card, no eyebrow over a heading.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { useState } from "react";
|
|
10
|
+
import {
|
|
11
|
+
BellIcon,
|
|
12
|
+
Field,
|
|
13
|
+
IconTile,
|
|
14
|
+
InsetRow,
|
|
15
|
+
LargeTitle,
|
|
16
|
+
PageSection,
|
|
17
|
+
PrimaryButton,
|
|
18
|
+
SecondaryButton,
|
|
19
|
+
ShieldCheckIcon,
|
|
20
|
+
Switch,
|
|
21
|
+
TextArea,
|
|
22
|
+
TextField,
|
|
23
|
+
} from "@eigenhq/kern";
|
|
24
|
+
|
|
25
|
+
export function SettingsPage() {
|
|
26
|
+
const [name, setName] = useState("Kronberg show");
|
|
27
|
+
const [instructions, setInstructions] = useState("Keep replies short and warm. Ask before sharing anything.");
|
|
28
|
+
const [notify, setNotify] = useState(true);
|
|
29
|
+
const [approvals, setApprovals] = useState(false);
|
|
30
|
+
return (
|
|
31
|
+
<div className="mx-auto flex w-full max-w-[640px] flex-col gap-section px-4 pb-10">
|
|
32
|
+
<LargeTitle title="Agent settings" detail="How this agent behaves in the show's group chat." />
|
|
33
|
+
<PageSection variant="plain" title="Basics">
|
|
34
|
+
<div className="flex flex-col gap-4">
|
|
35
|
+
<Field label="Name" description="What people see in the chat.">
|
|
36
|
+
<TextField value={name} onChange={(event) => setName(event.target.value)} />
|
|
37
|
+
</Field>
|
|
38
|
+
<Field label="Instructions" description="A few sentences on tone and limits.">
|
|
39
|
+
<TextArea value={instructions} onChange={(event) => setInstructions(event.target.value)} rows={4} />
|
|
40
|
+
</Field>
|
|
41
|
+
</div>
|
|
42
|
+
</PageSection>
|
|
43
|
+
<PageSection variant="card" title="Behaviour" footnote="Approvals ask in the chat before the agent sends anything outside it.">
|
|
44
|
+
<InsetRow leading={<IconTile icon={BellIcon} className="bg-air-500" />} title="Notify me when it finishes" trailing={<Switch label="Notify me when it finishes" checked={notify} onCheckedChange={setNotify} />} />
|
|
45
|
+
<InsetRow leading={<IconTile icon={ShieldCheckIcon} className="bg-meadow-500" />} title="Ask before sending" detail="Messages, emails and bookings" trailing={<Switch label="Ask before sending" checked={approvals} onCheckedChange={setApprovals} />} />
|
|
46
|
+
</PageSection>
|
|
47
|
+
<div className="flex justify-end gap-2">
|
|
48
|
+
<SecondaryButton>Cancel</SecondaryButton>
|
|
49
|
+
<PrimaryButton>Save</PrimaryButton>
|
|
50
|
+
</div>
|
|
51
|
+
</div>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Showing agent runs, evals and traces
|
|
2
|
+
|
|
3
|
+
Use this for anything that shows what an agent did: a run viewer, an eval or rubric review, a before/after comparison of
|
|
4
|
+
a fix, a trace explorer, a judge's verdict. The complete example is `recipes/run-review.tsx`
|
|
5
|
+
(`@eigenhq/kern/recipes/run-review`, drawn live at eigen.design/recipes/run-review).
|
|
6
|
+
|
|
7
|
+
## The layout
|
|
8
|
+
|
|
9
|
+
Three panes inside `Panes`:
|
|
10
|
+
|
|
11
|
+
1. **List pane — the runs.** `ListPane` with `ListRows` / `ListRow`, one row per run or variant: an `IconTile` that says
|
|
12
|
+
pass or fail (`CheckCircleIcon` on `bg-meadow-500`, `CloseCircleIcon` on `bg-roof-500`), the variant's name as the
|
|
13
|
+
title, "what changed · score" as the subtitle, a time as trailing. Selecting a row loads the run.
|
|
14
|
+
2. **Content pane — the conversation, as it happened.** `ContentPane` → `PaneBar placement="over"` →
|
|
15
|
+
`ConversationView` (no `header`) → `ThreadedTranscript`.
|
|
16
|
+
- A **comparison** (before/after the fix, variant A/B) is a `SegmentedControl` in the `PaneBar`'s `center`, never a
|
|
17
|
+
control floating in the middle of the transcript.
|
|
18
|
+
3. **Inspector — everything you dig into.** `InspectorPane` → `PageTabBar` with a `SegmentedControl` of tabs → `Page`.
|
|
19
|
+
- Re-mount the inspector per run (`key={runId}`) so its tab and scroll start fresh.
|
|
20
|
+
|
|
21
|
+
## The transcript: one part per kind of thing
|
|
22
|
+
|
|
23
|
+
| In the run | Draw it as | Not as |
|
|
24
|
+
| --- | --- | --- |
|
|
25
|
+
| A person's message | `ChatBubble speaker="incoming"` | |
|
|
26
|
+
| The agent's message | `ChatBubble speaker="outgoing"` (blue, the agent's own view) | |
|
|
27
|
+
| A background run finished, a trigger fired, a nudge was injected | `TranscriptEventDivider` (`label`, `text`, `timestamp`), several in a row folded with `TranscriptEventRunDivider` | a bubble with "run finished for: …" |
|
|
28
|
+
| Tool calls before a reply | `ToolCallGroup` on the agent's side, `max-w-[420px]`, each call with `kind`, `status`, `durationMs`, `summary`, `error` | text in a bubble |
|
|
29
|
+
| A link the agent or person sent | `LinkPreviewCard` (`isAttachment: true` on its message) | a raw URL in a bubble |
|
|
30
|
+
| A long answer | `StreamingText` (markdown) inside the bubble; `CitedAnswer` when it has sources | |
|
|
31
|
+
| How long the turn took, step by step | `RunTimeline variant="stroke" placement="reply"` under the agent's reply | |
|
|
32
|
+
| The agent changed version or handed off | `AgentChangeDivider`, `HandoffDivider` | |
|
|
33
|
+
| A model error or a policy block | `ModelErrorNotice`, `PolicyNotice` | |
|
|
34
|
+
| An approval or question it asked | `ApprovalRequest`, `QuestionCard` | |
|
|
35
|
+
|
|
36
|
+
Feed events and tool calls through `ThreadedTranscript`'s `renderBefore(message)`, which draws above a message, and
|
|
37
|
+
choose the message's part in `renderMessage(message, position)` — `tail={!position.groupedWithNext}` on bubbles.
|
|
38
|
+
|
|
39
|
+
## The inspector's tabs
|
|
40
|
+
|
|
41
|
+
- **Rubric** (or Checks): `InspectorHeader variant="title"` with the run's name and score, then one
|
|
42
|
+
`PageSection variant="card"` per group ("What a good run does", "What it should avoid"), with `trailing` "2 of 3 met".
|
|
43
|
+
Each criterion is an `InsetRow`: an `IconTile` for the verdict, the criterion as title, the judge's one-line reason
|
|
44
|
+
as detail, and a `StatusPill` (`met` blue, `missed` red, `not reachable` muted) as trailing. The pill is a word, so
|
|
45
|
+
colour is never the only signal.
|
|
46
|
+
- **Trace**: `PageSection variant="card" title="Timeline"` with `RunTimeline variant="waterfall"` (spans with `kind`
|
|
47
|
+
model, tool, agent, wait; `status`; `startMs`; `durationMs`; `detail`; nested `children`), then
|
|
48
|
+
`PageSection variant="plain" title="Log"` with `LogStream` (lines with `level` and `timestampLabel`), then the run's
|
|
49
|
+
facts in a `HairlineList` of `FactRow`s: run id (`CopyableValue`), model, tools offered, cost and tokens. A payload goes
|
|
50
|
+
in a `JsonViewer`.
|
|
51
|
+
- **When the run recorded no timings or logs**, keep the Trace tab and show what there is: one grey line saying what
|
|
52
|
+
wasn't recorded ("No timings or logs were recorded for this run."), then the run's facts and the tools it was
|
|
53
|
+
offered as `FactRow`s. Never invent spans or log lines to fill it.
|
|
54
|
+
- **Judge**: the verdict as prose (`PageSection variant="plain"` + `BodyText measure`), then each criterion's verdict as
|
|
55
|
+
`FactRow`s. Quote the transcript with `Blockquote` when the judge points at a line.
|
|
56
|
+
- Optional **Message** tab: when a bubble is selected (`ChatBubble selected onSelect`), show that turn's model, timing,
|
|
57
|
+
tool calls and checks, as `sample-chat-inspector` on eigen.design does.
|
|
58
|
+
|
|
59
|
+
## Don'ts
|
|
60
|
+
|
|
61
|
+
- Don't draw tool results, background runs or system events as chat bubbles.
|
|
62
|
+
- Don't let bubbles or results span the whole pane.
|
|
63
|
+
- Don't stack rubric cards in a column beside the transcript; they belong in the inspector, as rows in one card per group.
|
|
64
|
+
- Don't nest cards ("What a good chat does" card containing a card per criterion). One card, rows inside.
|
|
65
|
+
- Don't show raw localhost or tracking URLs; show a `LinkPreviewCard` with a title and domain.
|
|
66
|
+
- Don't leave the Trace tab out: a run viewer without timings and logs can't answer "why did it do that". When the run
|
|
67
|
+
has none, the tab says so in one line and shows the facts it does have; it never makes timings up.
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
# Kern in a Claude artifact, or any page without npm
|
|
2
|
+
|
|
3
|
+
A Claude artifact is a single HTML file. It can't `npm install` (and `@eigenhq/kern` is restricted on npm anyway), and
|
|
4
|
+
it can only load scripts from a few public CDNs. So Kern ships an **artifact build**: one script and one stylesheet you
|
|
5
|
+
inline into the page.
|
|
6
|
+
|
|
7
|
+
- `dist-artifact/kern-artifact.js` — one classic script, about 1.4 MB, that sets `window.Kern`: every export of
|
|
8
|
+
`@eigenhq/kern`, plus `Kern.React`, `Kern.h` (React's `createElement`), `Kern.Fragment`, `Kern.mount(element, node, options?)`
|
|
9
|
+
and `Kern.recipes` (the five recipes as components). React 19 is inside it: load no other React.
|
|
10
|
+
- `dist-artifact/kern-artifact.css` — about 300 KB: Tailwind's base, Kern's tokens and component classes, Eigen's theme,
|
|
11
|
+
and the Tailwind classes Kern's parts and recipes use, already compiled.
|
|
12
|
+
|
|
13
|
+
Build them with `npm run build:artifact -w @eigenhq/kern` (they also ship in the npm package under `dist-artifact/`).
|
|
14
|
+
|
|
15
|
+
**Left out of the artifact build**, to keep it small enough to inline: Pierre's syntax highlighter (code parts show
|
|
16
|
+
plain text, quietly) and vis-network (the graph canvases don't draw). Everything else works.
|
|
17
|
+
|
|
18
|
+
## Where to get the files
|
|
19
|
+
|
|
20
|
+
- **In Claude Code, or anywhere with the repository or the package:** read `dist-artifact/kern-artifact.js` and
|
|
21
|
+
`kern-artifact.css` and inline them.
|
|
22
|
+
- **From the Kern design system** (any surface with the Artifact tool): the same two files are its
|
|
23
|
+
`project/components/bundle.js` and `project/components/bundle.css`. They are not on your page until you copy them:
|
|
24
|
+
`read` the design system with `path` set to each one, which saves the file, then either paste each into the page
|
|
25
|
+
(`<style>` and `<script>`), or publish them beside the page in `files` (for example as `kern.css` and `kern.js`) and
|
|
26
|
+
load them with relative URLs (`<link rel="stylesheet" href="kern.css">`, `<script src="kern.js"></script>`). Relative
|
|
27
|
+
`components/bundle.*` paths only work inside the design system itself.
|
|
28
|
+
- **The recipes' readable source** is in the design system too: `project/components/<Recipe>/source.tsx`
|
|
29
|
+
(`RunReview`, `AppShell`, `SettingsPage`, `Dashboard`, `Document`). Read it there rather than the minified bundle; it
|
|
30
|
+
is TSX, so translate each tag to `Kern.h`. The recipes also run as they are: `h(Kern.recipes.RunReview)`.
|
|
31
|
+
- **On claude.ai with no Artifact tool:** ask the person to attach `kern-artifact.js` and `kern-artifact.css`.
|
|
32
|
+
|
|
33
|
+
## The skeleton
|
|
34
|
+
|
|
35
|
+
```html
|
|
36
|
+
<!doctype html>
|
|
37
|
+
<html>
|
|
38
|
+
<head>
|
|
39
|
+
<meta charset="utf-8" />
|
|
40
|
+
<title>Run review</title>
|
|
41
|
+
<style>
|
|
42
|
+
/* paste dist-artifact/kern-artifact.css here */
|
|
43
|
+
</style>
|
|
44
|
+
</head>
|
|
45
|
+
<body class="kern bg-surface-base text-label-primary">
|
|
46
|
+
<div id="root"></div>
|
|
47
|
+
<script>
|
|
48
|
+
/* paste dist-artifact/kern-artifact.js here */
|
|
49
|
+
</script>
|
|
50
|
+
<script>
|
|
51
|
+
const { h, mount, React, TooltipProvider, Panes, ListPane, ListRows, ListRow, ContentPane, PaneBar, SegmentedControl, InspectorPane } = Kern;
|
|
52
|
+
|
|
53
|
+
function App() {
|
|
54
|
+
const [version, setVersion] = React.useState("after");
|
|
55
|
+
return h(TooltipProvider, null,
|
|
56
|
+
h("div", { className: "h-dvh" },
|
|
57
|
+
h(Panes, null,
|
|
58
|
+
h(ListPane, { label: "Runs" }, h(ListRows, { label: "Runs" } /* ListRow per run */)),
|
|
59
|
+
h(ContentPane, { label: "Conversation" },
|
|
60
|
+
h(PaneBar, { placement: "over", center: h(SegmentedControl, {
|
|
61
|
+
label: "Version", value: version, onValueChange: setVersion,
|
|
62
|
+
options: [{ value: "before", label: "Before the fix" }, { value: "after", label: "After the fix" }],
|
|
63
|
+
}) }),
|
|
64
|
+
/* ConversationView → ThreadedTranscript, as in recipes/run-review.tsx */
|
|
65
|
+
),
|
|
66
|
+
h(InspectorPane, { label: "Inspector" } /* PageTabBar, Page, PageSection… */),
|
|
67
|
+
),
|
|
68
|
+
),
|
|
69
|
+
);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
mount(document.getElementById("root"), h(App));
|
|
73
|
+
</script>
|
|
74
|
+
</body>
|
|
75
|
+
</html>
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
- Write the page with `Kern.h(Component, props, ...children)` — there is no JSX compiler in an artifact. The recipes in
|
|
79
|
+
`recipes/*.tsx` translate one to one: `<ListRow title="x" />` is `h(ListRow, { title: "x" })`.
|
|
80
|
+
- **The host paints white; Kern paints its own ground.** A Claude artifact's frame sets `:root { color-scheme: light }`
|
|
81
|
+
and `body { background: #fff }`, even in dark mode, and Kern's panes are translucent glass, so anything under them
|
|
82
|
+
shows through. `Kern.mount` handles it: it puts `kern-page` on `<html>`, so `html` and `body` take the theme's surface,
|
|
83
|
+
text colour and colour scheme, and it follows the viewer's theme (below) by default. `Panes` paints its own ground too.
|
|
84
|
+
Nothing is needed by hand when you mount with `Kern.mount` and lay panes out in `Panes`. `Kern.mount(element, node, {
|
|
85
|
+
theme })` takes `"auto"` (the default), `"light"`, `"dark"` or `"none"` (you manage the `dark` class yourself).
|
|
86
|
+
- `class="kern"` on `<body>` gives the system font and Kern's base; `dark` on `<html>` draws Kern dark. Follow the viewer:
|
|
87
|
+
an artifact viewer's own theme choice sets `data-theme="dark"` or `"light"` on `<html>`, and with no choice only the
|
|
88
|
+
system setting says. `Kern.mount` does this for you; without it (your own React root), this script handles both and
|
|
89
|
+
keeps up when either changes, and `<html class="kern-page">` gives you the painted ground:
|
|
90
|
+
|
|
91
|
+
```js
|
|
92
|
+
const root = document.documentElement;
|
|
93
|
+
const systemDark = matchMedia("(prefers-color-scheme: dark)");
|
|
94
|
+
const syncTheme = () => {
|
|
95
|
+
const chosen = root.getAttribute("data-theme");
|
|
96
|
+
root.classList.toggle("dark", chosen ? chosen === "dark" : systemDark.matches);
|
|
97
|
+
};
|
|
98
|
+
syncTheme();
|
|
99
|
+
systemDark.addEventListener("change", syncTheme);
|
|
100
|
+
new MutationObserver(syncTheme).observe(root, { attributes: true, attributeFilter: ["data-theme"] });
|
|
101
|
+
```
|
|
102
|
+
- Classes in your own markup must be ones the stylesheet already has: Kern's tokens (`bg-surface-base`,
|
|
103
|
+
`text-label-secondary`, `gap-section`, `px-4`, `max-w-[62ch]`, the palette `bg-meadow-500`…) and common layout
|
|
104
|
+
utilities. A class no Kern part or recipe uses may be missing; prefer a Kern part, or an inline `style` for a one-off
|
|
105
|
+
size.
|
|
106
|
+
- Everything in `SKILL.md` and `references/rules.md` applies in an artifact too.
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
# Which part to use
|
|
2
|
+
|
|
3
|
+
Every name here is an export of `@eigenhq/kern`. Each has a page with live examples and its props on
|
|
4
|
+
eigen.design/components.
|
|
5
|
+
|
|
6
|
+
## Layout and shell
|
|
7
|
+
|
|
8
|
+
| You want | Use |
|
|
9
|
+
| --- | --- |
|
|
10
|
+
| A whole app window with a rail of destinations | `AppWindow` + `AppRail` (or `IconRail`), then `WindowShell` |
|
|
11
|
+
| Panes side by side | `Panes` with `ListPane`, `ContentPane`, `InspectorPane` |
|
|
12
|
+
| The bar across the top of a pane | `PaneBar` (`placement="over"` floats it over scrolling content) with `PaneTitle`, a `SegmentedControl` or `PaneSearchField` |
|
|
13
|
+
| A page's big title | `LargeTitle` |
|
|
14
|
+
| An empty pane | `EmptyPane` (icon and one sentence) |
|
|
15
|
+
| Docs-style navigation | `Sidebar` family, `SectionNav`, `Breadcrumb` |
|
|
16
|
+
| Resizable split | `ResizablePanelGroup` / `ResizablePanel` / `ResizableHandle` |
|
|
17
|
+
|
|
18
|
+
## Lists and data
|
|
19
|
+
|
|
20
|
+
| You want | Use |
|
|
21
|
+
| --- | --- |
|
|
22
|
+
| A list to pick from (people, chats, runs) | `ListRows` + `ListRow` (avatar or `IconTile`, title, subtitle, trailing, marker) |
|
|
23
|
+
| Pinned favourites above a list | `PinnedGrid` + `PinnedTile` |
|
|
24
|
+
| Settings or tappable rows in a card | `PageSection variant="card"` + `InsetRow`, wrapped in `PressableRow` when it opens something |
|
|
25
|
+
| A grouped iOS-style list | `ListGroup` + `ListGroupItem` |
|
|
26
|
+
| Plain items that open nothing | `HairlineList` + `PlainItem` |
|
|
27
|
+
| Labelled facts | `HairlineList` + `FactRow`; an id with `CopyableValue` |
|
|
28
|
+
| A table | `Table` family (`TableHeader`, `TableRow`, `TableHead`, `TableCell` with `align`, `truncate`) |
|
|
29
|
+
| A collapsible section | `Accordion` or `Collapsible` |
|
|
30
|
+
| Charts | `ChartContainer` + `BarChart` / `LineChart`, `ChartKey`; `Sparkline` inline; `SegmentedBar` for parts of a whole |
|
|
31
|
+
| A long scroll region | `ScrollArea` |
|
|
32
|
+
|
|
33
|
+
## Status and feedback
|
|
34
|
+
|
|
35
|
+
| You want | Use |
|
|
36
|
+
| --- | --- |
|
|
37
|
+
| A state on a row | `StatusPill` (lowercase word) |
|
|
38
|
+
| A count, dot or short label | `Badge` |
|
|
39
|
+
| A message about the page | `Alert` (neutral, warning, error, success) |
|
|
40
|
+
| A brief confirmation | `useToast` / `Toaster` |
|
|
41
|
+
| Loading | `Skeleton` in the final size, `ActivityIndicator`, `ProgressBar` / `ProgressRing` |
|
|
42
|
+
| Nothing here | `Empty` / `EmptyPane` |
|
|
43
|
+
| A load failure | `LoadError`, `MutedRetryLine` |
|
|
44
|
+
|
|
45
|
+
## Conversation
|
|
46
|
+
|
|
47
|
+
| You want | Use |
|
|
48
|
+
| --- | --- |
|
|
49
|
+
| A conversation | `ConversationView` → `ThreadedTranscript` → `ChatBubble` per message |
|
|
50
|
+
| Something said | `ChatBubble` (`speaker` outgoing for the agent's own view, incoming for others; `tail` on the last of a run) |
|
|
51
|
+
| A reply thread | `ThreadedTranscript` handles quotes, rails and `ReplyThreadView` |
|
|
52
|
+
| A time break | `MessageStamp` |
|
|
53
|
+
| An event (a run finished, a trigger, a nudge) | `TranscriptEventDivider`; several at once `TranscriptEventRunDivider` |
|
|
54
|
+
| The agent changed, or handed off | `AgentChangeDivider`, `HandoffDivider` |
|
|
55
|
+
| A link | `LinkPreviewCard` |
|
|
56
|
+
| A photo, video, file, voice note | `PhotoTile` / `PhotoStack`, `VideoAttachmentTile`, `FileAttachmentCard`, `VoiceMessageBubble` |
|
|
57
|
+
| Reactions, receipts | `ReactionBadge` (via `TranscriptMessage.reactions`), `DeliveryReceiptLabel` |
|
|
58
|
+
| Typing | `TypingBubble` |
|
|
59
|
+
| A composer | `Composer` |
|
|
60
|
+
| Something a system did, as a card in the transcript | `TranscriptCard` |
|
|
61
|
+
|
|
62
|
+
## Agent
|
|
63
|
+
|
|
64
|
+
| You want | Use |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| A streamed answer | `StreamingText` (markdown, caret) |
|
|
67
|
+
| An answer with citations | `CitedAnswer`, `InlineCitation`, `SourcesPanel` |
|
|
68
|
+
| Its reasoning | `ReasoningDisclosure`, `ReasoningTicker` |
|
|
69
|
+
| Tool calls | `ToolCallGroup` (several) or `ToolCallCard` (one): name, kind, status, duration, inputs, result, error, retry |
|
|
70
|
+
| A call's result | `CallResult`, `ToolCallResultChip` |
|
|
71
|
+
| A plan | `PlanList` |
|
|
72
|
+
| The run's trace | `RunTimeline` (`stroke` in the transcript or under a reply, `waterfall` / `list` in an inspector) |
|
|
73
|
+
| Raw logs | `LogStream` |
|
|
74
|
+
| A payload | `JsonViewer` |
|
|
75
|
+
| A diff the agent made | `DiffReview`, `DiffView` / `CodeBlock` for code |
|
|
76
|
+
| Asking permission | `ApprovalRequest`, `ApprovalStack` |
|
|
77
|
+
| Asking a question | `QuestionCard`, `AgentQuestion` |
|
|
78
|
+
| Work in the background | `BackgroundTaskCard`, `BackgroundTaskIsland`, `AgentRunBar` |
|
|
79
|
+
| What the agent is doing now, compactly | `AgentIsland` (a floating pill) |
|
|
80
|
+
| Cost, usage, context | `UsageMeter`, `ContextMeter` |
|
|
81
|
+
| Errors from the model, policy notices | `ModelErrorNotice`, `PolicyNotice` |
|
|
82
|
+
| Memories | `MemoryList`, `ProvenanceBadge` |
|
|
83
|
+
| Something the agent made | `ArtifactCard`, `ArtifactPanel` |
|
|
84
|
+
|
|
85
|
+
## Inputs and actions
|
|
86
|
+
|
|
87
|
+
| You want | Use |
|
|
88
|
+
| --- | --- |
|
|
89
|
+
| A labelled field | `Field` around `TextField`, `TextArea`, `Select`, `NativeSelect`, `DatePicker` |
|
|
90
|
+
| On or off | `Switch` (in a row), `Checkbox` |
|
|
91
|
+
| One of a few | `SegmentedControl` (2–4 short options), `RadioGroup`, `ToggleGroup` |
|
|
92
|
+
| A slider | `Slider` |
|
|
93
|
+
| A one-time code | `InputOTP` |
|
|
94
|
+
| A field with an addon | `InputGroup` family |
|
|
95
|
+
| Buttons | `PrimaryButton` (the one main action), `SecondaryButton`, `IconButton` (`fill`, `glass`, `pane`), `ButtonGroup` |
|
|
96
|
+
| A menu | `Menu` family, `PickerMenu`, `ContextMenu` |
|
|
97
|
+
| Command palette | `CommandDialog` / `CommandMenu` |
|
|
98
|
+
| Overlays | `Dialog`, `AlertDialog` (confirm), `Sheet`, `Popover`, `HoverCard`, `Tooltip` |
|
|
99
|
+
| Tabs in a page | `Tabs`; in an inspector, `PageTabBar` + `SegmentedControl` |
|
|
100
|
+
|
|
101
|
+
## People and identity
|
|
102
|
+
|
|
103
|
+
| You want | Use |
|
|
104
|
+
| --- | --- |
|
|
105
|
+
| A person or chat avatar | `Avatar` (`kind="person"` or `"chat"`), `AvatarGroup` |
|
|
106
|
+
| A tile with an icon | `IconTile` (with a palette class), `IconCircle` |
|
|
107
|
+
| An inspector's header | `InspectorHeader` (`identity` with an avatar, or `title`) |
|
|
108
|
+
| Actions under a header | `ModulePair` + `IdentityModule` / `ActionsModule` |
|
|
109
|
+
| A live status card | `StatusCard` + `SummaryRow` |
|