@digitalsingularity/agent-ui-chat-components
Version:
Reusable UI components for agent chat and management interfaces
57 lines (56 loc) • 2.12 kB
TypeScript
import React from "react";
export type { Message, AgentContext } from '../lib/ai-agent';
import type { AgentContext } from '../lib/ai-agent';
export interface AiAgent {
id: string;
name: string;
description?: string | null;
systemInstruction: string;
temperature?: number;
model: string;
personalityTags?: string[];
avatarUrl?: string | null;
avatarType?: string;
avatarPrompt?: string;
isPublic?: boolean;
isOwner?: boolean;
userId: string;
createdAt: string;
updatedAt: string;
}
export interface AgentsTabProps {
documentId?: number;
documentTitle: string;
handleSendMessage: (message: string, context: AgentContext, agentId: string, onChunk: (chunk: string) => void, onError: (error: Error) => void, onCompletion: () => void) => Promise<void>;
getDocumentContent: () => string;
createMessageId: () => string;
useAiAgents: () => any;
Textarea: React.ComponentType<any>;
Button: React.ComponentType<any>;
Avatar: React.ComponentType<any>;
AvatarFallback: React.ComponentType<any>;
AvatarImage: React.ComponentType<any>;
DropdownMenu: React.ComponentType<any>;
DropdownMenuContent: React.ComponentType<any>;
DropdownMenuItem: React.ComponentType<any>;
DropdownMenuLabel: React.ComponentType<any>;
DropdownMenuSeparator: React.ComponentType<any>;
DropdownMenuTrigger: React.ComponentType<any>;
Loader2: React.ComponentType<any>;
Send: React.ComponentType<any>;
Bot: React.ComponentType<any>;
User: React.ComponentType<any>;
Check: React.ComponentType<any>;
Settings: React.ComponentType<any>;
Trash: React.ComponentType<any>;
Download: React.ComponentType<any>;
MoreVertical: React.ComponentType<any>;
History: React.ComponentType<any>;
ReactMarkdown: React.ComponentType<any>;
clsx: (...args: any[]) => string;
debounce: (func: (...args: any[]) => void, delay: number) => (...args: any[]) => void;
useToast: () => any;
Link: React.ComponentType<any>;
}
declare const AgentsTab: React.FC<AgentsTabProps>;
export default AgentsTab;