Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
fix: linter
Louis9c9f59fb6951
diff --git a/web-app/src/hooks/useInterfaceSettings.ts b/web-app/src/hooks/useInterfaceSettings.tsindex 5c6d61d3d..e8aa914ff 100644--- a/web-app/src/hooks/useInterfaceSettings.ts+++ b/web-app/src/hooks/useInterfaceSettings.ts@@ -13,7 +13,7 @@ import {isThreadScrollBehavior,} from '@/constants/threadScroll'-export type FontSize = '14px' | '16px' | '18px' | '20px'+export type FontSize = '14px' | '15px' | '16px' | '18px' | '20px'export type ChatWidth = 'full' | 'compact'interface InterfaceSettingsState {diff --git a/web-app/src/routes/hub/index.tsx b/web-app/src/routes/hub/index.tsxindex e139e4be7..e2ae36598 100644--- a/web-app/src/routes/hub/index.tsx+++ b/web-app/src/routes/hub/index.tsx@@ -495,7 +495,6 @@ function HubContent() {><div className="line-clamp-2 mt-3 text-main-view-fg/60"><RenderMarkdown- enableRawHtml={true}className="select-none reset-heading"components={{a: ({ ...props }) => (diff --git a/web-app/src/ui/command.tsx b/web-app/src/ui/command.tsxindex a4b24f1d8..7bf967efe 100644--- a/web-app/src/ui/command.tsx+++ b/web-app/src/ui/command.tsx@@ -1,15 +1,14 @@-import * as React from "react";-import { Command as CommandPrimitive } from "cmdk";-import { SearchIcon } from "lucide-react";-import { useIsMobile } from "../hooks/use-mobile";-import { cn } from "../lib/utils";+import * as React from 'react'+import { Command as CommandPrimitive } from 'cmdk'+import { SearchIcon } from 'lucide-react'+import { cn } from '../lib/utils'import {Dialog,DialogContent,DialogDescription,DialogHeader,DialogTitle,-} from "./dialog";+} from './dialog'function Command({className,@@ -19,28 +18,27 @@ function Command({<CommandPrimitivedata-slot="command"className={cn(- "bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",- className,+ 'bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md',+ className)}{...props}/>- );+ )}function CommandDialog({- title = "Command Palette",- description = "Search for a command to run...",+ title = 'Command Palette',+ description = 'Search for a command to run...',children,className,showCloseButton = true,...props}: React.ComponentProps<typeof Dialog> & {- title?: string;- description?: string;- className?: string;- showCloseButton?: boolean;+ title?: string+ description?: string+ className?: string+ showCloseButton?: boolean}) {- const isMobile = useIsMobile();return (<Dialog {...props}><DialogHeader className="sr-only">@@ -48,8 +46,8 @@ function CommandDialog({<DialogDescription>{description}</DialogDescription></DialogHeader><DialogContent- onOpenAutoFocus={(e) => (isMobile ? e.preventDefault() : undefined)}- className={cn("overflow-hidden p-0", className)}+ onOpenAutoFocus={() => undefined}+ className={cn('overflow-hidden p-0', className)}showCloseButton={showCloseButton}><Command className="**:[[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:font-medium **:[[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 **:[[cmdk-input]]:h-12 **:[[cmdk-item]]:px-2 **:[[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">@@ -57,7 +55,7 @@ function CommandDialog({</Command></DialogContent></Dialog>- );+ )}function CommandInput({@@ -73,13 +71,13 @@ function CommandInput({<CommandPrimitive.Inputdata-slot="command-input"className={cn(- "placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-base outline-hidden disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",- className,+ 'placeholder:text-muted-foreground flex h-10 w-full rounded-md bg-transparent py-3 text-base outline-hidden disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',+ className)}{...props}/></div>- );+ )}function CommandList({@@ -90,12 +88,12 @@ function CommandList({<CommandPrimitive.Listdata-slot="command-list"className={cn(- "max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto",- className,+ 'max-h-[300px] scroll-py-1 overflow-x-hidden overflow-y-auto',+ className)}{...props}/>- );+ )}function CommandEmpty({@@ -107,7 +105,7 @@ function CommandEmpty({className="py-6 text-center text-sm"{...props}/>- );+ )}function CommandGroup({@@ -118,12 +116,12 @@ function CommandGroup({<CommandPrimitive.Groupdata-slot="command-group"className={cn(- "text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium",- className,+ 'text-foreground **:[[cmdk-group-heading]]:text-muted-foreground overflow-hidden p-1 **:[[cmdk-group-heading]]:px-2 **:[[cmdk-group-heading]]:py-1.5 **:[[cmdk-group-heading]]:text-xs **:[[cmdk-group-heading]]:font-medium',+ className)}{...props}/>- );+ )}function CommandSeparator({@@ -133,10 +131,10 @@ function CommandSeparator({return (<CommandPrimitive.Separatordata-slot="command-separator"- className={cn("bg-border -mx-1 h-px", className)}+ className={cn('bg-border -mx-1 h-px', className)}{...props}/>- );+ )}function CommandItem({@@ -148,27 +146,27 @@ function CommandItem({data-slot="command-item"className={cn("data-[selected=true]:bg-accent data-[selected=true]:text-accent-foreground [&_svg:not([class*='text-'])]:text-muted-foreground relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",- className,+ className)}{...props}/>- );+ )}function CommandShortcut({className,...props-}: React.ComponentProps<"span">) {+}: React.ComponentProps<'span'>) {return (<spandata-slot="command-shortcut"className={cn(- "text-muted-foreground ml-auto text-xs tracking-widest",- className,+ 'text-muted-foreground ml-auto text-xs tracking-widest',+ className)}{...props}/>- );+ )}export {@@ -181,4 +179,4 @@ export {CommandItem,CommandShortcut,CommandSeparator,-};+}diff --git a/web-app/src/ui/dropdrawer.tsx b/web-app/src/ui/dropdrawer.tsxindex f2f6f7078..9659b634e 100644--- a/web-app/src/ui/dropdrawer.tsx+++ b/web-app/src/ui/dropdrawer.tsx@@ -22,7 +22,6 @@ import {DropdownMenuSubTrigger,DropdownMenuTrigger,} from "./dropdown-menu";-import { useIsMobile } from "../hooks/use-mobile";import { cn } from "../lib/utils";const DropDrawerContext = React.createContext<{ isMobile: boolean }>({@@ -45,14 +44,12 @@ function DropDrawer({}:| React.ComponentProps<typeof Drawer>| React.ComponentProps<typeof DropdownMenu>) {- const isMobile = useIsMobile();- const DropdownComponent = isMobile ? Drawer : DropdownMenu;+ const DropdownComponent = DropdownMenu;return (- <DropDrawerContext.Provider value={{ isMobile }}>+ <DropDrawerContext.Provider value={{ isMobile: false }}><DropdownComponentdata-slot="drop-drawer"- {...(isMobile && { autoFocus: true })}{...props}>{children}