@promptbook/remote-server
Version:
Promptbook: Create persistent AI agents that turn your company's scattered knowledge into action
73 lines (72 loc) • 1.78 kB
TypeScript
/// <reference types="react" />
import type { string_url } from '../../../types/string_url';
/**
* Agent profile information for chip display
*/
export type AgentChipData = {
/**
* Agent URL (required)
*/
url: string_url;
/**
* Agent display name/label
*/
label?: string;
/**
* Agent profile image URL
*/
imageUrl?: string_url;
/**
* Public URL of the agents server (for generating placeholder images)
*/
publicUrl?: string_url;
};
/**
* Props for AgentChip component
*/
export type AgentChipProps = {
/**
* Agent data to display
*/
agent: AgentChipData;
/**
* Whether this is an ongoing interaction (shows spinner)
*/
isOngoing?: boolean;
/**
* Whether this is clickable (completed state)
*/
isClickable?: boolean;
/**
* Click handler
*/
onClick?: (event?: React.MouseEvent) => void;
/**
* Additional CSS class name
*/
className?: string;
/**
* Optional suffix appended to the agent label (e.g., " (2x)").
*/
labelSuffix?: string;
};
/**
* AgentChip component - displays a chip with agent avatar and name
*
* This component is used to display agent interactions in chat messages.
* It fetches the agent profile if needed and displays the agent's avatar and name.
*
* ```tsx
* <AgentChip
* agent={{ url: 'https://agents.example.com/joe', label: 'Joe' }}
* isOngoing={false}
* isClickable={true}
* onClick={() => console.log('clicked')}
* />
* ```
*
* @example
*
* @private utility of `ChatMessageItem` component
*/
export declare function AgentChip({ agent, isOngoing, isClickable, onClick, className, labelSuffix, }: AgentChipProps): import("react/jsx-runtime").JSX.Element;