Import
import { AgentCard, agentsToPickerOptions, Chat, Message, useAgent, useChat } from "veryfront/chat";
Examples
Basic chat (preset)
import { Chat, useChat } from "veryfront/chat";
export default function Page() {
const chat = useChat();
return <Chat chat={chat} />;
}
Custom layout (composition)
import { Chat, useChat } from "veryfront/chat";
export default function Page() {
const chat = useChat();
return (
<Chat.Root messages={chat.messages} input={chat.input}>
<Chat.If condition={(ctx) => ctx.isEmpty}>
<Chat.Empty title="Ask me anything" />
</Chat.If>
<Chat.MessageList messages={chat.messages} />
<Chat.Input
input={chat.input}
onChange={chat.handleInputChange}
onSubmit={chat.handleSubmit}
/>
</Chat.Root>
);
}
Per-message control (compound)
import { Message } from "veryfront/chat";
<Message.Root message={msg}>
<Message.Avatar />
<Message.Content />
<Message.Actions />
</Message.Root>;
Type Reference
UseChatOptions
Options accepted by use chat.
| Property | Type | Description | Source |
|---|---|---|---|
api? | string | AG-UI endpoint. Defaults to “/api/ag-ui”. | source |
transport? | "ag-ui" | Streaming response protocol used by the endpoint. AG-UI is the default. | source |
initialMessages? | ChatMessage[] | Pre-populated messages | source |
body? | Record<string, unknown> | Extra body fields sent with each request | source |
headers? | Record<string, string> | Custom request headers | source |
credentials? | RequestCredentials | Fetch credentials mode | source |
model? | string | Override model at runtime (e.g. “openai/gpt-4o”, “Anthropic/claude-sonnet-4-5-20250929”) | source |
onResponse? | (response: Response) => void | Raw response callback | source |
onFinish? | (message: ChatMessage) => void | Completion callback | source |
onError? | (error: Error) => void | Error callback | source |
onToolCall? | (arg: OnToolCallArg) => void | Promise<void> | Tool call handler for client-side execution | source |
UseChatResult
useChat result
| Property | Type | Description | Source |
|---|---|---|---|
messages | ChatMessage[] | All messages in the conversation | source |
input | string | Current input value | source |
isLoading | boolean | Whether a request is in flight | source |
status | ChatStatus | Streaming lifecycle of the current turn (AI-SDK parity). | source |
streamingMessageId | string | null | Id of the assistant message currently streaming, or null when idle. | source |
error | Error | null | Last error (if any) | source |
model | string | undefined | Current model override (undefined = use agent default) | source |
activeModel | string | undefined | The actual model being used after auto-upgrade (e.g. “Anthropic/claude-sonnet-4-20250514”) | source |
inferenceMode | InferenceMode | Where inference is currently happening | source |
setInput | (input: string) => void | Set input value | source |
setModel | (model: string | undefined) => void | Change the model for subsequent requests | source |
sendMessage | (message: { text: string; files?: ChatFilePart[] }) => Promise<void> | Send a message programmatically | source |
editMessage | (messageId: string, newText: string) => Promise<void> | Edit a user message and resubmit - truncates history to that point | source |
getBranches | (messageId: string) => BranchInfo | Get branch info for a message (returns ; total=1 if no branches) | source |
switchBranch | (messageId: string, branchIndex: number) => void | Switch to a different branch at a given message | source |
reload | () => Promise<void> | Re-send last user message | source |
stop | () => void | Abort current request | source |
setMessages | (messages: ChatMessage[]) => void | Replace message history | source |
addToolOutput | (output: ToolOutput) => void | Submit client-side tool result | source |
data? | unknown | Extra data from server response | source |
handleInputChange | (e: React.ChangeEvent<HTMLInputElement | HTMLTextAreaElement>) => void | Bind to input onChange | source |
handleSubmit | (e?: React.FormEvent) => Promise<void> | Submit current input | source |
UseAgentOptions
Options accepted by use agent.
UseAgentResult
Result returned from use agent.
| Property | Type | Description | Source |
|---|---|---|---|
messages | AgentMessage[] | Message history | source |
toolCalls | ToolCall[] | Active tool calls | source |
status | AgentStatus | Agent status | source |
thinking? | string | Thinking/reasoning text | source |
invoke | (input: string) => Promise<void> | Invoke the agent | source |
stop | () => void | Stop agent execution | source |
isLoading | boolean | Loading state | source |
error | Error | null | Error state | source |
Exports
Components
| Name | Description | Source |
|---|---|---|
AgentAvatar | Render agent avatar, falling back to model identity when agent identity is absent. | source |
AgentCard | AgentCard - render <AgentCard {...props} /> for the default card, or compose AgentCard.Header / Reasoning / Tools / Body for a custom layout. Mirrors the ToolCall compound: render it, or compose it. | source |
AgentPicker | AgentPicker - render <AgentPicker agents={...} .../> for the default data-driven combobox, or compose AgentPicker.Trigger, Content, Search, List, Item, Create, and Manage for a custom menu. | source |
AppShell | Compound AppShell. Compose: | source |
AttachmentPill | AttachmentPill - render <AttachmentPill attachment={…} /> for the default chip, or compose AttachmentPill.Root + .Thumbnail / .Icon / .Label / .Retry / .Remove for a custom layout. | source |
AttachmentsPanel | AttachmentsPanel - render <AttachmentsPanel uploads={…} /> for the default panel, or compose AttachmentsPanel.Root + List / Item / Empty / Action for a custom layout. Mirrors the ToolCall / Sources compounds: render it, or compose it. | source |
BranchPicker | Branch picker with addressable previous, count, and next leaves. | source |
Chat | Render chat components through the preset or its composable sub-parts. | source |
ChatActions | ChatActions - render <ChatActions onAttachFiles={…} actions={…} /> for the default preset menu, or compose ChatActions.Trigger / Content / Item (each reads useChatActions()) for a custom menu. Mirrors the ToolCall compound: render it, or compose it. | source |
ChatAgentPicker | Render the connected agent switcher, or nothing when there’s nothing to switch. | source |
ChatContextProvider | Render chat context provider. | source |
ChatEmpty | Render the chat empty state. It renders whatever it is given and never hides itself: in a custom layout, gate it on the thread being empty with <Chat.If condition={(ctx) => ctx.isEmpty}>. The <Chat> preset does this for you. | source |
ChatEmptyState | Compound empty state. Use the namespaced parts to compose the view: Root, Avatar, Heading, Suggestions, Suggestion. | source |
ChatIf | Render chat if. | source |
ChatInput | ChatInput - render <ChatInput … /> for the default composer, or compose ChatInput.Field + ChatInput.Send/Stop/Voice/Model/Attach/Export. | source |
ChatInputAttach | Attachment + control. When attaching files is the only action, + opens the file dialog directly. When onSelectAttachment is also set it becomes a portalled + menu (Studio PromptForm’s PlusMenu) with “Add photos & files” and “Select document”. | source |
ChatInputContextProvider | Provider for <ChatInput> context (RFC 2980 name). | source |
ChatInputExport | Download the supplied conversation as Markdown. | source |
ChatInputField | The multiline text editor. | source |
ChatInputModel | Model selector - shows when models are configured. | source |
ChatInputRoot | ChatInput.Root - the provider shell for a fully custom composer. Supplies ChatInputContext from props and renders your children, so you arrange ChatInput.Field + the toolbar sub-parts yourself (like Message.Root). The default <ChatInput> is exactly this Root plus the standard body. | source |
ChatInputSend | Send button, shown while the composer is idle. | source |
ChatInputStop | Stop button, shown while the composer is streaming. | source |
ChatInputSubmit | Switch between send and stop states with one control. | source |
ChatInputToolbar | ChatInput.Toolbar - a semantic layout slot for the composer’s action row. Group/reorder the action sub-parts (ChatInput.Attach/.Model/.Export/ .Voice/.Send) inside it without re-implementing the composer. Pure layout: the children read their own ChatInputContext, so <ChatInput.Toolbar> just mirrors the default action-row wrapper classes. | source |
ChatInputVoice | Voice button, shown when the idle composer is empty. | source |
ChatMessageList | Render the default message list or compose its centered Content column. | source |
ChatMessagesSkeleton | Render the loading skeleton for a chat thread. | source |
ChatRoot | Render chat root. | source |
ChatSidebar | Render a chat sidebar - usable as <ChatSidebar /> or <ChatSidebar.Root>…. | source |
ChatThemeScope | Wrap chat primitives in the [data-vf-ui] token scope so they’re themed. | source |
CodeBlock | Render escaped source or delegate to explicit syntax/diagram capabilities. | source |
CodeSurface | Render through an explicit extension capability or escaped plain source. | source |
ComposerContextProvider | Render composer context provider. | source |
CONVERSATION_STORAGE_LIMITS | Explicit resource limits applied on both the read and write paths. | source |
ConversationEmptyState | State for conversation empty. | source |
ConversationsContextProvider | Low-level context provider (value supplied by the caller). | source |
ConversationScrollButton | Render conversation scroll button. | source |
ConversationsProvider | ConversationsProvider - calls useConversations once with your store / id / onSelect and shares it via ConversationsContext. Declare persistence + router wiring here, once, at the app layout; children read it with useConversationsContext. | source |
CopyButton | source | |
DEFAULT_CHAT_STREAM_IDLE_TIMEOUT_MS | Default value for chat stream idle timeout ms. | source |
DEFAULT_CHAT_STREAM_TOOL_RUNNING_TIMEOUT_MS | Default value for chat stream tool running timeout ms. | source |
DropZoneOverlay | Drag overlay shown over the composer while files are dragged onto it - the glyph-in-a-circle + “Drop files” from Studio’s PromptForm. Rendered inside a relative card; fills it and blurs the content behind. | source |
ErrorBanner | Render error banner. Mirrors Studio’s inline chat retry banner: an amber warning alert with a leading triangle icon and a small filled “Try again” button (not a low-emphasis error pill). | source |
FadeIn | Render fade in. | source |
InferenceBadge | Render inference badge. | source |
InlineCitation | Render the default citation or compose its Trigger and Card parts. | source |
Loader | Render loader. | source |
Markdown | Present Markdown source using an injected rich renderer or the explicit dependency-free plain-source contract. | source |
Message | Message - render <Message message={msg} /> for the default turn, or compose Message.Root + Message.Header/Content/Actions/… for a custom layout. | source |
MessageActionBar | Context-free message actions with addressable Copy, Copied, Regenerate, and Edit icon leaves. | source |
MessageContextProvider | Render message context provider. | source |
MessageEditForm | Render message edit form. | source |
MessageFeedback | Message feedback with addressable positive and negative action leaves. | source |
ModelAvatar | Render model avatar. | source |
ModelSelector | ModelSelector - render <ModelSelector models={...} .../> for the default data-driven combobox, or compose ModelSelector.Trigger, Content, Search, List, and Item for a custom menu. | source |
QuickActions | Render quick actions. | source |
Reasoning | Reasoning - render <Reasoning text={…} /> for the default disclosure, or compose Reasoning.Trigger + Reasoning.Content for a custom layout. Mirrors the Message / ToolCall compounds: render it, or compose it. | source |
RichCodeBlock | Render rich code block. | source |
Shimmer | Render shimmer. | source |
SkillBadge | Render skill badge. | source |
SourcePill | Render a single source pill with hover preview and score-color behaviour. | source |
Sources | Sources - render <Sources sources={…} /> for the default row, or compose Sources.Root + Sources.List + Sources.Pill for a custom layout. Mirrors the ToolCall / Reasoning compounds: render it, or compose it. | source |
StepIndicator | StepIndicator - render <StepIndicator stepIndex={…} isComplete /> for the default divider, or compose StepIndicator.Root + .Rule / .Label for a custom layout. Mirrors the ToolCall / Sources compounds. | source |
Suggestion | Render suggestion. | source |
Suggestions | Render suggestions. | source |
Tabs | Tablist container - manages active state and passes context to items. | source |
TabsItem | Individual tab - renders as a button, or an anchor when href is set. Forwards native props/ref and composes the caller’s onClick with the internal selection (caller’s runs first, then the tab activates), so a consumer-supplied handler adds to - never overrides - selection. | source |
TabSwitcher | Render tab switcher. | source |
ToolCall | ToolCall - render <ToolCall tool={part} /> for the default card. invoke_agent calls use a child-agent card by default. Pass children to replace the default, or compose ToolCall.Trigger / Body / Input / Output / Error for a custom layout. Mirrors the Message compound: render it, or compose it. | source |
ToolStatusBadge | Render tool status badge. | source |
Functions
| Name | Description | Source |
|---|---|---|
agentsToPickerOptions | Narrow browser-safe agent metadata to the picker’s row shape. AgentOption now shares AgentMetadata’s avatarUrl field, so AgentMetadata[] is also accepted by <AgentPicker agents> directly - this helper just drops the fields the rows don’t use. | source |
buildChatStreamChunkMessageMetadata | Builds chat stream chunk message metadata. | source |
createChatStreamWatchdog | Create chat stream watchdog backed by the lifecycle deadline primitive. | source |
createChatStreamWatchdogState | State for create chat stream watchdog. | source |
dedupeChatUiMessageChunks | Dedupe chat UI message chunks. | source |
downloadMarkdown | Download messages as a .md file. | source |
exportAsMarkdown | Convert chat messages to a markdown string. | source |
extractChatMessageMetadata | Extract chat message metadata. | source |
extractSourcesFromParts | Extract sources from native citations and tool result parts. Native source parts map directly, while tool outputs may expose a documents array. | source |
getAgentPromptSuggestions | Return prompt text suggestions that the current Chat component can render. | source |
getNextChatStreamWatchdogState | State for get next chat stream watchdog. | source |
getTextContent | Get text content from chat message parts | source |
groupPartsInOrder | Group consecutive parts for ordered rendering Returns an array of groups, each containing either consecutive text parts, a tool part, or a reasoning part | source |
isHeartbeatOnlyMetadataChunk | Check whether a chunk only carries heartbeat metadata. | source |
isLongRunningToolRunning | Compatibility helper. Under strict lifecycle deadlines long-running tool names no longer disable the absolute tool-running deadline; in legacy mode they still do. Also exported for callers that classify tool activity. | source |
isReasoningPart | Check if a part is a reasoning part | source |
isSkillToolPart | Check if a tool part is a skill-related tool. | source |
isToolPart | Check if a part is a tool part | source |
localConversationStore | localStorage-backed conversation persistence. Pass a storage to back it with another Web-Storage-like implementation. Every operation requires the Web Locks API so concurrent browser contexts cannot lose index updates. | source |
mapHostedStreamPartToChatUiChunks | Map hosted stream part to chat UI chunks. | source |
memoryConversationStore | In-memory conversation persistence. Optionally seed with initial conversations. | source |
mergeProps | Merge one override object onto base props: on* handlers compose (override first, internal skipped if defaultPrevented), className concatenates via cx (consumer appended last), everything else is override-wins. Exported for composing several getters onto one element. | source |
normalizeAgentMetadata | Normalize a single browser-safe agent record (the agent object inside the /api/agents/:id response, or one entry of the /api/agents list). | source |
normalizeAgentMetadataResponse | Normalize the wire response from /api/agents/:id. | source |
normalizeAgentsListResponse | Normalize the wire response from GET /api/agents. | source |
normalizeChatMessageMetadata | Normalizes chat message metadata. | source |
normalizeChatUiMessageChunk | Normalizes chat UI message chunk. | source |
normalizeChatUiMessageStream | Normalizes chat UI message stream. | source |
useAgent | React hook for agent. | source |
useAgentMetadata | React hook for browser-safe source-defined agent metadata. | source |
useAgents | React hook that lists the browser-safe agents a project exposes, via GET /api/agents. Companion to useAgentMetadata (single agent) - use it to drive an agent switcher, e.g. only rendering a picker when agents.length > 1. | source |
useAttachments | useAttachments - the headless state hook for chat attachments: a persistent, cross-conversation registry of uploaded files with the upload / remove / list actions. This is the domain primitive; render any UI on top of it (the AttachmentsPanel / AttachmentPill components are one skin - bring your own). | source |
useChat | The core chat session hook: manages messages, streaming status, input, submit, regenerate, and branch navigation for a conversation. Powers <Chat> (L1) and is the L3 headless entry point for building a fully custom chat UI. | source |
useChatContextOptional | React hook for chat context optional. | source |
useChatErrorHandler | Handler for use chat error. | source |
useChatInput | L3 headless composer hook. Must be used within a <ChatInput> / <Chat>. | source |
useChatScroll | useChatScroll is the canonical chat scroll hook (RFC 2980). A superset of useStickToBottom: same scrollRef/contentRef/isAtBottom/ scrollToBottom, plus viewportRef, scrollToStart/scrollToEnd, scrollToMessage(id), and getViewportProps() for headless composition. Backward-compatible. Prefer this name in new code. | source |
useClipboard | Copy text and expose transient success or failure feedback. | source |
useCompletion | useCompletion hook for single text generation | source |
useComposerContextOptional | React hook for composer context optional. | source |
useConversation | Load one full conversation by id, over a swappable async store. | source |
useConversationChat | Bind the active conversation to an isolated chat session and persistence sink. | source |
useConversations | List + active + persistence for conversations, over a swappable async store. | source |
useConversationsContextOptional | Read the shared conversations state, or null when there is no provider. | source |
useMessageBranches | useMessageBranches is a thin hook over the message context’s branch state (getBranches / switchBranch on useChat, surfaced as branch + onBranchPrev/Next). Powers Message.BranchPicker; RFC 2980. Must be used within a <Message>. | source |
useMessageContextOptional | React hook for message context optional. | source |
useMessageParts | useMessageParts - read the current message’s parts as data, so a consumer can render them however they like (the headless access point to parts; Message.Part is the leaf and Message.Content provides the default rendering). Throws outside a Message. | source |
useStickToBottom | Track and maintain “stick to bottom” for a scroll container. Attach scrollRef to the scrollable container and contentRef to the element that grows as messages / tokens arrive; the hook follows that growth while the user is pinned to the bottom. | source |
useStreaming | React hook for streaming. | source |
useUpload | Drive file uploads and expose the resulting attachment lifecycle. | source |
useUploadsRegistry | useAttachments - the headless state hook for chat attachments: a persistent, cross-conversation registry of uploaded files with the upload / remove / list actions. This is the domain primitive; render any UI on top of it (the AttachmentsPanel / AttachmentPill components are one skin - bring your own). | source |
useVoiceInput | Input payload for use voice. | source |
Classes
| Name | Description | Source |
|---|---|---|
ChatErrorBoundary | Implement chat error boundary. | source |
ChatStreamIdleTimeoutError | Error shape for chat stream idle timeout. | source |
ConversationStoreError | Normalized persistence failure. Store implementations should reject rather than resolve when an operation did not complete; the React hooks wrap custom adapter rejections in this error so consumers can branch on operation without parsing an error message. | source |
Types
| Name | Description | Source |
|---|---|---|
ActiveConversationLoadFailure | A failed provider-owned active-record load, attributed to its exact id. | source |
AgentAvatarProps | Props accepted by agent avatar. | source |
AgentCardContextValue | Per-card state shared with AgentCard.* sub-parts. | source |
AgentCardProps | Props accepted by agent card. | source |
AgentMetadata | Browser-safe source-defined agent metadata. | source |
AgentMetadataPromptSuggestion | Source-defined prompt suggestion shown by chat surfaces. | source |
AgentMetadataSuggestion | Source-defined agent suggestion. | source |
AgentMetadataSuggestions | Source-defined suggestion group for an agent. | source |
AgentMetadataTaskSuggestion | Source-defined task suggestion shown by chat surfaces. | source |
AgentOption | A selectable agent entry. | source |
AgentPickerActionProps | Props shared by AgentPicker.Create and AgentPicker.Manage. | source |
AgentPickerContentProps | Props for AgentPicker.Content, the popover surface and Command shell. | source |
AgentPickerContextValue | Shared selection and open state exposed to AgentPicker.* sub-parts. | source |
AgentPickerItemProps | Props for AgentPicker.Item, a single selectable agent row. | source |
AgentPickerProps | Props accepted by <AgentPicker>. | source |
AgentPickerSearchProps | Props for AgentPicker.Search, the addressable search input leaf. | source |
AgentPickerSection | A labelled group of agents (e.g. “Connected Agents”). | source |
AgentPickerTriggerProps | Props for AgentPicker.Trigger, the pill/input combobox button. | source |
AgentTheme | Public API contract for agent theme. | source |
AppShellHeaderProps | Props accepted by AppShellHeader. | source |
AppShellOpenState | Per-side visibility map. | source |
AppShellProps | Props accepted by AppShell. | source |
AppShellSide | Which edge a sidebar docks to. | source |
AppShellSidebarProps | Props accepted by AppShellSidebar. | source |
AppShellTriggerProps | Props accepted by AppShellTrigger. | source |
AttachmentInfo | Public API contract for attachment info. | source |
AttachmentPillContextValue | Derived per-pill view state shared with AttachmentPill.* sub-parts. | source |
AttachmentPillProps | Props accepted by attachment pill. | source |
AttachmentsPanelActionProps | Props for AttachmentsPanel.Action - the upload/attach button. | source |
AttachmentsPanelContextValue | Per-panel state shared with AttachmentsPanel.* sub-parts. | source |
AttachmentsPanelEmptyProps | Props for AttachmentsPanel.Empty - the no-files state. | source |
AttachmentsPanelHeaderProps | Props for AttachmentsPanel.Header - the title row + close button. | source |
AttachmentsPanelItemProps | Props accepted by an individual AttachmentsPanel.Item (attachment card). | source |
AttachmentsPanelListProps | Props for AttachmentsPanel.List - the scrollable list of file rows. | source |
AttachmentsPanelLoadingProps | Props for AttachmentsPanel.Loading - the initial-fetch placeholder. | source |
AttachmentsPanelProps | Props accepted by AttachmentsPanel / AttachmentsPanel.Root. | source |
BranchInfo | Public API contract for branch info. | source |
BranchPickerActionProps | Props shared by BranchPicker.Previous and BranchPicker.Next. | source |
BranchPickerCountProps | Props accepted by BranchPicker.Count. | source |
BranchPickerProps | Props accepted by branch picker. | source |
BuildChatStreamChunkMessageMetadataInput | Input payload for build chat stream chunk message metadata. | source |
ChatActionItem | A single data-driven action row in the <ChatActions> menu. | source |
ChatActionsContentProps | Props for ChatActions.Content, the dropdown surface. | source |
ChatActionsContextValue | Shared state exposed to ChatActions.* sub-parts via useChatActions(). | source |
ChatActionsItemProps | Props for ChatActions.Item, a single selectable menu row. | source |
ChatActionsProps | Props accepted by <ChatActions> / <ChatActions.Root>. | source |
ChatActionsSettings | The two toggle settings surfaced in the Settings submenu. | source |
ChatActionsSlottedTriggerProps | Literal slotted-element props for ChatActions.Trigger. | source |
ChatActionsTriggerProps | Backward-compatible props for ChatActions.Trigger. | source |
ChatAgentInfo | Agent identity + agent-driven content for <Chat>. Collapses the old agent / models / suggestion props into one object. In app mode (agentId) this is derived from agent metadata automatically; pass it yourself to drive a controlled chat. | source |
ChatAgentPickerProps | Props accepted by <ChatAgentPicker>. | source |
ChatContextValue | Public API contract for chat context value. | source |
ChatDynamicToolPart | Public API contract for chat dynamic tool part. | source |
ChatEmptyProps | Props accepted by chat empty. | source |
ChatEmptyStateAvatarProps | Props accepted by <ChatEmptyState.Avatar>. | source |
ChatEmptyStateHeadingProps | Props accepted by <ChatEmptyState.Heading>. | source |
ChatEmptyStateRootProps | Props accepted by <ChatEmptyState.Root>. | source |
ChatEmptyStateSuggestionProps | Props accepted by <ChatEmptyState.Suggestion>. | source |
ChatEmptyStateSuggestionsProps | Props accepted by <ChatEmptyState.Suggestions>. | source |
ChatErrorBoundaryProps | Props accepted by chat error boundary. | source |
ChatFinishReason | Public API contract for chat finish reason. | source |
ChatIfProps | Props accepted by chat if. | source |
ChatInputActionProps | Backward-compatible props shared by every ChatInput action leaf. | source |
ChatInputAttachProps | Props accepted by <ChatInput.Attach>. | source |
ChatInputContextValue | Shared state exposed by a <ChatInput> to its children (RFC 2980 name). | source |
ChatInputExportProps | Props accepted by <ChatInput.Export>. | source |
ChatInputFieldProps | Props accepted by <ChatInput.Field>. | source |
ChatInputModelProps | Props accepted by <ChatInput.Model>. | source |
ChatInputProps | Props accepted by ChatInput. | source |
ChatInputRootProps | Props accepted by <ChatInput.Root>. | source |
ChatInputSendProps | Props accepted by <ChatInput.Send>. | source |
ChatInputSlottedActionProps | Literal slotted action contract with an element-specific ref and event. | source |
ChatInputSlottedSubmitProps | Literal slotted props for the unified ChatInputSubmit control. | source |
ChatInputStopProps | Props accepted by <ChatInput.Stop>. | source |
ChatInputSubmitProps | Props for the unified ChatInputSubmit control. | source |
ChatInputToolbarProps | Props accepted by <ChatInput.Toolbar>. | source |
ChatInputVoiceProps | Props accepted by <ChatInput.Voice>. | source |
ChatMessage | Message shape for chat. | source |
ChatMessageListContentProps | Props accepted by the centered transcript column. | source |
ChatMessageListProps | Props accepted by chat message list. | source |
ChatMessageMetadata | Public API contract for chat message metadata. | source |
ChatMessageMetadataUsage | Public API contract for chat message metadata usage. | source |
ChatMessagePart | Public API contract for chat message part. | source |
ChatMessagesSkeletonProps | Props accepted by <ChatMessagesSkeleton>. | source |
ChatProps | Props accepted by chat. | source |
ChatReasoningPart | Chat message part that carries reasoning text. | source |
ChatRootProps | Props accepted by chat root. | source |
ChatSidebarComponent | Compound type - the preset plus its namespaced sub-components. | source |
ChatSidebarEmptyProps | Props accepted by ChatSidebarEmpty. | source |
ChatSidebarGroupProps | Props accepted by ChatSidebarGroup. | source |
ChatSidebarItemProps | source | |
ChatSidebarListProps | Props accepted by ChatSidebarList. | source |
ChatSidebarNewButtonProps | Props accepted by ChatSidebarNewButton. | source |
ChatSidebarProps | Props accepted by the ChatSidebar preset. | source |
ChatSidebarRootProps | Props accepted by ChatSidebarRoot. | source |
ChatStepPart | Public API contract for chat step part. | source |
ChatStreamEvent | Event emitted for chat stream. | source |
ChatStreamWatchdogOptions | Options accepted by chat stream watchdog. | source |
ChatStreamWatchdogPhase | Public API contract for chat stream watchdog phase. | source |
ChatStreamWatchdogState | State for chat stream watchdog. | source |
ChatTab | Public API contract for chat tab. | source |
ChatTextPart | Chat message part that carries text. | source |
ChatTheme | Public API contract for chat theme. | source |
ChatThemeScopeProps | Props accepted by ChatThemeScope. | source |
ChatToolPart | Public API contract for chat tool part. | source |
ChatToolResultPart | Chat message part that carries a tool result. | source |
ChatToolState | State for chat tool. | source |
ChatUiMessageChunk | Public API contract for chat UI message chunk. | source |
ChildRunAudit | Public API contract for child run audit. | source |
ChildRunAuditToolCall | Public API contract for child run audit tool call. | source |
ChildRunAuditToolResult | Result returned from child run audit tool. | source |
CodeBlockProps | Props accepted by code block. | source |
CodeSurfaceProps | Props accepted by CodeSurface. | source |
ComposerContextValue | Public API contract for composer context value. | source |
Conversation | A full conversation - metadata + its messages. Fetched via ConversationStore.load. | source |
ConversationEmptyStateProps | Props accepted by conversation empty state. | source |
ConversationPatch | Fields a conversation can be patched with. | source |
ConversationsContextValue | Value accepted by the low-level context provider. Persistence state is optional here so existing caller-supplied structural fixtures remain compatible; ConversationsProvider always supplies it. | source |
ConversationScrollButtonProps | Props accepted by conversation scroll button. | source |
ConversationsProviderProps | Props accepted by ConversationsProvider. | source |
ConversationStorageLimits | Named shape of the local conversation codec’s public resource limits. | source |
ConversationStore | Async persistence contract for conversations. Implement all four methods; subscribe/dispose are optional capabilities (feature-detect them). | source |
ConversationStoreOperation | Persistence operation associated with a ConversationStoreError. | source |
ConversationSummary | Lightweight conversation metadata - what a list / sidebar needs (no messages). | source |
CopyButtonProps | Props accepted by CopyButton. | source |
DropZoneOverlayProps | Props accepted by drop zone overlay. | source |
ErrorBannerProps | Props accepted by error banner. | source |
FeedbackValue | Public API contract for feedback value. | source |
HostedStreamPartForUiChunkMapping | Public API contract for hosted stream part for UI chunk mapping. | source |
HostedUiChunkMappingOptions | Options accepted by hosted UI chunk mapping. | source |
InferenceBadgeProps | Props accepted by inference badge. | source |
InferenceMode | Where inference is happening. | source |
InlineCitationCardProps | Props accepted by InlineCitation.Card. | source |
InlineCitationProps | Props accepted by inline citation. | source |
InlineCitationTriggerProps | Props accepted by InlineCitation.Trigger. | source |
MarkdownProps | Props accepted by Markdown. | source |
MessageActionBarActionProps | Props shared by the MessageActionBar.* action leaves. | source |
MessageActionBarProps | Props accepted by the context-free message action bar. | source |
MessageContextValue | Public API contract for message context value. | source |
MessageEditFormProps | Props accepted by message edit form. | source |
MessageFeedbackActionProps | Props shared by MessageFeedback.Positive and MessageFeedback.Negative. | source |
MessageFeedbackProps | Props accepted by message feedback. | source |
MessagePartsData | The message’s grouped parts exposed as headless data. | source |
MessageProps | Props accepted by <Message />. | source |
MessageRootProps | Props accepted by message root. | source |
MessageTokensProps | Props accepted by Message.Tokens. | source |
ModelAvatarProps | Props accepted by model avatar. | source |
ModelOption | A “provider/model” value and its display label. | source |
ModelSelectorContentProps | Props for ModelSelector.Content - the popover surface + Command shell. | source |
ModelSelectorContextValue | Shared selection + open state exposed to ModelSelector.* sub-parts. | source |
ModelSelectorItemProps | Props for ModelSelector.Item - a single selectable model row. | source |
ModelSelectorProps | Props accepted by <ModelSelector>. | source |
ModelSelectorSearchProps | Props for ModelSelector.Search, the addressable search input leaf. | source |
ModelSelectorTriggerProps | Props for ModelSelector.Trigger - the pill/icon combobox button. | source |
OnToolCallArg | Public API contract for on tool call arg. | source |
PartGroup | Part group types for ordered rendering | source |
QuickAction | Public API contract for quick action. | source |
QuickActionsProps | Props accepted by quick actions. | source |
ReasoningContextValue | Per-card state shared with Reasoning.* sub-parts. | source |
ReasoningProps | Props accepted by Reasoning / Reasoning.Root. | source |
ReasoningTriggerProps | Props for Reasoning.Trigger - the disclosure button. | source |
SkillBadgeProps | Props accepted by skill badge. | source |
Source | Public API contract for source. | source |
SourcePillProps | Props accepted by an individual source pill. | source |
SourcesContextValue | Per-list state shared with Sources.* sub-parts. | source |
SourcesListProps | Props for Sources.List - the flex-wrap row of pills. | source |
SourcesProps | Props accepted by Sources / Sources.Root. | source |
StepIndicatorContextValue | Per-indicator state shared with StepIndicator.* sub-parts. | source |
StepIndicatorProps | Props accepted by step indicator. | source |
StorageLike | The slice of the Web Storage API this adapter needs. | source |
SuggestionProps | Props accepted by suggestion. | source |
SuggestionsProps | Props accepted by suggestions. | source |
TabsItemProps | Props accepted by <TabsItem>. | source |
TabsProps | Props accepted by <Tabs> (the tablist container). | source |
TabSwitcherProps | Props accepted by tab switcher. | source |
TokenRowProps | One row in the token usage breakdown. | source |
ToolCallContextValue | Per-tool state shared with ToolCall.* sub-parts. | source |
ToolCallProps | Props accepted by ToolCall / ToolCall.Root. | source |
ToolCallTriggerProps | Props for ToolCall.Trigger - the header button. | source |
ToolOutput | Output from tool. | source |
UploadedFile | Public API contract for uploaded file. | source |
UseAgentMetadataResult | Result returned from useAgentMetadata. | source |
UseAgentOptions | Options accepted by use agent. | source |
UseAgentResult | Result returned from use agent. | source |
UseAgentsOptions | Options accepted by useAgents. | source |
UseAgentsResult | Result returned from useAgents. | source |
UseAttachmentsOptions | Options for useAttachments. | source |
UseAttachmentsRequestState | Additive remote-request status returned by useAttachments. | source |
UseAttachmentsResult | Result of useAttachments. | source |
UseAttachmentsStorageState | Additive cache-status contract returned by useAttachments. | source |
UseChatInputResult | Result of useChatInput. | source |
UseChatOptions | Options accepted by use chat. | source |
UseChatResult | source | |
UseChatScrollOptions | Options for useChatScroll. | source |
UseChatScrollResult | Result of useChatScroll, a superset of UseStickToBottomResult. | source |
UseClipboardResult | Result of useClipboard: transient copy feedback and a copy trigger. | source |
UseCompletionOptions | Options accepted by use completion. | source |
UseCompletionResult | Result returned from use completion. | source |
UseConversationChatOptions | useConversationChat - the library primitive that binds a useChat session to conversation persistence, so application code does not need to duplicate the persistence effect. | source |
UseConversationChatResult | Result returned by useConversationChat. | source |
UseConversationOptions | Options for useConversation. | source |
UseConversationPersistenceState | Additive persistence state returned by useConversation. It is kept separate from the original result interface so existing structural fixtures remain source-compatible. | source |
UseConversationResult | Result of useConversation. | source |
UseConversationsActiveLoadState | Additive active-record controls returned by useConversations. | source |
UseConversationsOptions | Options for useConversations. | source |
UseConversationsPersistenceState | Additive persistence state returned by useConversations. | source |
UseConversationsResult | Result of useConversations. | source |
UseMessageBranchesResult | Result of useMessageBranches, the message’s regeneration variants. | source |
UseStickToBottomOptions | Options for useStickToBottom. | source |
UseStickToBottomResult | Result of useStickToBottom. | source |
UseStreamingOptions | Options accepted by use streaming. | source |
UseStreamingResult | Result returned from use streaming. | source |
UseUploadOptions | Options for useUpload. | source |
UseUploadResult | Result of useUpload. | source |
UseUploadsRegistryOptions | Options for useAttachments. | source |
UseUploadsRegistryResult | Result of useAttachments. | source |
UseVoiceInputOptions | Options accepted by use voice input. | source |
UseVoiceInputResult | Result returned from use voice input. | source |
Constants
| Name | Description | Source |
|---|---|---|
useAgentCard | Read the enclosing <AgentCard>’s state (name, avatar, messages, tool calls, status, thinking text, and the derived status presentation) so a custom AgentCard.* sub-part can render it. Throws when used outside an AgentCard. | source |
useAgentPicker | Read the enclosing <AgentPicker>’s selection and open state (selected id, onSelect, open/setOpen, and the optional onCreate/onManage actions) from a custom sub-part. Throws when used outside an AgentPicker. | source |
useAppShell | source | |
useAttachmentPill | Read the derived per-pill state provided by AttachmentPill.Root. Use it to build a custom pill part; throws if called outside an AttachmentPill. | source |
useAttachmentsPanel | Read the panel state provided by AttachmentsPanel.Root (uploads + handlers). Use it to build a custom panel part; throws outside an AttachmentsPanel. | source |
useChatActions | Read the current ChatActions preset configuration from a composed ChatActions.* part. Throws outside ChatActions / ChatActions.Root. | source |
useChatContext | Read the enclosing chat’s shared state (messages, input, submit/stop, model, attachments, branches, theme). Provided by <Chat.Root> / <Chat>; throws when used outside one. | source |
useChatInputContext | Read the enclosing <ChatInput> context; throws outside one. | source |
useChatInputContextOptional | Read the enclosing <ChatInput> context, or null outside one. | source |
useChatSidebarItem | Read the enclosing <ChatSidebar.Item>’s row state (the conversation summary, active flag, rename availability + startRename, remove, and the … menu open state) from a custom item sub-part. Throws outside a <ChatSidebar.Item>. | source |
useComposerContext | source | |
useConversationsContext | source | |
useMessageContext | Read the enclosing message’s state (the message, role, streaming flag, parts, branch navigation, copy/edit/regenerate/feedback actions). Provided by <Message.Root>; throws when used outside a <Message>. | source |
useModelSelector | Read the current ModelSelector’s selection + open state from a ModelSelector.* sub-part. Throws when called outside a ModelSelector / ModelSelector.Root. | source |
useReasoning | Read the disclosure state provided by Reasoning.Root (text + open state). Use it to build a custom disclosure part; throws outside a Reasoning. | source |
useSources | Read the state provided by Sources.Root (sources + click handler). Use it to build a custom row part; throws when called outside a Sources. | source |
useStepIndicator | Read the current StepIndicator’s state from a StepIndicator.* sub-part. Throws when called outside a StepIndicator / StepIndicator.Root. | source |
useToolCall | Read the current ToolCall’s state from a ToolCall.* sub-part. Throws when called outside a ToolCall / ToolCall.Root. | source |
Deep imports
These import paths group focused functionality under this module. Each is a separate barrel; import only what you need.veryfront/chat/ag-ui
import {
createAgUiChatEventDecoderState,
decodeAgUiSseChunk,
flushAgUiSseChunk,
} from "veryfront/chat/ag-ui";
Components
| Name | Description | Source |
|---|---|---|
DEFAULT_AG_UI_MAX_FRAME_CHARS | Default maximum characters retained for one AG-UI SSE frame. | source |
Functions
| Name | Description | Source |
|---|---|---|
createAgUiChatEventDecoderState | State for create AG-UI chat event decoder. | source |
decodeAgUiSseChunk | Decode AG-UI SSE chunk. | source |
flushAgUiSseChunk | Flush AG-UI SSE chunk. | source |
mapAgUiRuntimeMessagesToChatUiMessages | Map AG-UI runtime messages to chat UI messages. | source |
parseSseEvent | Event emitted for parse sse. | source |
Types
| Name | Description | Source |
|---|---|---|
AgUiChatEventDecoderState | State for AG-UI chat event decoder. | source |
AgUiDecodedChunk | Public API contract for AG-UI decoded chunk. | source |
AgUiDecodedEvent | Event emitted for AG-UI decoded. | source |
AgUiDecoderValidationMode | Public API contract for AG-UI decoder validation mode. | source |
AgUiRunFinishedMetadata | Public API contract for AG-UI run finished metadata. | source |
AgUiRuntimeMessage | Message shape for AG-UI runtime. | source |
AgUiRuntimeToolCall | Public API contract for AG-UI runtime tool call. | source |
AgUiSnapshotMessage | Message shape for AG-UI snapshot. | source |
AgUiWireEvent | Event emitted for AG-UI wire. | source |
AgUiWireEventName | Public API contract for AG-UI wire event name. | source |
ParsedSseEvent | Event emitted for parsed sse. | source |
Constants
| Name | Description | Source |
|---|---|---|
getAgUiRunFinishedMetadataSchema | Zod schema for get AG-UI run finished metadata. | source |
getAgUiSnapshotMessageSchema | Zod schema for get AG-UI snapshot message. | source |
getAgUiSnapshotToolCallSchema | Zod schema for get AG-UI snapshot tool call. | source |
getAgUiWireEventNameSchema | Zod schema for get AG-UI wire event name. | source |
getAgUiWireEventSchema | Zod schema for get AG-UI wire event. | source |
veryfront/chat/message-prep
import {
compactForStep,
compactHistoricalUiMessageToolInputs,
compactOldToolInputs,
} from "veryfront/chat/message-prep";
Components
| Name | Description | Source |
|---|---|---|
DEFAULT_MESSAGE_PREP_LIMITS | Default limits for chat history preparation. | source |
Functions
| Name | Description | Source |
|---|---|---|
compactForStep | Compact for step. | source |
compactHistoricalUiMessageToolInputs | Compact large historical UI-message tool inputs after matching results are available. | source |
compactOldToolInputs | Compact large historical tool-call inputs after matching results are available. | source |
compressTurn | Compress turn. | source |
dedupeToolHistory | Dedupe tool history. | source |
enforceTokenBudget | Enforce token budget. | source |
enforceTokenBudgetWithTurnCompression | Enforce token budget with turn compression. | source |
ensureToolCallInputs | Ensure tool call inputs helper. | source |
estimateMessageTokenBreakdown | Estimate token categories for provider, UI, or runtime messages. | source |
estimateOverhead | Estimate overhead. | source |
estimateTokens | Estimate tokens. | source |
isModelSupportedFileMediaType | Check whether the model supports the file media type. | source |
maskOldToolOutputs | Mask old tool outputs. | source |
normalizeMessageFilePartMediaTypes | Normalizes message file part media types. | source |
prepareProviderModelMessagesFromUiMessages | Prepare provider model messages from UI messages. | source |
repairToolPairs | Repair tool pairs. | source |
rewriteUnsupportedFilePartsAsAnnotations | Rewrite unsupported file parts as annotations. | source |
sanitizeProviderModelMessages | Sanitize provider model messages. | source |
stripPendingToolParts | Strip pending tool parts. | source |
Types
| Name | Description | Source |
|---|---|---|
HistoricalToolInputCompactionDiagnostic | Diagnostic emitted when a completed historical tool input is compacted. | source |
HistoricalToolInputRetainedField | Field selector retained in a historical tool-input summary. | source |
HistoricalToolInputRetentionOptions | Options for historical tool-input compaction. | source |
HistoricalToolInputRetentionPolicy | Policy for compacting a completed historical tool-call input. | source |
HistoricalToolInputRetentionPolicyResolver | Resolves the retention policy for a completed historical tool input. | source |
MessagePrepLimits | Tunable limits used while preparing chat history for model context. | source |
MessageTokenBreakdown | Approximate token categories for context diagnostics. | source |
PrepareProviderModelMessagesFromUiMessagesOptions | Options accepted by prepare provider model messages from UI messages. | source |
veryfront/chat/protocol
Canonical chat message and stream protocol for Veryfront chat surfaces. These types describe the framework-owned message parts and stream events used by AG-UI-aligned chat clients, hooks, and adapters.
import type { ChatDataPart, ChatDynamicToolPart, ChatFilePart } from "veryfront/chat/protocol";
Types
| Name | Description | Source |
|---|---|---|
ChatDataPart | Public API contract for chat data part. | source |
ChatDynamicToolPart | Public API contract for chat dynamic tool part. | source |
ChatFilePart | Chat message part that carries an uploaded file or image attachment. | source |
ChatFinishReason | Public API contract for chat finish reason. | source |
ChatMessage | Message shape for chat. | source |
ChatMessageMetadata | Public API contract for chat message metadata. | source |
ChatMessageMetadataUsage | Public API contract for chat message metadata usage. | source |
ChatMessagePart | Public API contract for chat message part. | source |
ChatPartState | Canonical chat message and stream protocol for Veryfront chat surfaces. | source |
ChatReasoningPart | Chat message part that carries reasoning text. | source |
ChatSourceDocumentPart | Chat message part that carries a document citation source. | source |
ChatSourceUrlPart | Chat message part that carries a URL citation source. | source |
ChatStepPart | Public API contract for chat step part. | source |
ChatStreamEvent | Event emitted for chat stream. | source |
ChatTextPart | Chat message part that carries text. | source |
ChatToolPart | Public API contract for chat tool part. | source |
ChatToolResultPart | Chat message part that carries a tool result. | source |
ChatToolState | State for chat tool. | source |
ChatUiMessageChunk | Public API contract for chat UI message chunk. | source |
ChildRunAudit | Public API contract for child run audit. | source |
ChildRunAuditToolCall | Public API contract for child run audit tool call. | source |
ChildRunAuditToolResult | Result returned from child run audit tool. | source |
veryfront/chat/types
import { buildDataFileAnnotation, isImageFile, isTextPreviewFile } from "veryfront/chat/types";
Functions
| Name | Description | Source |
|---|---|---|
buildDataFileAnnotation | Builds data file annotation. | source |
isImageFile | Check whether a file is an image. | source |
isTextPreviewFile | Check whether a file supports text preview. | source |
isValidImageFile | Check whether a file is a supported image upload. | source |
normalizeInlineAttachmentMediaType | Normalizes inline attachment media type. | source |
Types
| Name | Description | Source |
|---|---|---|
ChatAssistantContentPart | Public API contract for chat assistant content part. | source |
ChatAssistantMessage | Message shape for chat assistant. | source |
ChatDataUiPart | Chat UI part that carries custom data chunks. | source |
ChatDynamicToolUiPart | Tool UI part for a runtime-selected tool name. | source |
ChatFileUiPart | Public API contract for chat file UI part. | source |
ChatMessageMetadata | Public API contract for chat message metadata. | source |
ChatMessageMetadataUsage | Public API contract for chat message metadata usage. | source |
ChatModelFilePart | Public API contract for chat model file part. | source |
ChatModelReasoningPart | Provider model message part that carries reasoning text. | source |
ChatModelTextPart | Provider model message part that carries text. | source |
ChatNamedToolUiPart | Tool UI part keyed by a static tool type. | source |
ChatReasoningUiPart | Public API contract for chat reasoning UI part. | source |
ChatRequestContext | Context for chat request. | source |
ChatRuntimeOverrides | Public API contract for chat runtime overrides. | source |
ChatSourceDocumentUiPart | Public API contract for chat source document UI part. | source |
ChatSourceUrlUiPart | Public API contract for chat source URL UI part. | source |
ChatStepStartUiPart | Public API contract for chat step start UI part. | source |
ChatSystemMessage | Message shape for chat system. | source |
ChatTextUiPart | Public API contract for chat text UI part. | source |
ChatToolCallPart | Provider model message part that carries a tool call. | source |
ChatToolMessage | Message shape for chat tool. | source |
ChatToolPartState | State for chat tool part. | source |
ChatToolResultOutput | Output from chat tool result. | source |
ChatToolResultPart | Provider model message part that carries a tool result. | source |
ChatUiMessage | Message shape for chat UI. | source |
ChatUiMessageChunk | Public API contract for chat UI message chunk. | source |
ChatUiMessagePart | Public API contract for chat UI message part. | source |
ChatUiMessageRole | Public API contract for chat UI message role. | source |
ChatUserContentPart | Public API contract for chat user content part. | source |
ChatUserMessage | Message shape for chat user. | source |
ChildRunAudit | Public API contract for child run audit. | source |
ChildRunAuditToolCall | Public API contract for child run audit tool call. | source |
ChildRunAuditToolResult | Result returned from child run audit tool. | source |
DurableRootRunDescriptor | Public API contract for durable root run descriptor. | source |
FileUIPartWithUpload | File UI part enriched with upload metadata. | source |
MessageMetadata | Public API contract for chat message metadata. | source |
ProjectFile | Public API contract for project file. | source |
ProjectFileListItem | Public API contract for project file list item. | source |
ProviderModelMessage | Message shape for provider model. | source |
UploadedFileReference | Public API contract for uploaded file reference. | source |
Constants
| Name | Description | Source |
|---|---|---|
getChatRequestContextSchema | Zod schema for get chat request context. | source |
getChatToolPartStateSchema | Zod schema for get chat tool part state. | source |
getChatUiMessagePartSchema | Zod schema for get chat UI message part. | source |
getChatUiMessageRoleSchema | Zod schema for get chat UI message role. | source |
getChatUiMessageSchema | Zod schema for get chat UI message. | source |
getChatUiMessagesSchema | Zod schema for get chat UI messages. | source |
getMessageMetadataSchema | Zod schema for get message metadata. | source |
imageFileTypes | Image media types that chat uploads can display natively. | source |
textFileExtensions | File extensions that chat uploads can inline as text. | source |
veryfront/chat/uploads
Chat upload handler: the server side of <Chat>’s batteries-included attachments. Mount it at app/api/uploads/route.ts (the same endpoint the composer POSTs to) and files “just work”: stored on the local disk in dev, on Veryfront Cloud (or a BlobStorage you pass) once deployed. ts // app/api/uploads/route.ts import { createChatUploadHandler } from "veryfront/chat/uploads"; function authorize(request: Request) { const token = Deno.env.get("UPLOAD_TOKEN"); return Boolean(token && request.headers.get("authorization") === `Bearer ${token}`); } export const { POST, GET, DELETE } = createChatUploadHandler({ authorize }); POST stores the multipart file field and returns { id, url, name, mediaType, size }. The composer sends that url as a file message part, which the runtime fetches, so the URL must be reachable by the runtime (true for local dev, where GET streams the file back from the same origin).
import { createChatUploadHandler } from "veryfront/chat/uploads";
Functions
| Name | Description | Source |
|---|---|---|
createChatUploadHandler | Build { POST, GET, DELETE } route handlers for chat attachments. Auto-selects local disk storage in dev and Veryfront Cloud once deployed, or the storage you provide. Every route fails closed unless an authorizer returns literal true or unauthenticated access is explicitly enabled. Multipart request bodies and file bytes are bounded independently. DELETE ?id= removes the file from storage. | source |