BlockDex

Components

Registries

Free blocks

Method

BlockDex

Components

Registries

Free blocks

Method

Open API

BlockDex

Components

Registries

Free blocks

Method

Open API

Components/gaia/tool-calls-section

Tool Calls Section

gaia/tool-calls-section
FreeComponent

An expandable section showing AI agent tool usage with icons, inputs, and outputs.

Install it

npx shadcn@latest add https://ui.heygaia.io/r/tool-calls-section.json

Source

registry/new-york/ui/tool-calls-section.tsxui.heygaia.io/r/tool-calls-section.json · first 6 KB
1"use client";
2
3import type { ReactNode } from "react";
4import { useMemo, useState } from "react";
5
6import { HugeiconsIcon, ArrowDown01Icon, ToolsIcon } from "@/components/icons";
7import { cn } from "@/lib/utils";
8import { formatToolName, getToolCategoryIcon } from "@/lib/utils/tool-icons";
9import { CompactMarkdown } from "@/registry/new-york/ui/compact-markdown";
10
11// ============================================================================
12// Types
13// ============================================================================
14
15export interface ToolCallEntry {
16 /** Name of the tool that was called */
17 tool_name: string;
18 /** Category/integration the tool belongs to (e.g., "gmail", "search", "memory") */
19 tool_category: string;
20 /** Human-readable message describing what the tool did */
21 message?: string;
22 /** Whether to show the category label (default: true) */
23 show_category?: boolean;
24 /** Unique ID for this tool call */
25 tool_call_id?: string;
26 /** Input parameters passed to the tool */
27 inputs?: Record<string, unknown>;
28 /** Output/result from the tool */
29 output?: string;
30 /** URL to custom icon for integrations */
31 icon_url?: string;
32 /** Friendly name for the integration (e.g., "Linear", "Slack") */
33 integration_name?: string;
34}
35
36export interface IntegrationInfo {
37 iconUrl?: string;
38 name?: string;
39}
40
41export interface ToolCallsSectionProps {
42 /** Array of tool call entries to display */
43 toolCalls: ToolCallEntry[];
44 /** Optional map of integration IDs to their info for icon/name lookup */
45 integrations?: Map<string, IntegrationInfo>;
46 /** Maximum number of icons to show in the stacked display (default: 10) */
47 maxIconsToShow?: number;
48 /** Whether to start with the accordion expanded (default: false) */
49 defaultExpanded?: boolean;
50 /** Custom class name for the container */
51 className?: string;
52 /** Custom icon size (default: 21) */
53 iconSize?: number;
54 /** Custom icon renderer override */
55 renderIcon?: (call: ToolCallEntry, size: number) => ReactNode;
56 /** Custom content renderer override for inputs/outputs */
57 renderContent?: (content: unknown) => ReactNode;
58}
59
60// ============================================================================
61// Helper Components
62// ============================================================================
63
64interface ChevronIconProps {
65 isExpanded: boolean;
66 size?: number;
67 className?: string;
68}
69
70function ChevronIcon({ isExpanded, size = 18, className = "" }: ChevronIconProps) {
71 return (
72 <HugeiconsIcon
73// … truncated

What it pulls in

Other registry items

  • icons

Files it writes

  • registry/new-york/ui/tool-calls-section.tsx
  • registry/new-york/ui/compact-markdown.tsx
  • lib/utils/tool-icons.tsx

Facts

Registry
gaia
Type
registry:ui
Access
Free
Files written
3
Licence
MIT
First indexed
2026-08-01
Last confirmed
yesterday

Go to the source

ui.heygaia.io theexperiencecompany/gaia-ui on GitHub Raw registry item This item as JSON

More from gaia

All 26 items
Same registry, same kind — the ones you would have found next
ComponentRegistryKindAccessInstallsCommand
Area Chartarea-chartgaiaComponentsFree1 dep
Author Tooltipauthor-tooltipgaiaComponentsFreeno deps
Bar Chartbar-chartgaiaComponentsFree1 dep
ComposercomposergaiaComponentsFreeno deps
Email Compose Cardemail-compose-cardgaiaComponentsFreeno deps
Gauge Chartgauge-chartgaiaComponentsFree1 dep
GitHub Stars Buttongithub-stars-buttongaiaComponentsFree1 dep
Holo Cardholo-cardgaiaComponentsFree1 dep · 2 files
BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex

BlockDex

Built by

Kynth Studio

Index

Components
Registries
Method
Open API

Guides

shadcn component libraries
Best shadcn registries
Free shadcn blocks

Reference

Corpus counts
Crawl health
hello@kynth.studio
Privacy
Terms

BlockDex