logoassistant-ui

ToolFallback

Default UI component for tools without dedicated custom renderers.

Used tool: get_weather

Getting Started

Add tool-fallback

npx shadcn@latest add @assistant-ui/tool-fallback

This adds a /components/assistant-ui/tool-fallback.tsx file to your project, which you can adjust as needed.

Use it in your application

Pass the ToolFallback component to the MessagePrimitive.Parts component

/components/assistant-ui/thread.tsx
import {  } from "@/components/assistant-ui/tool-fallback";

const :  = () => {
  return (
    <. ="...">
      < ="...">
        <.
          ={{ : { :  } }}
        />
      </>
      < />

      < ="..." />
    </.>
  );
};
  • ToolGroup - Group consecutive tool calls together