Astryx

Astryx Chat Tool Calls

AI chats 5

About

ChatToolCalls displays tool or function call invocations from an LLM response. Pass an array of calls and the component handles the rest: a single call renders inline, while multiple calls collapse into a summary with the latest call visible at the surface. Use it anywhere an AI agent shows what actions it took.

Built with React and Tailwind. Copy the prompt and paste it into Claude Code, Cursor or Lovable: your agent adds Astryx Chat Tool Calls to your project and fits it to your theme.

Code

How Astryx Chat Tool Calls is used: the demo's code. The component's own source comes with a free account.

Usage.tsx

// Copyright (c) Meta Platforms, Inc. and affiliates.

'use client';

import {ChatToolCalls} from '@/components/ui/astryx-chat-tool-calls';

function ChatToolCallsShowcase() {
  return (
    <ChatToolCalls
      defaultIsExpanded
      calls={[
        {
          name: 'bash',
          target: 'git diff --stat',
          status: 'complete',
          duration: '340ms',
        },
        {
          name: 'read',
          target: 'src/utils/formatDate.ts',
          status: 'complete',
          duration: '45ms',
        },
        {
          name: 'edit',
          target: 'src/utils/formatDate.ts',
          status: 'complete',
          duration: '120ms',
          additions: 12,
          deletions: 3,
        },
      ]}
    />
  );
}

export default function ChatToolCallsShowcaseDemo() {
  return (
    <div
      data-astryx-theme="neutral"
      data-theme="light"
      style={{colorScheme: 'light', display: 'contents'}}>
      <ChatToolCallsShowcase />
    </div>
  );
}

Dependencies

More by Astryx

View all
  • Astryx Banner

    Astryx Banner

    61
  • Astryx Avatar

    Astryx Avatar

    32
  • Astryx Aspect Ratio

    Astryx Aspect Ratio

    32
  • Astryx Badge

    Astryx Badge

    29
  • Astryx Button Group

    Astryx Button Group

    28
  • Astryx Chat Composer Drawer

    Astryx Chat Composer Drawer

    25
  • Astryx Toggle Button

    Astryx Toggle Button

    17
  • Astryx Chat Tokenized Text

    Astryx Chat Tokenized Text

    9

More in AI chats

View all
  • AI Actions

    AI Actions

    361
  • Aquarium Prompt

    Aquarium Prompt

    168
  • AI Artifact

    AI Artifact

    17
  • AI Suggestions

    AI Suggestions

    22
  • AI Orb

    AI Orb

    216
  • Agent Chat

    Agent Chat

    21
  • Color Picker

    Color Picker

    229
  • AI Task List

    AI Task List

    198