mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-12-22 18:46:16 +00:00
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>
29 lines
658 B
TypeScript
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>}
|
|
/>
|
|
);
|
|
}
|