Pyric
Navigate

API reference

@pyric/ui/agents

21 published symbols from @pyric/ui

Generated from the TypeScript declarations shipped at this import path.

Interfaces

ContextWindowMeterProps

Properties

PropertyType
buttonClassName?string
className?string
formatTokens?(tokens: number) => string
onOpen?() => void
ringClassName?string
ringInnerClassName?string
snapshotContextWindowSnapshot
tooltipClassName?string

ContextWindowPanelProps

Properties

PropertyType
className?string
formatTokens?(tokens: number) => string
onCompactNow?() => void
slots?ClassSlots
snapshotContextWindowSnapshot

ContextWindowRingProps

Properties

PropertyType
className?string
innerClassName?string
size?number
snapshotContextWindowSnapshot
style?CSSProperties

EmptyStateProps

Properties

PropertyTypeDescription
body?ReactNode-
className?string-
icon?ReactNodeOptional pre-rendered icon node — consumers pass whatever icon primitive their app uses (Material Symbols span, lucide-react component, plain SVG, …).
titleReactNode-

FoldProps

@pyric/ui/agents — headless structural components for agentic UIs (chat surfaces, tool-call drill-ins, streaming state indicators).

Matches the rest of @pyric/ui: zero shipped CSS. Components emit data-pyric-* attributes and accept className slots. Consumers bring their own design system (Tailwind, CSS modules, plain CSS) and attach styling via attribute selectors or class names.

Properties

PropertyTypeDescription
bodyClassName?stringForwarded to the body wrapper revealed when open.
childrenReactNodeRevealed when the user expands.
className?stringForwarded to the root <details> element.
defaultOpen?boolean-
headerReactNodeVisible summary line, always rendered.
headerAction?ReactNodeOptional right-aligned action (e.g. a copy button). Children should stopPropagation so clicks don’t toggle the fold.
summaryClassName?stringForwarded to the <summary> element.
tone?FoldToneSurfaced via [data-pyric-fold-tone] so consumers can tint the summary or border based on semantic context (error / thought). Defaults to normal.

ModalProps

Properties

PropertyTypeDescription
ariaLabel?string-
backdropClassName?stringForwarded to the backdrop element.
childrenReactNode-
className?stringForwarded to the root wrapper (covers the full viewport).
onClose() => void-
openboolean-
panelClassName?stringForwarded to the inner panel.

PulsingDotProps

Properties

PropertyTypeDescription
className?stringForwarded to the outer wrapper. Consumers attach all visual styling (size, animation, color) via this hook or by selecting on [data-pyric-ui="pulsing-dot"].

RequestUsageTimelineProps

Properties

PropertyType
className?string
empty?ReactNode
formatTokens?(tokens: number) => string
onOpenTool?(messageId: string, callId: string) => void
requestsreadonly SessionRequestUsage[]
slots?ClassSlots

SessionSpendSummaryProps

Properties

PropertyType
className?string
currentContextTokens?number
formatTokens?(tokens: number) => string
slots?ClassSlots
usage?SessionTokenUsage

TokenUsageInlineProps

Properties

PropertyType
className?string
formatTokens?(tokens: number) => string
labelClassName?string
usage?SessionTokenUsage
valueClassName?string

Type Aliases

FoldTone

type FoldTone = "normal" | "error" | "thought";

@pyric/ui/agents — headless structural components for agentic UIs (chat surfaces, tool-call drill-ins, streaming state indicators).

Matches the rest of @pyric/ui: zero shipped CSS. Components emit data-pyric-* attributes and accept className slots. Consumers bring their own design system (Tailwind, CSS modules, plain CSS) and attach styling via attribute selectors or class names.

Functions

ContextWindowMeter()

function ContextWindowMeter(__namedParameters: ContextWindowMeterProps): Element;

Parameters

ParameterType
__namedParametersContextWindowMeterProps

Returns

Element


ContextWindowPanel()

function ContextWindowPanel(__namedParameters: ContextWindowPanelProps): Element;

Parameters

ParameterType
__namedParametersContextWindowPanelProps

Returns

Element


ContextWindowRing()

function ContextWindowRing(__namedParameters: ContextWindowRingProps): Element;

Parameters

ParameterType
__namedParametersContextWindowRingProps

Returns

Element


EmptyState()

function EmptyState(__namedParameters: EmptyStateProps): Element;

Headless zero-state. Structural only: icon slot, title, optional body, all wrapped in a flex container marked [data-pyric-ui="empty-state"]. Consumers attach all visual styling.

Parameters

ParameterType
__namedParametersEmptyStateProps

Returns

Element


Fold()

function Fold(__namedParameters: FoldProps): Element;

Headless disclosure container — native <details> for keyboard / a11y. Ships zero visual styling. Consumers style via the three className slots or by selecting on:

[data-pyric-ui=“fold”] — root <details> [data-pyric-ui=“fold”][open] — expanded state [data-pyric-fold-tone=“error”] — error tint [data-pyric-fold-tone=“thought”] — thought-stream tint [data-pyric-fold-summary] — clickable summary row [data-pyric-fold-chevron] — disclosure indicator slot [data-pyric-fold-body] — revealed body wrapper

Parameters

ParameterType
__namedParametersFoldProps

Returns

Element


function Modal(__namedParameters: ModalProps): Element;

Headless modal — provides behavior only (Escape-to-close, backdrop click, aria-modal). Consumers attach all visual styling via the three className slots or by selecting on the emitted data attributes:

[data-pyric-ui=“modal”] — root viewport wrapper [data-pyric-modal-backdrop] — clickable backdrop [data-pyric-modal-panel] — inner panel containing children

Parameters

ParameterType
__namedParametersModalProps

Returns

Element


PulsingDot()

function PulsingDot(__namedParameters: PulsingDotProps): Element;

Headless “live / streaming” indicator. Ships zero visual styling.

Renders three nested spans so consumers can style ring + core independently:

Animation, color, and size are entirely consumer-defined.

Parameters

ParameterType
__namedParametersPulsingDotProps

Returns

Element


RequestUsageTimeline()

function RequestUsageTimeline(__namedParameters: RequestUsageTimelineProps): Element;

Parameters

ParameterType
__namedParametersRequestUsageTimelineProps

Returns

Element


SessionSpendSummary()

function SessionSpendSummary(__namedParameters: SessionSpendSummaryProps): Element;

Parameters

ParameterType
__namedParametersSessionSpendSummaryProps

Returns

Element


TokenUsageInline()

function TokenUsageInline(__namedParameters: TokenUsageInlineProps): Element;

Parameters

ParameterType
__namedParametersTokenUsageInlineProps

Returns

Element