From ee755613935f0a4b40345bb9ea4b5297df4aadbc Mon Sep 17 00:00:00 2001 From: Philippe Rolet Date: Mon, 25 Dec 2023 16:33:25 +0100 Subject: [PATCH] Revert "[Ahuna] Test assistants in side modal from gallery (#3011)" (#3015) This reverts commit d9dc8c9ddfb7eb3f4bc86954ac3e14797198aa1b. --- .../components/assistant/AssistantPreview.tsx | 26 +-- .../assistant/TryAssistantModal.tsx | 121 ---------- .../conversation/input_bar/InputBar.tsx | 7 - .../components/assistant/conversation/lib.ts | 206 ------------------ front/components/sparkle/Notification.tsx | 2 +- front/lib/api/assistant/conversation.ts | 9 +- .../assistant/conversations/[cId]/index.ts | 1 - front/pages/w/[wId]/assistant/[cId]/index.tsx | 113 +++++++--- front/pages/w/[wId]/assistant/gallery.tsx | 12 - front/pages/w/[wId]/assistant/new.tsx | 74 +++++-- .../front/api_handlers/internal/assistant.ts | 1 - .../front/api_handlers/public/assistant.ts | 1 - types/src/front/assistant/conversation.ts | 11 +- 13 files changed, 146 insertions(+), 438 deletions(-) delete mode 100644 front/components/assistant/TryAssistantModal.tsx delete mode 100644 front/components/assistant/conversation/lib.ts diff --git a/front/components/assistant/AssistantPreview.tsx b/front/components/assistant/AssistantPreview.tsx index 8b7a6d29aae3..11c7e0516a58 100644 --- a/front/components/assistant/AssistantPreview.tsx +++ b/front/components/assistant/AssistantPreview.tsx @@ -4,7 +4,6 @@ import { Chip, DashIcon, MoreIcon, - PlayIcon, PlusIcon, } from "@dust-tt/sparkle"; import { @@ -29,7 +28,6 @@ interface AssistantPreviewProps { onUpdate: () => void; variant: AssistantPreviewVariant; flow: AssistantPreviewFlow; - setTestModalAssistant?: (agentConfiguration: AgentConfigurationType) => void; } function getDescriptionClassName(variant: AssistantPreviewVariant): string { @@ -57,7 +55,6 @@ export function AssistantPreview({ onUpdate, variant, flow, - setTestModalAssistant, }: AssistantPreviewProps) { const [isUpdatingList, setIsUpdatingList] = useState(false); // TODO(flav) Move notification logic to the caller. This maintains the purity of the component by @@ -203,24 +200,7 @@ export function AssistantPreview({ default: assertNever(flow); } - let testButton = null; - if ( - setTestModalAssistant && - ((flow === "workspace" && agentConfiguration.scope === "published") || - (flow === "personal" && - agentConfiguration.userListStatus === "not-in-list")) - ) { - testButton = ( -