diff --git a/surfsense_backend/app/routes/google_drive_add_connector_route.py b/surfsense_backend/app/routes/google_drive_add_connector_route.py index e21b95dfd..508fcf63f 100644 --- a/surfsense_backend/app/routes/google_drive_add_connector_route.py +++ b/surfsense_backend/app/routes/google_drive_add_connector_route.py @@ -345,6 +345,7 @@ async def drive_callback( db_connector.config = { **creds_dict, "start_page_token": existing_start_page_token, + "auth_expired": False, } from sqlalchemy.orm.attributes import flag_modified diff --git a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/google-drive-config.tsx b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/google-drive-config.tsx index b48b55c93..0e4202ff6 100644 --- a/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/google-drive-config.tsx +++ b/surfsense_web/components/assistant-ui/connector-popup/connector-configs/components/google-drive-config.tsx @@ -2,14 +2,12 @@ import { useAtomValue } from "jotai"; import { - ChevronDown, - ChevronRight, + File, FileSpreadsheet, FileText, FolderClosed, Image, - Loader2, Presentation, RefreshCw, X, @@ -276,7 +274,7 @@ export const GoogleDriveConfig: FC = ({ connector, onConfi disabled={pickerLoading || isAuthExpired} className="bg-slate-400/5 dark:bg-white/5 border-slate-400/20 hover:bg-slate-400/10 dark:hover:bg-white/10 text-xs sm:text-sm h-8 sm:h-9" > - {pickerLoading && } + {pickerLoading && } {totalSelected > 0 ? "Change Selection" : "Select from Google Drive"} diff --git a/surfsense_web/components/tool-ui/google-drive/create-file.tsx b/surfsense_web/components/tool-ui/google-drive/create-file.tsx index 063911296..5632de702 100644 --- a/surfsense_web/components/tool-ui/google-drive/create-file.tsx +++ b/surfsense_web/components/tool-ui/google-drive/create-file.tsx @@ -5,7 +5,6 @@ import { AlertTriangleIcon, CornerDownLeftIcon, FileIcon, - Loader2Icon, Pen, RefreshCwIcon, } from "lucide-react"; @@ -22,7 +21,7 @@ import { SelectValue, } from "@/components/ui/select"; import { PlateEditor } from "@/components/editor/plate-editor"; -import { Spinner } from "@/components/ui/spinner"; +import { TextShimmerLoader } from "@/components/prompt-kit/loader"; import { authenticatedFetch } from "@/lib/auth-utils"; import { useSetAtom } from "jotai"; import { openHitlEditPanelAtom } from "@/atoms/chat/hitl-edit-panel.atom"; @@ -436,11 +435,7 @@ function InsufficientPermissionsCard({ result }: { result: InsufficientPermissio

{result.message}

@@ -517,9 +512,8 @@ export const CreateGoogleDriveFileToolUI = makeAssistantToolUI< render: function CreateGoogleDriveFileUI({ args, result, status }) { if (status.type === "running") { return ( -
- -

Preparing Google Drive file...

+
+
); } diff --git a/surfsense_web/components/tool-ui/google-drive/trash-file.tsx b/surfsense_web/components/tool-ui/google-drive/trash-file.tsx index a556320b9..02e833f23 100644 --- a/surfsense_web/components/tool-ui/google-drive/trash-file.tsx +++ b/surfsense_web/components/tool-ui/google-drive/trash-file.tsx @@ -5,7 +5,6 @@ import { AlertTriangleIcon, CornerDownLeftIcon, InfoIcon, - Loader2Icon, RefreshCwIcon, TriangleAlertIcon, } from "lucide-react"; @@ -13,7 +12,7 @@ import { useParams } from "next/navigation"; import { useCallback, useEffect, useState } from "react"; import { toast } from "sonner"; import { Button } from "@/components/ui/button"; -import { Spinner } from "@/components/ui/spinner"; +import { TextShimmerLoader } from "@/components/prompt-kit/loader"; import { authenticatedFetch } from "@/lib/auth-utils"; interface GoogleDriveAccount { @@ -368,11 +367,7 @@ function InsufficientPermissionsCard({ result }: { result: InsufficientPermissio

{result.message}

@@ -466,9 +461,8 @@ export const DeleteGoogleDriveFileToolUI = makeAssistantToolUI< render: function DeleteGoogleDriveFileUI({ result, status }) { if (status.type === "running") { return ( -
- -

Looking up file in Google Drive...

+
+
); } diff --git a/surfsense_web/components/tool-ui/linear/create-linear-issue.tsx b/surfsense_web/components/tool-ui/linear/create-linear-issue.tsx index d0d41ce44..d0cd5eb0b 100644 --- a/surfsense_web/components/tool-ui/linear/create-linear-issue.tsx +++ b/surfsense_web/components/tool-ui/linear/create-linear-issue.tsx @@ -12,7 +12,7 @@ import { SelectValue, } from "@/components/ui/select"; import { PlateEditor } from "@/components/editor/plate-editor"; -import { Spinner } from "@/components/ui/spinner"; +import { TextShimmerLoader } from "@/components/prompt-kit/loader"; import { useSetAtom } from "jotai"; import { openHitlEditPanelAtom } from "@/atoms/chat/hitl-edit-panel.atom"; @@ -571,9 +571,8 @@ export const CreateLinearIssueToolUI = makeAssistantToolUI< render: function CreateLinearIssueUI({ args, result, status }) { if (status.type === "running") { return ( -
- -

Preparing Linear issue...

+
+
); } diff --git a/surfsense_web/components/tool-ui/linear/delete-linear-issue.tsx b/surfsense_web/components/tool-ui/linear/delete-linear-issue.tsx index 87663801c..f973f3196 100644 --- a/surfsense_web/components/tool-ui/linear/delete-linear-issue.tsx +++ b/surfsense_web/components/tool-ui/linear/delete-linear-issue.tsx @@ -4,7 +4,7 @@ import { makeAssistantToolUI } from "@assistant-ui/react"; import { CornerDownLeftIcon, TriangleAlertIcon } from "lucide-react"; import { useCallback, useEffect, useState } from "react"; import { Button } from "@/components/ui/button"; -import { Spinner } from "@/components/ui/spinner"; +import { TextShimmerLoader } from "@/components/prompt-kit/loader"; interface InterruptResult { __interrupt__: true; @@ -367,9 +367,8 @@ export const DeleteLinearIssueToolUI = makeAssistantToolUI< render: function DeleteLinearIssueUI({ result, status }) { if (status.type === "running") { return ( -
- -

Preparing Linear issue deletion...

+
+
); } diff --git a/surfsense_web/components/tool-ui/linear/update-linear-issue.tsx b/surfsense_web/components/tool-ui/linear/update-linear-issue.tsx index 205d9c904..000585cfb 100644 --- a/surfsense_web/components/tool-ui/linear/update-linear-issue.tsx +++ b/surfsense_web/components/tool-ui/linear/update-linear-issue.tsx @@ -13,7 +13,7 @@ import { SelectValue, } from "@/components/ui/select"; import { PlateEditor } from "@/components/editor/plate-editor"; -import { Spinner } from "@/components/ui/spinner"; +import { TextShimmerLoader } from "@/components/prompt-kit/loader"; import { openHitlEditPanelAtom } from "@/atoms/chat/hitl-edit-panel.atom"; interface LinearLabel { @@ -709,9 +709,8 @@ export const UpdateLinearIssueToolUI = makeAssistantToolUI< render: function UpdateLinearIssueUI({ result, status }) { if (status.type === "running") { return ( -
- -

Preparing Linear issue update...

+
+
); } diff --git a/surfsense_web/components/tool-ui/notion/create-notion-page.tsx b/surfsense_web/components/tool-ui/notion/create-notion-page.tsx index d50003320..d18cc01c9 100644 --- a/surfsense_web/components/tool-ui/notion/create-notion-page.tsx +++ b/surfsense_web/components/tool-ui/notion/create-notion-page.tsx @@ -13,7 +13,7 @@ import { SelectValue, } from "@/components/ui/select"; import { PlateEditor } from "@/components/editor/plate-editor"; -import { Spinner } from "@/components/ui/spinner"; +import { TextShimmerLoader } from "@/components/prompt-kit/loader"; import { openHitlEditPanelAtom } from "@/atoms/chat/hitl-edit-panel.atom"; interface InterruptResult { @@ -444,9 +444,8 @@ export const CreateNotionPageToolUI = makeAssistantToolUI< render: function CreateNotionPageUI({ args, result, status }) { if (status.type === "running") { return ( -
- -

Preparing Notion page...

+
+
); } diff --git a/surfsense_web/components/tool-ui/notion/delete-notion-page.tsx b/surfsense_web/components/tool-ui/notion/delete-notion-page.tsx index d04901d7a..052bf7418 100644 --- a/surfsense_web/components/tool-ui/notion/delete-notion-page.tsx +++ b/surfsense_web/components/tool-ui/notion/delete-notion-page.tsx @@ -4,7 +4,7 @@ import { makeAssistantToolUI } from "@assistant-ui/react"; import { CornerDownLeftIcon, TriangleAlertIcon } from "lucide-react"; import { useCallback, useEffect, useState } from "react"; import { Button } from "@/components/ui/button"; -import { Spinner } from "@/components/ui/spinner"; +import { TextShimmerLoader } from "@/components/prompt-kit/loader"; interface InterruptResult { __interrupt__: true; @@ -383,9 +383,8 @@ export const DeleteNotionPageToolUI = makeAssistantToolUI< render: function DeleteNotionPageUI({ result, status }) { if (status.type === "running") { return ( -
- -

Deleting Notion page...

+
+
); } diff --git a/surfsense_web/components/tool-ui/notion/update-notion-page.tsx b/surfsense_web/components/tool-ui/notion/update-notion-page.tsx index 58ce04dba..aa8c68318 100644 --- a/surfsense_web/components/tool-ui/notion/update-notion-page.tsx +++ b/surfsense_web/components/tool-ui/notion/update-notion-page.tsx @@ -6,7 +6,7 @@ import { CornerDownLeftIcon, Pen } from "lucide-react"; import { useCallback, useEffect, useState } from "react"; import { Button } from "@/components/ui/button"; import { PlateEditor } from "@/components/editor/plate-editor"; -import { Spinner } from "@/components/ui/spinner"; +import { TextShimmerLoader } from "@/components/prompt-kit/loader"; import { openHitlEditPanelAtom } from "@/atoms/chat/hitl-edit-panel.atom"; interface InterruptResult { @@ -390,9 +390,8 @@ export const UpdateNotionPageToolUI = makeAssistantToolUI< render: function UpdateNotionPageUI({ args, result, status }) { if (status.type === "running") { return ( -
- -

Updating Notion page...

+
+
); }