Astryx

Astryx Chat Tool Calls

AI chats

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

'use client';

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

function ChatToolCallsSimple() {
  return (
    <Stack direction="vertical" gap={4}>
      <ChatToolCalls
        calls={[
          {
            name: 'bash',
            target: 'git status',
            status: 'complete',
            duration: '1.2s',
          },
        ]}
      />
      <ChatToolCalls
        defaultIsExpanded
        calls={[
          {
            name: 'read',
            target: 'src/components/DataGrid.tsx',
            status: 'complete',
            duration: '30ms',
          },
          {
            name: 'edit',
            target: 'src/components/DataGrid.tsx',
            status: 'complete',
            duration: '85ms',
            additions: 24,
            deletions: 8,
          },
          {
            name: 'edit',
            target: 'src/components/DataGrid.test.tsx',
            status: 'complete',
            duration: '60ms',
            additions: 45,
          },
        ]}
      />
    </Stack>
  );
}

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

Dependencies

More by Astryx

View all
  • Astryx Banner

    Astryx Banner

    61
  • Astryx Avatar

    Astryx Avatar

    34
  • Astryx Aspect Ratio

    Astryx Aspect Ratio

    32
  • Astryx Chat Composer Drawer

    Astryx Chat Composer Drawer

    30
  • Astryx Button Group

    Astryx Button Group

    30
  • Astryx Badge

    Astryx Badge

    30
  • Astryx Toggle Button

    Astryx Toggle Button

    17
  • Astryx Chat Tokenized Text

    Astryx Chat Tokenized Text

    14

More in AI chats

View all
  • Agent Chat

    Agent Chat

    21
  • AI Actions

    AI Actions

    372
  • AI Suggestions

    AI Suggestions

    27
  • Interactive LLM Token & Context Window Visualizer

    Interactive LLM Token & Context Window Visualizer

    30
  • AI SaaS Workflow Hero

    AI SaaS Workflow Hero

    36
  • Aquarium Prompt

    Aquarium Prompt

    219
  • Message Parts

    Message Parts

    10
  • AI Chat Composer

    AI Chat Composer

    21