mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-07-02 22:01:05 +02:00
refactor: replace Eye icon with ScanEye in multiple components and enhance model not found messages
This commit is contained in:
parent
b6e2510e55
commit
25644e1c0b
3 changed files with 34 additions and 16 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
"use client";
|
"use client";
|
||||||
|
|
||||||
import { useAtomValue } from "jotai";
|
import { useAtomValue } from "jotai";
|
||||||
import { Bot, Check, ChevronDown, Edit3, Eye, ImageIcon, Plus, Search, Zap } from "lucide-react";
|
import { Bot, Check, ChevronDown, Edit3, ImageIcon, Plus, ScanEye, Search, Zap } from "lucide-react";
|
||||||
import { type UIEvent, useCallback, useMemo, useState } from "react";
|
import { type UIEvent, useCallback, useMemo, useState } from "react";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
import {
|
import {
|
||||||
|
|
@ -387,7 +387,7 @@ export function ModelSelector({
|
||||||
</span>
|
</span>
|
||||||
</>
|
</>
|
||||||
) : (
|
) : (
|
||||||
<Eye className="size-4 text-muted-foreground" />
|
<ScanEye className="size-4 text-muted-foreground" />
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
)}
|
)}
|
||||||
|
|
@ -425,7 +425,7 @@ export function ModelSelector({
|
||||||
value="vision"
|
value="vision"
|
||||||
className="gap-1.5 text-sm font-medium rounded-none text-muted-foreground transition-all duration-200 h-full bg-transparent data-[state=active]:bg-transparent shadow-none data-[state=active]:shadow-none border-b-[1.5px] border-transparent data-[state=active]:border-foreground dark:data-[state=active]:border-white data-[state=active]:text-foreground"
|
className="gap-1.5 text-sm font-medium rounded-none text-muted-foreground transition-all duration-200 h-full bg-transparent data-[state=active]:bg-transparent shadow-none data-[state=active]:shadow-none border-b-[1.5px] border-transparent data-[state=active]:border-foreground dark:data-[state=active]:border-white data-[state=active]:text-foreground"
|
||||||
>
|
>
|
||||||
<Eye className="size-3.5" />
|
<ScanEye className="size-3.5" />
|
||||||
Vision
|
Vision
|
||||||
</TabsTrigger>
|
</TabsTrigger>
|
||||||
</TabsList>
|
</TabsList>
|
||||||
|
|
@ -458,9 +458,15 @@ export function ModelSelector({
|
||||||
>
|
>
|
||||||
<CommandEmpty className="py-8 text-center">
|
<CommandEmpty className="py-8 text-center">
|
||||||
<div className="flex flex-col items-center gap-2">
|
<div className="flex flex-col items-center gap-2">
|
||||||
<Search className="size-8 text-muted-foreground" />
|
{llmGlobalConfigs?.length || llmUserConfigs?.length ? (
|
||||||
<p className="text-sm text-muted-foreground">No models found</p>
|
<>
|
||||||
<p className="text-xs text-muted-foreground/60">Try a different search term</p>
|
<Search className="size-8 text-muted-foreground" />
|
||||||
|
<p className="text-sm text-muted-foreground">No models found</p>
|
||||||
|
<p className="text-xs text-muted-foreground/60">Try a different search term</p>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<p className="text-sm text-muted-foreground">No models found</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</CommandEmpty>
|
</CommandEmpty>
|
||||||
|
|
||||||
|
|
@ -645,9 +651,15 @@ export function ModelSelector({
|
||||||
>
|
>
|
||||||
<CommandEmpty className="py-8 text-center">
|
<CommandEmpty className="py-8 text-center">
|
||||||
<div className="flex flex-col items-center gap-2">
|
<div className="flex flex-col items-center gap-2">
|
||||||
<Search className="size-8 text-muted-foreground" />
|
{imageGlobalConfigs?.length || imageUserConfigs?.length ? (
|
||||||
<p className="text-sm text-muted-foreground">No image models found</p>
|
<>
|
||||||
<p className="text-xs text-muted-foreground/60">Try a different search term</p>
|
<Search className="size-8 text-muted-foreground" />
|
||||||
|
<p className="text-sm text-muted-foreground">No image models found</p>
|
||||||
|
<p className="text-xs text-muted-foreground/60">Try a different search term</p>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<p className="text-sm text-muted-foreground">No image models found</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</CommandEmpty>
|
</CommandEmpty>
|
||||||
|
|
||||||
|
|
@ -817,9 +829,15 @@ export function ModelSelector({
|
||||||
>
|
>
|
||||||
<CommandEmpty className="py-8 text-center">
|
<CommandEmpty className="py-8 text-center">
|
||||||
<div className="flex flex-col items-center gap-2">
|
<div className="flex flex-col items-center gap-2">
|
||||||
<Search className="size-8 text-muted-foreground" />
|
{visionGlobalConfigs?.length || visionUserConfigs?.length ? (
|
||||||
<p className="text-sm text-muted-foreground">No vision models found</p>
|
<>
|
||||||
<p className="text-xs text-muted-foreground/60">Try a different search term</p>
|
<Search className="size-8 text-muted-foreground" />
|
||||||
|
<p className="text-sm text-muted-foreground">No vision models found</p>
|
||||||
|
<p className="text-xs text-muted-foreground/60">Try a different search term</p>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<p className="text-sm text-muted-foreground">No vision models found</p>
|
||||||
|
)}
|
||||||
</div>
|
</div>
|
||||||
</CommandEmpty>
|
</CommandEmpty>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import {
|
||||||
Bot,
|
Bot,
|
||||||
CircleCheck,
|
CircleCheck,
|
||||||
CircleDashed,
|
CircleDashed,
|
||||||
Eye,
|
ScanEye,
|
||||||
FileText,
|
FileText,
|
||||||
ImageIcon,
|
ImageIcon,
|
||||||
RefreshCw,
|
RefreshCw,
|
||||||
|
|
@ -74,7 +74,7 @@ const ROLE_DESCRIPTIONS = {
|
||||||
configType: "image" as const,
|
configType: "image" as const,
|
||||||
},
|
},
|
||||||
vision: {
|
vision: {
|
||||||
icon: Eye,
|
icon: ScanEye,
|
||||||
title: "Vision LLM",
|
title: "Vision LLM",
|
||||||
description: "Vision-capable model for screenshot analysis and context extraction",
|
description: "Vision-capable model for screenshot analysis and context extraction",
|
||||||
color: "text-muted-foreground",
|
color: "text-muted-foreground",
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import {
|
||||||
Brain,
|
Brain,
|
||||||
CircleUser,
|
CircleUser,
|
||||||
Earth,
|
Earth,
|
||||||
Eye,
|
ScanEye,
|
||||||
ImageIcon,
|
ImageIcon,
|
||||||
ListChecks,
|
ListChecks,
|
||||||
UserKey,
|
UserKey,
|
||||||
|
|
@ -97,7 +97,7 @@ export function SearchSpaceSettingsDialog({ searchSpaceId }: SearchSpaceSettings
|
||||||
{
|
{
|
||||||
value: "vision-models",
|
value: "vision-models",
|
||||||
label: t("nav_vision_models"),
|
label: t("nav_vision_models"),
|
||||||
icon: <Eye className="h-4 w-4" />,
|
icon: <ScanEye className="h-4 w-4" />,
|
||||||
},
|
},
|
||||||
{ value: "team-roles", label: t("nav_team_roles"), icon: <UserKey className="h-4 w-4" /> },
|
{ value: "team-roles", label: t("nav_team_roles"), icon: <UserKey className="h-4 w-4" /> },
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue