UNPKG

@assistant-ui/react

Version:

Open-source TypeScript/React library for building production-grade AI chat experiences

33 lines • 1.64 kB
import { type ActionButtonElement, type ActionButtonProps } from "../../utils/createActionButton.js"; declare const useActionBarResume: () => (() => void) | null; export declare namespace ActionBarPrimitiveResume { type Element = ActionButtonElement; type Props = ActionButtonProps<typeof useActionBarResume>; } /** * A button that answers again in place of an assistant message whose run * stopped before it wrote anything (its tab closed or lost its connection). * It deletes the empty reply and its stored row, then runs again from the * reply's parent, so no branch is left beside it; a runtime that cannot * delete messages starts a new branch instead. It renders disabled unless the * message is the last one on its branch and its run went `staleAfter` * without a heartbeat. A reply that wrote content before its run stopped is a * regular error, answered again with Regenerate. * * @example * ```tsx * <MessagePrimitive.Error> * <ErrorPrimitive.Root> * <ErrorPrimitive.Message /> * <ActionBarPrimitive.Resume>Resume</ActionBarPrimitive.Resume> * </ErrorPrimitive.Root> * </MessagePrimitive.Error> * ``` */ export declare const ActionBarPrimitiveResume: import("react").ForwardRefExoticComponent<Omit<Omit<import("react").ClassAttributes<HTMLButtonElement> & import("react").ButtonHTMLAttributes<HTMLButtonElement> & { asChild?: boolean | undefined; }, "ref"> & { render?: import("react").ReactElement | undefined; } & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>; export {}; //# sourceMappingURL=ActionBarResume.d.ts.map