mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-28 02:23:53 +02:00
refactor: rename Electric hooks and clean consumer components
Rename hooks to remove Electric branding: - use-connectors-electric → use-connectors-sync (useConnectorsSync) - use-messages-electric → use-messages-sync (useMessagesSync) - use-comments-electric → use-comments-sync (useCommentsSync) Clean all Electric/PGlite references in consumer components: connector-popup.tsx, thread.tsx, page.tsx, use-indexing-connectors.ts, use-connector-dialog.ts
This commit is contained in:
parent
a02bc54e40
commit
f04ab89418
8 changed files with 32 additions and 43 deletions
|
|
@ -91,7 +91,7 @@ import { getConnectorIcon } from "@/contracts/enums/connectorIcons";
|
|||
import { getToolIcon } from "@/contracts/enums/toolIcons";
|
||||
import type { Document } from "@/contracts/types/document.types";
|
||||
import { useBatchCommentsPreload } from "@/hooks/use-comments";
|
||||
import { useCommentsElectric } from "@/hooks/use-comments-electric";
|
||||
import { useCommentsSync } from "@/hooks/use-comments-sync";
|
||||
import { useMediaQuery } from "@/hooks/use-media-query";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
|
|
@ -365,8 +365,8 @@ const Composer: FC = () => {
|
|||
const respondingToUserId = sessionState?.respondingToUserId ?? null;
|
||||
const isBlockedByOtherUser = isAiResponding && respondingToUserId !== currentUser?.id;
|
||||
|
||||
// Sync comments for the entire thread via Electric SQL (one subscription per thread)
|
||||
useCommentsElectric(threadId);
|
||||
// Sync comments for the entire thread via Zero (one subscription per thread)
|
||||
useCommentsSync(threadId);
|
||||
|
||||
// Batch-prefetch comments for all assistant messages so individual useComments
|
||||
// hooks never fire their own network requests (eliminates N+1 API calls).
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue