add eof new line missing (#6673)

This commit is contained in:
Dinh Long Nguyen 2025-09-30 21:48:38 +07:00 committed by GitHub
parent f33c2c205a
commit 82d29e7a7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
177 changed files with 177 additions and 177 deletions

View File

@ -250,4 +250,4 @@ describe('ConversationalExtension', () => {
expect(retrievedAssistant.modelId).toBe('')
})
})
})

View File

@ -131,4 +131,4 @@ describe('LocalOAIEngine', () => {
expect(engine.loadedModel).toBeUndefined()
})
})
})
})

View File

@ -96,4 +96,4 @@ describe('MCPExtension', () => {
expect(healthy).toBe(true)
})
})
})
})

View File

@ -25,4 +25,4 @@ export abstract class MCPExtension extends BaseExtension implements MCPInterface
* @returns A React component or null if no custom component is provided
*/
getToolComponent?(): ComponentType<MCPToolComponentProps> | null
}
}

View File

@ -131,4 +131,4 @@ describe('ModelManager', () => {
expect(modelManager.models.get('model-2')).toEqual(model2)
})
})
})
})

View File

@ -16,4 +16,4 @@ if (!window.core) {
})
}
// Add any other global mocks needed for core tests
// Add any other global mocks needed for core tests

View File

@ -1,2 +1,2 @@
export * from './mcpEntity'
export * from './mcpInterface'
export * from './mcpInterface'

View File

@ -35,4 +35,4 @@ export interface MCPToolComponentProps {
/** Function to toggle a tool's enabled/disabled state */
onToolToggle: (toolName: string, enabled: boolean) => void
}
}

View File

@ -29,4 +29,4 @@ export interface MCPInterface {
* Check if MCP service is healthy
*/
isHealthy(): Promise<boolean>
}
}

View File

@ -14,4 +14,4 @@ export const DEFAULT_ASSISTANT = {
name: 'Jan',
avatar: '👋',
created_at: 1747029866.542,
}
}

View File

@ -268,4 +268,4 @@ export class JanApiClient {
}
}
export const janApiClient = JanApiClient.getInstance()
export const janApiClient = JanApiClient.getInstance()

View File

@ -1 +1 @@
export { default } from './provider'
export { default } from './provider'

View File

@ -92,4 +92,4 @@ export const janProviderStore = {
useJanProviderStore.getState().clearError(),
reset: () =>
useJanProviderStore.getState().reset(),
}
}

View File

@ -51,4 +51,4 @@ export const WebSearchButton = ({
<span className={`text-sm font-medium ${isEnabled ? 'text-accent' : ''}`}>Search</span>
</button>
)
}
}

View File

@ -1 +1 @@
export { WebSearchButton } from './WebSearchButton'
export { WebSearchButton } from './WebSearchButton'

View File

@ -242,4 +242,4 @@ export default class MCPExtensionWeb extends MCPExtension {
getToolComponent(): ComponentType<MCPToolComponentProps> | null {
return WebSearchButton
}
}
}

View File

@ -57,4 +57,4 @@ export class JanMCPOAuthProvider implements OAuthClientProvider {
async codeVerifier(): Promise<string> {
throw new Error('Code verifier not supported')
}
}
}

View File

@ -47,4 +47,4 @@ export class ApiError extends Error {
isServerError(): boolean {
return this.status >= 500 && this.status < 600
}
}
}

View File

@ -38,4 +38,4 @@ export interface IndexedDBConfig {
keyPath: string
indexes?: { name: string; keyPath: string | string[]; unique?: boolean }[]
}[]
}
}

View File

@ -2,4 +2,4 @@ export {}
declare global {
declare const JAN_API_BASE: string
}
}

View File

@ -1 +1 @@
/// <reference types="vite/client" />
/// <reference types="vite/client" />

View File

@ -16,4 +16,4 @@ export default defineConfig({
define: {
JAN_API_BASE: JSON.stringify(process.env.JAN_API_BASE || 'https://api-dev.jan.ai/v1'),
}
})
})

View File

@ -49,4 +49,4 @@ describe('i18n module', () => {
expect(i18nModule[exportName]).toBeDefined()
})
})
})
})

View File

@ -76,4 +76,4 @@ describe('main.tsx', () => {
await import('../main')
}).rejects.toThrow()
})
})
})

View File

@ -416,4 +416,4 @@ describe('Dialog Components', () => {
expect(screen.getByText('Dialog description')).toHaveAttribute('data-slot', 'dialog-description')
expect(screen.getByText('Footer button').closest('div')).toHaveAttribute('data-slot', 'dialog-footer')
})
})
})

View File

@ -853,4 +853,4 @@ describe('DropdownMenu Components', () => {
expect(handleItemClick).toHaveBeenCalledTimes(1)
})
})
})
})

View File

@ -530,4 +530,4 @@ describe('DropDrawer Component', () => {
expect(trigger).toHaveAttribute('aria-haspopup', 'dialog')
})
})
})
})

View File

@ -165,4 +165,4 @@ describe('HoverCard Components', () => {
expect(screen.getByText('Hover content')).toBeDefined()
})
})
})
})

View File

@ -93,4 +93,4 @@ describe('Input', () => {
fireEvent.blur(input)
expect(handleBlur).toHaveBeenCalledTimes(1)
})
})
})

View File

@ -436,4 +436,4 @@ describe('Popover Components', () => {
})
})
})
})
})

View File

@ -84,4 +84,4 @@ describe('Progress', () => {
// For values over 100, the transform should be positive
expect(indicator?.style.transform).toContain('translateX(--50%)')
})
})
})

View File

@ -59,4 +59,4 @@ describe('RadioGroup', () => {
expect(screen.getByLabelText('HTTP')).toBeChecked()
expect(screen.getByLabelText('SSE')).not.toBeChecked()
})
})
})

View File

@ -260,4 +260,4 @@ describe('Sheet Components', () => {
expect(screen.getByText('Main Content')).toBeInTheDocument()
expect(screen.getByText('Close')).toBeInTheDocument()
})
})
})

View File

@ -61,4 +61,4 @@ describe('Skeleton', () => {
expect(skeleton).toHaveClass('w-full')
expect(skeleton).toHaveClass('bg-red-500')
})
})
})

View File

@ -190,4 +190,4 @@ describe('Slider', () => {
expect(thumb).toHaveClass('border-accent', 'bg-main-view', 'rounded-full')
})
})
})
})

View File

@ -90,4 +90,4 @@ describe('Toaster Component', () => {
expect(toaster).toHaveAttribute('data-rich-colors', 'true')
expect(toaster).toHaveAttribute('data-close-button', 'true')
})
})
})

View File

@ -189,4 +189,4 @@ describe('Switch', () => {
const switchElement = document.querySelector('[data-slot="switch"]')
expect(switchElement).toHaveClass('data-[state=unchecked]:bg-main-view-fg/20')
})
})
})

View File

@ -113,4 +113,4 @@ describe('Textarea', () => {
const textarea = screen.getByRole('textbox')
expect(textarea).toHaveAttribute('cols', '50')
})
})
})

View File

@ -111,4 +111,4 @@ describe('Tooltip Components', () => {
expect(screen.getByText('First')).toBeInTheDocument()
expect(screen.getByText('Second')).toBeInTheDocument()
})
})
})

View File

@ -39,4 +39,4 @@ const RadioGroupItem = React.forwardRef<
})
RadioGroupItem.displayName = RadioGroupPrimitive.Item.displayName
export { RadioGroup, RadioGroupItem }
export { RadioGroup, RadioGroupItem }

View File

@ -33,4 +33,4 @@ describe('windows constants', () => {
expect(value.length).toBeGreaterThan(0)
})
})
})
})

View File

@ -3,4 +3,4 @@
*/
export const TEMPORARY_CHAT_ID = 'temporary-chat'
export const TEMPORARY_CHAT_QUERY_ID = 'temporary-chat'
export const TEMPORARY_CHAT_QUERY_ID = 'temporary-chat'

View File

@ -58,4 +58,4 @@ export const McpExtensionToolLoader = ({
onToolToggle={handleToolToggle}
/>
)
}
}

View File

@ -121,4 +121,4 @@ describe('AvatarEmoji Component', () => {
const img = screen.getByRole('img')
expect(img).toHaveAttribute('alt', 'Custom avatar')
})
})
})

View File

@ -36,4 +36,4 @@ describe('ChatInput Simple Tests', () => {
const sendButton = screen.getByTestId('send-message-button')
expect(sendButton).toHaveTextContent('Send')
})
})
})

View File

@ -392,4 +392,4 @@ describe('ChatInput', () => {
expect(() => renderWithRouter()).not.toThrow()
})
})
})
})

View File

@ -274,4 +274,4 @@ describe('DropdownModelProvider - Display Name Integration', () => {
// Both models are still visible in the dropdown, so we can't test for absence
expect(screen.getAllByText('Short Name')).toHaveLength(2) // trigger + dropdown
})
})
})

View File

@ -181,4 +181,4 @@ describe('DialogEditModel - Basic Component Tests', () => {
expect(mockUpdateProvider).toBeDefined()
expect(mockSetProviders).toBeDefined()
})
})
})

View File

@ -266,4 +266,4 @@ describe('LeftPanel', () => {
const toggleButton = document.querySelector('svg.tabler-icon-layout-sidebar')
expect(toggleButton).not.toBeNull()
})
})
})

View File

@ -143,4 +143,4 @@ describe('SetupScreen', () => {
const setupContent = screen.getByText('setup:welcome').closest('div')
expect(setupContent).toBeInTheDocument()
})
})
})

View File

@ -75,4 +75,4 @@ export function DeleteAssistantDialog({
</DialogContent>
</Dialog>
)
}
}

View File

@ -77,4 +77,4 @@ export function FactoryResetDialog({
</DialogContent>
</Dialog>
)
}
}

View File

@ -142,4 +142,4 @@ describe('useAnalytic', () => {
expect(result.current.productAnalytic).toBe(false)
})
})
})
})

View File

@ -201,4 +201,4 @@ describe('useAppState', () => {
expect(result.current.tokenSpeed).toBeUndefined()
})
})
})

View File

@ -406,4 +406,4 @@ describe('useAppUpdater', () => {
expect(mockEvents.emit).toHaveBeenCalledWith('onAppUpdateDownloadSuccess', {})
})
})
})
})

View File

@ -285,4 +285,4 @@ describe('useAppearance', () => {
expect(result.current.chatWidth).toBe('compact')
})
})
})
})

View File

@ -225,4 +225,4 @@ describe('useChat', () => {
expect(result.current).toBeDefined()
})
})
})

View File

@ -171,4 +171,4 @@ describe('useClickOutside', () => {
addEventListenerSpy.mockRestore()
removeEventListenerSpy.mockRestore()
})
})
})

View File

@ -147,4 +147,4 @@ describe('useCodeblock', () => {
expect(result.current.codeBlockStyle).toBe('preserved-theme')
expect(result.current.showLineNumbers).toBe(false)
})
})
})

View File

@ -259,4 +259,4 @@ describe('useDownloadStore', () => {
expect(result.current.localDownloadingModels.has('model-1')).toBe(true)
})
})
})
})

View File

@ -468,4 +468,4 @@ describe('useKeyboardShortcut', () => {
expect(mockCallback).toHaveBeenCalledTimes(1)
})
})
})

View File

@ -143,4 +143,4 @@ describe('useLeftPanel', () => {
expect(result.current.open).toBe(true)
})
})
})
})

View File

@ -154,4 +154,4 @@ describe('useLlamacppDevices', () => {
expect(result.current.devices[1].activated).toBe(true)
})
})
})

View File

@ -663,4 +663,4 @@ describe('useLocalApiServer', () => {
expect(result.current.serverPort).toBe(65535)
})
})
})
})

View File

@ -474,4 +474,4 @@ describe('useMCPServers', () => {
expect(result.current.deletedServerKeys).toContain('lifecycle-server')
})
})
})
})

View File

@ -316,4 +316,4 @@ describe('useSmallScreen', () => {
expect(mockMatchMedia).toHaveBeenCalledWith('(max-width: 768px)')
})
})
})

View File

@ -392,4 +392,4 @@ describe('useMessages', () => {
expect(result2.current.getMessages('thread1')).toEqual([testMessage])
})
})
})
})

View File

@ -311,4 +311,4 @@ describe('useContextSizeApproval', () => {
expect(secondResult).toBe('context_shift')
})
})
})
})

View File

@ -179,4 +179,4 @@ describe('useModelProvider - displayName functionality', () => {
expect(provider?.models[0].displayName).toBe('Custom Model Name')
expect(provider?.models[0].id).toBe('test-model.gguf')
})
})
})

View File

@ -98,4 +98,4 @@ describe('usePrompt', () => {
expect(result.current.prompt).toBe(longText)
expect(result.current.prompt.length).toBe(10000)
})
})
})

View File

@ -99,4 +99,4 @@ describe('useProviderModels', () => {
expect(fetchModelsSpy).not.toHaveBeenCalled()
})
})
})

View File

@ -320,4 +320,4 @@ describe('useProxyConfig', () => {
expect(typeof result.current.setNoProxy).toBe('function')
})
})
})
})

View File

@ -359,4 +359,4 @@ describe('useReleaseNotes', () => {
expect(result.current.error).toBe(null)
})
})
})
})

View File

@ -186,4 +186,4 @@ describe('useTheme', () => {
expect(result.current.isDark).toBe(false)
})
})
})
})

View File

@ -440,4 +440,4 @@ describe('useToolApproval', () => {
expect(result.current.isToolApproved('thread-1', 'tool-a')).toBe(true)
})
})
})
})

View File

@ -417,4 +417,4 @@ describe('useToolAvailable', () => {
expect(result.current.isToolDisabled('thread-1', 'tool-c')).toBe(true)
})
})
})
})

View File

@ -179,4 +179,4 @@ describe('useTools', () => {
expect(mockGetTools).toHaveBeenCalledTimes(1)
expect(mockListen).toHaveBeenCalledTimes(1)
})
})
})

