Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.
chore: fix linter
Faisal Amir41bd7e1157af
diff --git a/web-app/src/components/LogViewer.tsx b/web-app/src/components/LogViewer.tsxindex a4b1009ed..cad8011a8 100644--- a/web-app/src/components/LogViewer.tsx+++ b/web-app/src/components/LogViewer.tsx@@ -3,19 +3,10 @@ import { useServiceHub } from '@/hooks/useServiceHub'import type { LogEntry } from '@/services/app/types'import { useTranslation } from '@/i18n/react-i18next-compat'-interface LogViewerProps {- className?: string- maxHeight?: string- filterTarget?: string- isVisible?: boolean-}-const SERVER_LOG_TARGET = 'app_lib::core::server::proxy'const LOG_EVENT_NAME = 'log://log'-export function LogViewer({- isVisible,-}: LogViewerProps) {+export function LogViewer() {const { t } = useTranslation()const [logs, setLogs] = useState<LogEntry[]>([])const logsContainerRef = useRef<HTMLDivElement>(null)@@ -28,26 +19,6 @@ export function LogViewer({}}, [])- // Scroll when visibility changes OR when logs change (and isVisible is true)- useEffect(() => {- if (isVisible && logs.length > 0) {- // Use requestAnimationFrame to ensure DOM is fully rendered- let rafId1: number- let rafId2: number-- rafId1 = requestAnimationFrame(() => {- scrollToBottom()- // Try again after a frame to handle any animations- rafId2 = requestAnimationFrame(scrollToBottom)- })-- return () => {- cancelAnimationFrame(rafId1)- cancelAnimationFrame(rafId2)- }- }- }, [isVisible, logs.length, scrollToBottom])-// Initial scroll to bottom when logs are loadeduseEffect(() => {serviceHub.app().readLogs().then((logData) => {diff --git a/web-app/src/containers/RenderMarkdown.tsx b/web-app/src/containers/RenderMarkdown.tsxindex 7f18f9a9c..84f4f7aa6 100644--- a/web-app/src/containers/RenderMarkdown.tsx+++ b/web-app/src/containers/RenderMarkdown.tsx@@ -1,4 +1,4 @@-/* eslint-disable @typescript-eslint/no-explicit-any */+import { Components } from 'react-markdown'import { memo, useMemo } from 'react'import { cn, disableIndentedCodeBlockPlugin } from '@/lib/utils'diff --git a/web-app/src/hooks/useClaudeCodeModel.ts b/web-app/src/hooks/useClaudeCodeModel.tsindex f085c93c0..7bbd7b636 100644--- a/web-app/src/hooks/useClaudeCodeModel.ts+++ b/web-app/src/hooks/useClaudeCodeModel.ts@@ -1,4 +1,4 @@-import { useEffect, useState, useCallback } from 'react'+import { useState, useCallback } from 'react'export type ClaudeCodeModelType = 'big' | 'medium' | 'small'diff --git a/web-app/src/routes/settings/local-api-server.tsx b/web-app/src/routes/settings/local-api-server.tsxindex b9e55243b..3006fb201 100644--- a/web-app/src/routes/settings/local-api-server.tsx+++ b/web-app/src/routes/settings/local-api-server.tsx@@ -67,7 +67,7 @@ function LocalAPIServerContent() {const { providers, selectedModel, selectedProvider, getProviderByName } =useModelProvider()const [showApiKeyError, setShowApiKeyError] = useState(false)- const [_, setIsApiKeyEmpty] = useState(+ const [, setIsApiKeyEmpty] = useState(!apiKey || apiKey.toString().trim().length === 0)const { activeModels } = useAppState()@@ -75,7 +75,6 @@ function LocalAPIServerContent() {// Helper card state (persisted to localStorage)const { models: helperModels, setModel: setHelperModel, setEnvVars, setCustomCli } = useClaudeCodeModel()- const [isLogVisible, setIsLogVisible] = useState(false)const [isCustomCliDialogOpen, setIsCustomCliDialogOpen] = useState(false)useEffect(() => {@@ -522,7 +521,7 @@ function LocalAPIServerContent() {/><div className="p-4 shrink-0"><Card>- <Collapsible defaultOpen={false} onOpenChange={(open) => setIsLogVisible(open)}>+ <Collapsible defaultOpen={false} ><div className="flex items-center justify-between"><CollapsibleTrigger className="flex items-center gap-2 hover:no-underline"><IconChevronDown@@ -544,7 +543,7 @@ function LocalAPIServerContent() {<CollapsibleContent><div className="pt-3"><div className="h-[200px]">- <LogViewer isVisible={isLogVisible} />+ <LogViewer /></div></div></CollapsibleContent>