/* eslint-disable react-hooks/exhaustive-deps */ 'use client' import { useContext, useEffect, useState } from 'react' import { Switch, Button, Modal, ModalContent, ModalHeader, ModalTitle, ModalTrigger, Badge, } from '@janhq/uikit' import ShortCut from '@/containers/Shortcut' import { FeatureToggleContext } from '@/context/FeatureToggle' import { useSettings } from '@/hooks/useSettings' const Advanced = () => { const { experimentalFeatureEnabed, setExperimentalFeatureEnabled } = useContext(FeatureToggleContext) const [gpuEnabled, setGpuEnabled] = useState(false) const { readSettings, saveSettings, validateSettings, setShowNotification } = useSettings() useEffect(() => { readSettings().then((settings) => { setGpuEnabled(settings.run_mode === 'gpu') }) }, []) return (
{/* CPU / GPU switching */} {!isMac && (
NVidia GPU

Enable GPU acceleration for NVidia GPUs.

{ if (e === true) { saveSettings({ runMode: 'gpu' }) setGpuEnabled(true) setShowNotification(false) setTimeout(() => { validateSettings() }, 300) } else { saveSettings({ runMode: 'cpu' }) setGpuEnabled(false) } }} />
)} {/* Experimental */}
Experimental Mode

Enable experimental features that may be unstable tested.

{ if (e === true) { setExperimentalFeatureEnabled(true) } else { setExperimentalFeatureEnabled(false) } }} />
{window.electronAPI && (
Open App Directory

Open the directory where your app data, like conversation history and model configurations, is located.

)}
Keyboard Shortcuts

Shortcuts that you might find useful in Jan app.

Keyboard Shortcuts
Combination
Description

Show list your models

Show list navigation pages

Navigate to setting page

Enter

Send a message

Shift + Enter

Insert new line in input box

Arrow Up

Navigate to previous option (within search dialog)

Arrow Down

Navigate to next option (within search dialog)

) } export default Advanced