View File

@ -214,4 +214,4 @@ describe('useVulkan', () => {
expect(result.current.vulkanEnabled).toBe(false)
})
})
})
})

View File

@ -50,4 +50,4 @@ export const useFavoriteModel = create<FavoriteModelState>()(
storage: createJSONStorage(() => localStorage),
}
)
)
)

View File

@ -52,4 +52,4 @@ export const initializeServiceHubStore = (serviceHub: ServiceHub) => {
*/
export const isServiceHubInitialized = (): boolean => {
return useServiceStore.getState().serviceHub !== null
}
}

View File

@ -4,4 +4,4 @@ export { default } from '@/i18n/setup'
// Re-export compatibility functions for existing code
export { useTranslation } from '@/i18n/react-i18next-compat'
export { useAppTranslation } from '@/i18n/hooks'
export { TranslationProvider } from '@/i18n/TranslationContext'
export { TranslationProvider } from '@/i18n/TranslationContext'

View File

@ -43,4 +43,4 @@ export const TranslationProvider: React.FC<{ children: ReactNode }> = ({ childre
)
}
export default TranslationProvider
export default TranslationProvider

View File

@ -8,4 +8,4 @@ export const TranslationContext = createContext<{
}>({
t: (key: string) => key,
i18n: i18next,
})
})

View File

@ -2,4 +2,4 @@ import { useContext } from "react"
import { TranslationContext } from "./context"
// Custom hook for easy translations
export const useAppTranslation = () => useContext(TranslationContext)
export const useAppTranslation = () => useContext(TranslationContext)

View File

@ -5,4 +5,4 @@ export { default as i18n, loadTranslations } from './setup'
export { TranslationProvider } from './TranslationContext'
// Export types
export type { I18nInstance, TranslationResources } from './setup'
export type { I18nInstance, TranslationResources } from './setup'

View File

@ -31,4 +31,4 @@ export { default as i18n } from './setup'
// Re-export other utilities
export { TranslationProvider } from './TranslationContext'
export { useAppTranslation } from './hooks'
export { useAppTranslation } from './hooks'

View File

@ -153,4 +153,4 @@ export const loadTranslations = (): void => {
// Initialize and export the i18n instance
const i18n = initI18n()
export default i18n
export default i18n

View File

@ -187,4 +187,4 @@ describe('completion.ts', () => {
expect(result.length).toBe(0)
})
})
})
})

View File

@ -138,4 +138,4 @@ describe('extension.ts', () => {
expect(invoke).toHaveBeenCalledWith('test_command', { param: 'value' })
})
})
})
})

View File

@ -14,4 +14,4 @@ export function trackEvent(
}
window.gtag('event', eventName, parameters)
}
}

View File

@ -67,4 +67,4 @@ export const PlatformFeatures: Record<PlatformFeature, boolean> = {
// Temporary chat mode - enabled for web only
[PlatformFeature.TEMPORARY_CHAT]: !isPlatformTauri(),
}
}

View File

@ -10,4 +10,4 @@ export * from './types'
export * from './utils'
// Re-export components
export * from './PlatformGuard'
export * from './PlatformGuard'

View File

@ -38,4 +38,4 @@ export const PlatformShortcuts: ShortcutMap = {
key: '-',
usePlatformMetaKey: true,
},
}
}

View File

@ -6,4 +6,4 @@
*/
export * from './types'
export * from './const'
export * from './const'

View File

@ -20,4 +20,4 @@ export interface ShortcutSpec {
metaKey?: boolean
}
export type ShortcutMap = Record<ShortcutAction, ShortcutSpec>
export type ShortcutMap = Record<ShortcutAction, ShortcutSpec>

View File

@ -23,4 +23,4 @@ export function ServiceHubProvider({ children }: ServiceHubProviderProps) {
}, [])
return <>{isReady && children}</>
}
}

View File

@ -101,4 +101,4 @@ describe('DataProvider', () => {
expect(screen.getByText('Test Child 1')).toBeInTheDocument()
expect(screen.getByText('Test Child 2')).toBeInTheDocument()
})
})
})

View File

@ -79,4 +79,4 @@ describe('ThemeProvider', () => {
// Should be called on mount
expect(useTheme).toHaveBeenCalled()
})
})
})

View File

@ -304,4 +304,4 @@ describe('HuggingFace Repository Conversion', () => {
expect(result.quants[0].file_size).toBe('1024.0 GB')
})
})
})
})

View File

@ -235,4 +235,4 @@ describe('Appearance Settings Route', () => {
const settingsMenu = screen.getByTestId('settings-menu')
expect(settingsMenu).toBeInTheDocument()
})
})
})

Some files were not shown because too many files have changed in this diff Show More