llama-stack-mirror/llama_stack/ui/components/responses/items/function-call-item.tsx
Francisco Javier Arceo 2e271f2524 disable attachments and update sidebar
Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>

fixing package.json

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>

moving ui -> chat

Signed-off-by: Francisco Javier Arceo <farceo@redhat.com>
2025-07-29 17:07:35 -04:00

29 lines
658 B
TypeScript

import {
MessageBlock,
ToolCallBlock,
} from "@/components/chat/message-components";
import { FunctionCallItem } from "../utils/item-types";
interface FunctionCallItemProps {
item: FunctionCallItem;
index: number;
keyPrefix: string;
}
export function FunctionCallItemComponent({
item,
index,
keyPrefix,
}: FunctionCallItemProps) {
const name = item.name || "unknown";
const args = item.arguments || "{}";
const formattedFunctionCall = `${name}(${args})`;
return (
<MessageBlock
key={`${keyPrefix}-${index}`}
label="Function Call"
content={<ToolCallBlock>{formattedFunctionCall}</ToolCallBlock>}
/>
);
}