From d48cb2787ea7f42a18d2fd3e24acd2d226c7219d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daphn=C3=A9=20Popin?= Date: Wed, 30 Oct 2024 20:48:07 +0100 Subject: [PATCH] Extension: fix some imports --- front/extension/app/src/components/auth/ProtectedRoute.tsx | 2 +- .../app/src/components/conversation/AgentMessage.tsx | 2 +- .../app/src/components/conversation/ConversationContainer.tsx | 2 +- .../app/src/components/conversation/ConversationViewer.tsx | 2 +- .../extension/app/src/components/conversation/MessageItem.tsx | 2 +- .../app/src/components/conversation/useConversations.ts | 2 +- front/extension/app/src/hooks/useEventSource.ts | 2 +- front/extension/app/src/pages/ConversationPage.tsx | 4 ++-- front/extension/app/src/pages/ConversationsPage.tsx | 4 ++-- front/extension/app/src/pages/LoginPage.tsx | 2 +- front/extension/app/src/pages/MainPage.tsx | 4 ++-- 11 files changed, 14 insertions(+), 14 deletions(-) diff --git a/front/extension/app/src/components/auth/ProtectedRoute.tsx b/front/extension/app/src/components/auth/ProtectedRoute.tsx index a0fd272fa2f9..f31d915bfde5 100644 --- a/front/extension/app/src/components/auth/ProtectedRoute.tsx +++ b/front/extension/app/src/components/auth/ProtectedRoute.tsx @@ -1,4 +1,3 @@ -import type { StoredUser } from "@app/extension/app/src/lib/storage"; import { Button, ExternalLinkIcon, @@ -8,6 +7,7 @@ import { } from "@dust-tt/sparkle"; import type { LightWorkspaceType } from "@dust-tt/types"; import { useAuth } from "@extension/components/auth/AuthProvider"; +import type { StoredUser } from "@extension/lib/storage"; import type { ReactNode } from "react"; import { useEffect } from "react"; import { useNavigate } from "react-router-dom"; diff --git a/front/extension/app/src/components/conversation/AgentMessage.tsx b/front/extension/app/src/components/conversation/AgentMessage.tsx index 298a8b686b43..2377ff4c3166 100644 --- a/front/extension/app/src/components/conversation/AgentMessage.tsx +++ b/front/extension/app/src/components/conversation/AgentMessage.tsx @@ -2,7 +2,6 @@ import { makeDocumentCitation } from "@app/components/actions/retrieval/utils"; import { makeWebsearchResultsCitation } from "@app/components/actions/websearch/utils"; import type { MarkdownCitation } from "@app/components/assistant/markdown/MarkdownCitation"; import { RenderMessageMarkdown } from "@app/components/assistant/markdown/RenderMessageMarkdown"; -import { useSubmitFunction } from "@app/lib/client/utils"; import type { ConversationMessageEmojiSelectorProps, ConversationMessageSizeType, @@ -38,6 +37,7 @@ import { isWebsearchActionType, removeNulls, } from "@dust-tt/types"; +import { useSubmitFunction } from "@extension/components/utils/useSubmitFunction"; import { useEventSource } from "@extension/hooks/useEventSource"; import { useCallback, useEffect, useMemo, useRef, useState } from "react"; diff --git a/front/extension/app/src/components/conversation/ConversationContainer.tsx b/front/extension/app/src/components/conversation/ConversationContainer.tsx index 11251885b069..23af77f4fc4f 100644 --- a/front/extension/app/src/components/conversation/ConversationContainer.tsx +++ b/front/extension/app/src/components/conversation/ConversationContainer.tsx @@ -1,4 +1,3 @@ -import { usePublicConversation } from "@app/extension/app/src/components/conversation/usePublicConversation"; import { useSendNotification } from "@dust-tt/sparkle"; import type { AgentMessageWithRankType, @@ -9,6 +8,7 @@ import type { } from "@dust-tt/types"; import { ConversationViewer } from "@extension/components/conversation/ConversationViewer"; import { ReachedLimitPopup } from "@extension/components/conversation/ReachedLimitPopup"; +import { usePublicConversation } from "@extension/components/conversation/usePublicConversation"; import { AssistantInputBar } from "@extension/components/input_bar/InputBar"; import { InputBarContext } from "@extension/components/input_bar/InputBarContext"; import { useSubmitFunction } from "@extension/components/utils/useSubmitFunction"; diff --git a/front/extension/app/src/components/conversation/ConversationViewer.tsx b/front/extension/app/src/components/conversation/ConversationViewer.tsx index ae3534a6ce0f..7f32d170176c 100644 --- a/front/extension/app/src/components/conversation/ConversationViewer.tsx +++ b/front/extension/app/src/components/conversation/ConversationViewer.tsx @@ -1,5 +1,4 @@ import type { MessageWithContentFragmentsType } from "@app/components/assistant/conversation/ConversationViewer"; -import { classNames } from "@app/lib/utils"; import type { AgentMessageType, ContentFragmentType, @@ -10,6 +9,7 @@ import { isContentFragmentType, isUserMessageType } from "@dust-tt/types"; import MessageGroup from "@extension/components/conversation/MessageGroup"; import { usePublicConversation } from "@extension/components/conversation/usePublicConversation"; import type { StoredUser } from "@extension/lib/storage"; +import { classNames } from "@extension/lib/utils"; import { useMemo } from "react"; interface ConversationViewerProps { diff --git a/front/extension/app/src/components/conversation/MessageItem.tsx b/front/extension/app/src/components/conversation/MessageItem.tsx index 5bf88ea07151..899b4f7e8fa8 100644 --- a/front/extension/app/src/components/conversation/MessageItem.tsx +++ b/front/extension/app/src/components/conversation/MessageItem.tsx @@ -1,5 +1,4 @@ import type { MessageWithContentFragmentsType } from "@app/components/assistant/conversation/ConversationViewer"; -import type { StoredUser } from "@app/extension/app/src/lib/storage"; import { Citation, ZoomableImageCitationWrapper } from "@dust-tt/sparkle"; import type { CitationType } from "@dust-tt/sparkle/dist/esm/components/Citation"; import type { @@ -9,6 +8,7 @@ import type { import { isSupportedImageContentType } from "@dust-tt/types"; import { AgentMessage } from "@extension/components/conversation/AgentMessage"; import { UserMessage } from "@extension/components/conversation/UserMessage"; +import type { StoredUser } from "@extension/lib/storage"; import React from "react"; interface MessageItemProps { diff --git a/front/extension/app/src/components/conversation/useConversations.ts b/front/extension/app/src/components/conversation/useConversations.ts index d73f86a498c5..ac89d205bc48 100644 --- a/front/extension/app/src/components/conversation/useConversations.ts +++ b/front/extension/app/src/components/conversation/useConversations.ts @@ -1,5 +1,5 @@ -import { fetcher, useSWRWithDefaults } from "@app/extension/app/src/lib/swr"; import type { ConversationWithoutContentType } from "@dust-tt/types"; +import { fetcher, useSWRWithDefaults } from "@extension/lib/swr"; import { useMemo } from "react"; import type { Fetcher } from "swr"; diff --git a/front/extension/app/src/hooks/useEventSource.ts b/front/extension/app/src/hooks/useEventSource.ts index 973531949276..577bd7cedd50 100644 --- a/front/extension/app/src/hooks/useEventSource.ts +++ b/front/extension/app/src/hooks/useEventSource.ts @@ -1,4 +1,4 @@ -import { getAccessToken } from "@app/extension/app/src/lib/storage"; +import { getAccessToken } from "@extension/lib/storage"; import { useCallback, useEffect, useRef, useState } from "react"; const RECONNECT_DELAY = 5000; // 5 seconds. import { EventSourcePolyfill } from "event-source-polyfill"; diff --git a/front/extension/app/src/pages/ConversationPage.tsx b/front/extension/app/src/pages/ConversationPage.tsx index 1d1d0919b93a..f7309830bfd5 100644 --- a/front/extension/app/src/pages/ConversationPage.tsx +++ b/front/extension/app/src/pages/ConversationPage.tsx @@ -1,6 +1,6 @@ -import type { ProtectedRouteChildrenProps } from "@app/extension/app/src/components/auth/ProtectedRoute"; -import { ConversationContainer } from "@app/extension/app/src/components/conversation/ConversationContainer"; import { BarHeader, ChevronLeftIcon, Page } from "@dust-tt/sparkle"; +import type { ProtectedRouteChildrenProps } from "@extension/components/auth/ProtectedRoute"; +import { ConversationContainer } from "@extension/components/conversation/ConversationContainer"; import { Link, useNavigate, useParams } from "react-router-dom"; export const ConversationPage = ({ diff --git a/front/extension/app/src/pages/ConversationsPage.tsx b/front/extension/app/src/pages/ConversationsPage.tsx index 7ae1d707e3a9..bd79fc133409 100644 --- a/front/extension/app/src/pages/ConversationsPage.tsx +++ b/front/extension/app/src/pages/ConversationsPage.tsx @@ -1,5 +1,3 @@ -import type { ProtectedRouteChildrenProps } from "@app/extension/app/src/components/auth/ProtectedRoute"; -import { useConversations } from "@app/extension/app/src/components/conversation/useConversations"; import { BarHeader, ChevronLeftIcon, @@ -9,6 +7,8 @@ import { Page, } from "@dust-tt/sparkle"; import type { ConversationWithoutContentType } from "@dust-tt/types"; +import type { ProtectedRouteChildrenProps } from "@extension/components/auth/ProtectedRoute"; +import { useConversations } from "@extension/components/conversation/useConversations"; import moment from "moment"; import { Link, useNavigate } from "react-router-dom"; diff --git a/front/extension/app/src/pages/LoginPage.tsx b/front/extension/app/src/pages/LoginPage.tsx index 34e601bd77bf..917f320824f7 100644 --- a/front/extension/app/src/pages/LoginPage.tsx +++ b/front/extension/app/src/pages/LoginPage.tsx @@ -1,4 +1,3 @@ -import { useAuth } from "@app/extension/app/src/components/auth/AuthProvider"; import { Button, LoginIcon, @@ -7,6 +6,7 @@ import { NewDropdownMenuItem, NewDropdownMenuTrigger, } from "@dust-tt/sparkle"; +import { useAuth } from "@extension/components/auth/AuthProvider"; import { useEffect } from "react"; import { useNavigate } from "react-router-dom"; diff --git a/front/extension/app/src/pages/MainPage.tsx b/front/extension/app/src/pages/MainPage.tsx index fd4bb91310f4..335b2ffb08ff 100644 --- a/front/extension/app/src/pages/MainPage.tsx +++ b/front/extension/app/src/pages/MainPage.tsx @@ -1,6 +1,6 @@ -import type { ProtectedRouteChildrenProps } from "@app/extension/app/src/components/auth/ProtectedRoute"; -import { ConversationContainer } from "@app/extension/app/src/components/conversation/ConversationContainer"; import { Button, HistoryIcon, Page } from "@dust-tt/sparkle"; +import type { ProtectedRouteChildrenProps } from "@extension/components/auth/ProtectedRoute"; +import { ConversationContainer } from "@extension/components/conversation/ConversationContainer"; import { useNavigate } from "react-router-dom"; export const MainPage = ({ user, workspace }: ProtectedRouteChildrenProps) => {