Documents
attachment-runtime
attachment-runtime
Type
External
Status
Published
Created
Mar 17, 2026
Updated
Mar 17, 2026

import { AttachmentRuntime, AttachmentState } from "@/generated/typeDocs";

useAuiState (Attachment State)#

Access the current attachment state reactively:

import { useAuiState } from "@assistant-ui/react";

const name = useAuiState((s) => s.attachment.name);
const type = useAuiState((s) => s.attachment.type);

For imperative access and actions, use useAui:

import { useAui } from "@assistant-ui/react";

const aui = useAui();
aui.attachment().remove();
const state = aui.attachment().getState();

Attachment Runtime#

<ParametersTable {...AttachmentRuntime} />

Attachment State#

<ParametersTable {...AttachmentState} />