mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-06-08 20:25:19 +02:00
refactor: Clean up imports and streamline component structure in thread.tsx and google-drive-folder-tree.tsx for improved maintainability
This commit is contained in:
parent
fda682c9e7
commit
2373421212
2 changed files with 6 additions and 18 deletions
|
|
@ -1,5 +1,3 @@
|
|||
import { AssistantIf, ThreadPrimitive } from "@assistant-ui/react";
|
||||
import type { FC } from "react";
|
||||
import {
|
||||
ActionBarPrimitive,
|
||||
AssistantIf,
|
||||
|
|
@ -10,7 +8,6 @@ import {
|
|||
ThreadPrimitive,
|
||||
useAssistantState,
|
||||
useComposerRuntime,
|
||||
useThreadViewport,
|
||||
} from "@assistant-ui/react";
|
||||
import { useAtom, useAtomValue, useSetAtom } from "jotai";
|
||||
import {
|
||||
|
|
@ -28,10 +25,8 @@ import {
|
|||
RefreshCwIcon,
|
||||
SquareIcon,
|
||||
} from "lucide-react";
|
||||
import Link from "next/link";
|
||||
import { useParams } from "next/navigation";
|
||||
import {
|
||||
createContext,
|
||||
type FC,
|
||||
useCallback,
|
||||
useContext,
|
||||
|
|
@ -69,16 +64,11 @@ import {
|
|||
DocumentMentionPicker,
|
||||
type DocumentMentionPickerRef,
|
||||
} from "@/components/new-chat/document-mention-picker";
|
||||
import { ChainOfThoughtItem } from "@/components/prompt-kit/chain-of-thought";
|
||||
import { TextShimmerLoader } from "@/components/prompt-kit/loader";
|
||||
import type { ThinkingStep } from "@/components/tool-ui/deepagent-thinking";
|
||||
import { ThinkingStepsContext } from "@/components/assistant-ui/thinking-steps";
|
||||
import { ThreadWelcome } from "@/components/assistant-ui/thread-welcome";
|
||||
import { Composer } from "@/components/assistant-ui/composer";
|
||||
import { ThreadScrollToBottom } from "@/components/assistant-ui/thread-scroll-to-bottom";
|
||||
import { AssistantMessage } from "@/components/assistant-ui/assistant-message";
|
||||
import { UserMessage } from "@/components/assistant-ui/user-message";
|
||||
import { EditComposer } from "@/components/assistant-ui/edit-composer";
|
||||
import {
|
||||
ThinkingStepsContext,
|
||||
ThinkingStepsDisplay,
|
||||
} from "@/components/assistant-ui/thinking-steps";
|
||||
import { Button } from "@/components/ui/button";
|
||||
import type { Document } from "@/contracts/types/document.types";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
|
|
|||
|
|
@ -228,12 +228,10 @@ export function GoogleDriveFolderTree({
|
|||
<div key={item.id} className="w-full sm:ml-[calc(var(--level)*1.25rem)]" style={{ marginLeft: `${level * indentSize}rem`, '--level': level } as React.CSSProperties & { '--level'?: number }}>
|
||||
<div
|
||||
className={cn(
|
||||
"flex items-center group gap-2 h-auto py-2 px-2 rounded-md hover:bg-accent cursor-pointer",
|
||||
isSelected && "bg-accent/50"
|
||||
"flex items-center gap-1 sm:gap-2 h-auto py-1 sm:py-2 px-1 sm:px-2 rounded-md",
|
||||
"flex items-center group gap-1 sm:gap-2 h-auto py-1 sm:py-2 px-1 sm:px-2 rounded-md",
|
||||
isFolder && "hover:bg-accent cursor-pointer",
|
||||
!isFolder && "cursor-default opacity-60",
|
||||
isSelected && isFolder && "bg-accent/50"
|
||||
isSelected && "bg-accent/50"
|
||||
)}
|
||||
>
|
||||
{isFolder ? (
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue