Download apps/vis/web/src/components/wire/WireHeadline.tsx from SaylorTwift/kimi-code: direct link, hf CLI and curl.
- Browser
- Download file 678 Bytes
-
https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vis/web/src/components/wire/WireHeadline.tsx
- Command line
-
hf download hf://SaylorTwift/kimi-code/apps/vis/web/src/components/wire/WireHeadline.tsx
-
curl -L -o WireHeadline.tsx https://huggingface.co/SaylorTwift/kimi-code/resolve/main/apps/vis/web/src/components/wire/WireHeadline.tsx
678 Bytes
| import type { AgentRecord } from '../../types'; | |
| import { Dim, type HeadlineRender } from './parts'; | |
| import { rendererFor } from './renderers'; | |
| export type { HeadlineRender }; | |
| /** Render the collapsed-headline for a wire record. Thin dispatch to the | |
| * per-kind registry; unknown runtime kinds (best-effort parse of a | |
| * future/legacy/foreign protocol) get a generic fallback so the row never | |
| * crashes the tab. */ | |
| export function renderHeadline(r: AgentRecord): HeadlineRender { | |
| const renderer = rendererFor(r.type); | |
| if (renderer !== undefined) return renderer.headline(r); | |
| return { | |
| main: <Dim>(unknown record type: {(r as { type: string }).type})</Dim>, | |
| }; | |
| } | |