chore: linting

This commit is contained in:
DESKTOP-RTLN3BA\$punk 2026-07-17 14:39:39 -07:00
parent be35eb8743
commit c0ebb62fb2
20 changed files with 158 additions and 125 deletions

View file

@ -1,6 +1,7 @@
// Server component
import type React from "react";
import { cookies } from "next/headers";
import type React from "react";
import { DashboardClientLayout } from "./client-layout";
const PLAYGROUND_SIDEBAR_COLLAPSED_COOKIE = "surfsense_playground_sidebar_collapsed";

View file

@ -34,7 +34,7 @@ export const ConnectorDialogHeader: FC<ConnectorDialogHeaderProps> = ({
MCP Connectors
</DialogTitle>
<DialogDescription className="text-xs sm:text-base text-muted-foreground/80 mt-1 sm:mt-1.5">
Connect external tools and services through MCP.
Connect external tools and services through MCP.
</DialogDescription>
</DialogHeader>

View file

@ -221,9 +221,7 @@ export const DocumentNode = React.memo(function DocumentNode({
className={cn(
"absolute inset-0 flex items-center justify-center transition-opacity",
canMention &&
(isMentioned
? "opacity-0"
: "max-sm:opacity-0 group-hover/item:opacity-0")
(isMentioned ? "opacity-0" : "max-sm:opacity-0 group-hover/item:opacity-0")
)}
>
{getDocumentTypeIcon(

View file

@ -390,75 +390,75 @@ export const FolderNode = React.memo(function FolderNode({
</Button>
</DropdownMenuTrigger>
<DropdownMenuContent align="end" className="w-40">
{isWatched && onRescan && (
{isWatched && onRescan && (
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
handleRescan();
}}
>
<RefreshCw className={cn("mr-2 h-4 w-4", isRescanning && "animate-spin")} />
Re-scan
</DropdownMenuItem>
)}
{isWatched && onStopWatching && (
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
onStopWatching(folder);
}}
>
<EyeOff className="mr-2 h-4 w-4" />
Stop watching
</DropdownMenuItem>
)}
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
handleRescan();
onCreateSubfolder(folder.id);
}}
>
<RefreshCw className={cn("mr-2 h-4 w-4", isRescanning && "animate-spin")} />
Re-scan
<FolderPlus className="mr-2 h-4 w-4" />
New subfolder
</DropdownMenuItem>
)}
{isWatched && onStopWatching && (
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
onStopWatching(folder);
startRename();
}}
>
<EyeOff className="mr-2 h-4 w-4" />
Stop watching
<Pencil className="mr-2 h-4 w-4" />
Rename
</DropdownMenuItem>
)}
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
onCreateSubfolder(folder.id);
}}
>
<FolderPlus className="mr-2 h-4 w-4" />
New subfolder
</DropdownMenuItem>
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
startRename();
}}
>
<Pencil className="mr-2 h-4 w-4" />
Rename
</DropdownMenuItem>
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
onMove(folder);
}}
>
<Move className="mr-2 h-4 w-4" />
Move to...
</DropdownMenuItem>
{onExportFolder && (
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
onExportFolder(folder);
onMove(folder);
}}
>
<Download className="mr-2 h-4 w-4" />
Export folder
<Move className="mr-2 h-4 w-4" />
Move to...
</DropdownMenuItem>
{onExportFolder && (
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
onExportFolder(folder);
}}
>
<Download className="mr-2 h-4 w-4" />
Export folder
</DropdownMenuItem>
)}
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
onDelete(folder);
}}
>
<Trash2 className="mr-2 h-4 w-4" />
Delete
</DropdownMenuItem>
)}
<DropdownMenuItem
onClick={(e) => {
e.stopPropagation();
onDelete(folder);
}}
>
<Trash2 className="mr-2 h-4 w-4" />
Delete
</DropdownMenuItem>
</DropdownMenuContent>
</DropdownMenu>
</div>

View file

@ -466,8 +466,7 @@ const CATEGORIES: HeroCategory[] = [
{
id: "report",
title: "AI Report Generator",
description:
"Turn your research into cited reports, then export to PDF or Markdown.",
description: "Turn your research into cited reports, then export to PDF or Markdown.",
src: `${HERO_TUTORIAL}/ReportGenGif_compressed.mp4`,
},
{
@ -658,8 +657,8 @@ export function HeroSection() {
"relative mb-8 max-w-2xl text-left text-sm text-neutral-600 antialiased sm:text-base md:text-lg dark:text-neutral-400"
)}
>
SurfSense is an open-source open web research platform, like NotebookLM but with
live data connectors. Your AI agents research the live web with structured data from
SurfSense is an open-source open web research platform, like NotebookLM but with live
data connectors. Your AI agents research the live web with structured data from
Reddit, YouTube, Instagram, TikTok, Google Maps, Google Search, and any page on the
open web.
</p>

View file

@ -81,9 +81,7 @@ export function CreateWorkspaceDialog({ open, onOpenChange }: CreateWorkspaceDia
// which is the authoritative net regardless.
const isInitialSetup = result.llm_setup?.stage === "initial_setup";
router.push(
isInitialSetup
? `/dashboard/${result.id}/onboard`
: `/dashboard/${result.id}/new-chat`
isInitialSetup ? `/dashboard/${result.id}/onboard` : `/dashboard/${result.id}/new-chat`
);
} catch (error) {
console.error("Failed to create workspace:", error);

View file

@ -96,7 +96,7 @@ export function AgentSetupTabs({ options }: { options?: Partial<McpSnippetOption
const snippet = client[transport];
const config = snippet.build(resolved);
return (
<TabsContent key={client.id} value={client.id} className="min-w-0 space-y-3">
<TabsContent key={client.id} value={client.id} className="min-w-0 space-y-3">
<ol className="list-decimal space-y-1 pl-5 text-sm leading-relaxed text-muted-foreground">
{snippet.steps.map((step) => (
<li key={step}>{step}</li>

View file

@ -45,7 +45,8 @@ export function ConnectAgentDialog({ className }: { className?: string }) {
<DialogHeader>
<DialogTitle>Connect to Claude Code, Codex, OpenCode</DialogTitle>
<DialogDescription>
Give your coding agent access to SurfSense scrapers and your knowledge base. Create an API key under API Keys, choose your agent, then paste the config.
Give your coding agent access to SurfSense scrapers and your knowledge base. Create an
API key under API Keys, choose your agent, then paste the config.
</DialogDescription>
</DialogHeader>
<AgentSetupTabs options={{ baseUrl: BACKEND_URL || undefined }} />

View file

@ -43,10 +43,7 @@ class ModelConnectionsApiService {
};
getLlmSetupStatus = async (workspaceId: number): Promise<LlmSetupStatus> => {
return baseApiService.get(
`/api/v1/workspaces/${workspaceId}/llm-setup-status`,
llmSetupStatus
);
return baseApiService.get(`/api/v1/workspaces/${workspaceId}/llm-setup-status`, llmSetupStatus);
};
getModelProviders = async (): Promise<ModelProviderRead[]> => {

View file

@ -77,8 +77,7 @@ export const googleSearch: ConnectorPageContent = {
},
{
label: "Related searches",
description:
"Suggested and related queries, to map how people actually phrase the search.",
description: "Suggested and related queries, to map how people actually phrase the search.",
},
{
label: "SERP metadata",