@greatapps/greatagents-ui 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +41 -10
- package/dist/index.js +504 -292
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/client/index.ts +3 -3
- package/src/components/agents/agent-form-dialog.tsx +1 -16
- package/src/components/agents/agent-prompt-editor.tsx +17 -9
- package/src/components/agents/agent-tabs.tsx +14 -13
- package/src/components/conversations/agent-conversations-panel.tsx +44 -0
- package/src/components/conversations/agent-conversations-table.tsx +160 -0
- package/src/components/conversations/conversation-view.tsx +124 -0
- package/src/index.ts +3 -0
- package/src/pages/agent-detail-page.tsx +3 -4
- package/src/types/index.ts +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -15,7 +15,6 @@ interface Agent {
|
|
|
15
15
|
id: number;
|
|
16
16
|
id_account: number;
|
|
17
17
|
title: string;
|
|
18
|
-
prompt: string | null;
|
|
19
18
|
photo: string | null;
|
|
20
19
|
external_token: string | null;
|
|
21
20
|
openai_assistant_id: string | null;
|
|
@@ -163,8 +162,11 @@ interface GagentsClientConfig {
|
|
|
163
162
|
declare function createGagentsClient(config: GagentsClientConfig): {
|
|
164
163
|
listAgents: (idAccount: number, params?: Record<string, string>) => Promise<ApiResponse<Agent[]>>;
|
|
165
164
|
getAgent: (idAccount: number, id: number) => Promise<ApiResponse<Agent>>;
|
|
166
|
-
createAgent: (idAccount: number, body: Pick<Agent, "title"> & Partial<Pick<Agent, "
|
|
167
|
-
updateAgent: (idAccount: number, id: number, body: Partial<Pick<Agent, "title" | "
|
|
165
|
+
createAgent: (idAccount: number, body: Pick<Agent, "title"> & Partial<Pick<Agent, "photo" | "delay_typing" | "waiting_time">>) => Promise<ApiResponse<Agent>>;
|
|
166
|
+
updateAgent: (idAccount: number, id: number, body: Partial<Pick<Agent, "title" | "photo" | "delay_typing" | "waiting_time" | "active">> & {
|
|
167
|
+
prompt?: string;
|
|
168
|
+
change_notes?: string;
|
|
169
|
+
}) => Promise<ApiResponse<Agent>>;
|
|
168
170
|
deleteAgent: (idAccount: number, id: number) => Promise<ApiResponse<void>>;
|
|
169
171
|
listTools: (idAccount: number, params?: Record<string, string>) => Promise<ApiResponse<Tool[]>>;
|
|
170
172
|
getTool: (idAccount: number, id: number) => Promise<ApiResponse<Tool>>;
|
|
@@ -219,8 +221,11 @@ interface GagentsHookConfig {
|
|
|
219
221
|
declare function useGagentsClient(config: GagentsHookConfig): {
|
|
220
222
|
listAgents: (idAccount: number, params?: Record<string, string>) => Promise<ApiResponse<Agent[]>>;
|
|
221
223
|
getAgent: (idAccount: number, id: number) => Promise<ApiResponse<Agent>>;
|
|
222
|
-
createAgent: (idAccount: number, body: Pick<Agent, "title"> & Partial<Pick<Agent, "
|
|
223
|
-
updateAgent: (idAccount: number, id: number, body: Partial<Pick<Agent, "title" | "
|
|
224
|
+
createAgent: (idAccount: number, body: Pick<Agent, "title"> & Partial<Pick<Agent, "photo" | "delay_typing" | "waiting_time">>) => Promise<ApiResponse<Agent>>;
|
|
225
|
+
updateAgent: (idAccount: number, id: number, body: Partial<Pick<Agent, "title" | "photo" | "delay_typing" | "waiting_time" | "active">> & {
|
|
226
|
+
prompt?: string;
|
|
227
|
+
change_notes?: string;
|
|
228
|
+
}) => Promise<ApiResponse<Agent>>;
|
|
224
229
|
deleteAgent: (idAccount: number, id: number) => Promise<ApiResponse<void>>;
|
|
225
230
|
listTools: (idAccount: number, params?: Record<string, string>) => Promise<ApiResponse<Tool[]>>;
|
|
226
231
|
getTool: (idAccount: number, id: number) => Promise<ApiResponse<Tool>>;
|
|
@@ -425,9 +430,9 @@ declare function AgentEditForm({ config, agent, idAccount, open, onOpenChange }:
|
|
|
425
430
|
interface AgentTabsProps {
|
|
426
431
|
agent: Agent;
|
|
427
432
|
config: GagentsHookConfig;
|
|
428
|
-
|
|
433
|
+
renderChatLink?: (inboxId: number) => React.ReactNode;
|
|
429
434
|
}
|
|
430
|
-
declare function AgentTabs({ agent, config,
|
|
435
|
+
declare function AgentTabs({ agent, config, renderChatLink }: AgentTabsProps): react_jsx_runtime.JSX.Element;
|
|
431
436
|
|
|
432
437
|
interface AgentPromptEditorProps {
|
|
433
438
|
config: GagentsHookConfig;
|
|
@@ -516,6 +521,32 @@ interface SortableOverlayProps extends Omit<React$1.ComponentProps<typeof DragOv
|
|
|
516
521
|
}
|
|
517
522
|
declare function SortableOverlay(props: SortableOverlayProps): React$1.ReactPortal | null;
|
|
518
523
|
|
|
524
|
+
interface AgentConversationsPanelProps {
|
|
525
|
+
agent: Agent;
|
|
526
|
+
config: GagentsHookConfig;
|
|
527
|
+
renderChatLink?: (inboxId: number) => React.ReactNode;
|
|
528
|
+
}
|
|
529
|
+
declare function AgentConversationsPanel({ agent, config, renderChatLink, }: AgentConversationsPanelProps): react_jsx_runtime.JSX.Element;
|
|
530
|
+
|
|
531
|
+
interface AgentConversationsTableProps {
|
|
532
|
+
conversations: Conversation[];
|
|
533
|
+
isLoading: boolean;
|
|
534
|
+
contactsMap?: Map<number, string>;
|
|
535
|
+
objectivesMap?: Map<number, string>;
|
|
536
|
+
config: GagentsHookConfig;
|
|
537
|
+
renderChatLink?: (inboxId: number) => React.ReactNode;
|
|
538
|
+
}
|
|
539
|
+
declare function AgentConversationsTable({ conversations, isLoading, contactsMap, objectivesMap, config, renderChatLink, }: AgentConversationsTableProps): react_jsx_runtime.JSX.Element;
|
|
540
|
+
|
|
541
|
+
interface ConversationViewProps {
|
|
542
|
+
conversationId: number;
|
|
543
|
+
onClose: () => void;
|
|
544
|
+
contactsMap?: Map<number, string>;
|
|
545
|
+
config: GagentsHookConfig;
|
|
546
|
+
renderChatLink?: (inboxId: number) => React.ReactNode;
|
|
547
|
+
}
|
|
548
|
+
declare function ConversationView({ conversationId, onClose, contactsMap, config, renderChatLink, }: ConversationViewProps): react_jsx_runtime.JSX.Element;
|
|
549
|
+
|
|
519
550
|
interface AgentsPageProps {
|
|
520
551
|
config: GagentsHookConfig;
|
|
521
552
|
onNavigateToAgent?: (agentId: number) => void;
|
|
@@ -528,9 +559,9 @@ interface AgentDetailPageProps {
|
|
|
528
559
|
config: GagentsHookConfig;
|
|
529
560
|
agentId: number;
|
|
530
561
|
onBack?: () => void;
|
|
531
|
-
|
|
562
|
+
renderChatLink?: (inboxId: number) => React.ReactNode;
|
|
532
563
|
}
|
|
533
|
-
declare function AgentDetailPage({ config, agentId, onBack,
|
|
564
|
+
declare function AgentDetailPage({ config, agentId, onBack, renderChatLink, }: AgentDetailPageProps): react_jsx_runtime.JSX.Element;
|
|
534
565
|
|
|
535
566
|
interface ToolsPageProps {
|
|
536
567
|
config: GagentsHookConfig;
|
|
@@ -547,4 +578,4 @@ interface CredentialsPageProps {
|
|
|
547
578
|
}
|
|
548
579
|
declare function CredentialsPage({ config, gagentsApiUrl, title, subtitle, }: CredentialsPageProps): react_jsx_runtime.JSX.Element;
|
|
549
580
|
|
|
550
|
-
export { type Agent, AgentDetailPage, type AgentDetailPageProps, AgentEditForm, AgentFormDialog, AgentObjectivesList, AgentPromptEditor, AgentTabs, type AgentTool, AgentToolsList, AgentsPage, type AgentsPageProps, AgentsTable, type ApiResponse, type AvailabilityConflict, type AvailabilityResult, type CalendarStatus, type ContactUser, type Conversation, CredentialsPage, type CredentialsPageProps, type GagentsClient, type GagentsClientConfig, type GagentsContact, type GagentsHookConfig, type Objective, type PromptVersion, Sortable, SortableContent, SortableItem, SortableItemHandle, SortableOverlay, type Tool, type ToolCredential, ToolCredentialsForm, ToolFormDialog, ToolsPage, type ToolsPageProps, ToolsTable, cn, createGagentsClient, useAddAgentTool, useAgent, useAgentConversations, useAgentTools, useAgents, useContactUsers, useConversation, useConversations, useCreateAgent, useCreateObjective, useCreateTool, useCreateToolCredential, useDeleteAgent, useDeleteObjective, useDeleteTool, useDeleteToolCredential, useGagentsClient, useGagentsContacts, useObjectives, usePromptVersions, useRemoveAgentTool, useTool, useToolCredentials, useTools, useUpdateAgent, useUpdateAgentTool, useUpdateObjective, useUpdateTool, useUpdateToolCredential };
|
|
581
|
+
export { type Agent, AgentConversationsPanel, AgentConversationsTable, AgentDetailPage, type AgentDetailPageProps, AgentEditForm, AgentFormDialog, AgentObjectivesList, AgentPromptEditor, AgentTabs, type AgentTool, AgentToolsList, AgentsPage, type AgentsPageProps, AgentsTable, type ApiResponse, type AvailabilityConflict, type AvailabilityResult, type CalendarStatus, type ContactUser, type Conversation, ConversationView, CredentialsPage, type CredentialsPageProps, type GagentsClient, type GagentsClientConfig, type GagentsContact, type GagentsHookConfig, type Objective, type PromptVersion, Sortable, SortableContent, SortableItem, SortableItemHandle, SortableOverlay, type Tool, type ToolCredential, ToolCredentialsForm, ToolFormDialog, ToolsPage, type ToolsPageProps, ToolsTable, cn, createGagentsClient, useAddAgentTool, useAgent, useAgentConversations, useAgentTools, useAgents, useContactUsers, useConversation, useConversations, useCreateAgent, useCreateObjective, useCreateTool, useCreateToolCredential, useDeleteAgent, useDeleteObjective, useDeleteTool, useDeleteToolCredential, useGagentsClient, useGagentsContacts, useObjectives, usePromptVersions, useRemoveAgentTool, useTool, useToolCredentials, useTools, useUpdateAgent, useUpdateAgentTool, useUpdateObjective, useUpdateTool, useUpdateToolCredential };
|