import { useSettings } from '@/hooks/useSettings' import { useVersionCheck } from '@/hooks/useVersionCheck' import { Loader2 } from 'lucide-react' import { Label } from '@/components/ui/label' import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from '@/components/ui/select' import { Switch } from '@/components/ui/switch' export function GeneralSettings() { const { preferences, isLoading, updateSettings, isUpdating } = useSettings() const { data: versionInfo, isLoading: isVersionLoading } = useVersionCheck() if (isLoading) { return (
) } return (

General Preferences

OpenCode Manager {isVersionLoading ? ( ) : versionInfo?.currentVersion ? ( <> {versionInfo.currentVersion} {versionInfo.updateAvailable && versionInfo.latestVersion && ( v{versionInfo.latestVersion} available )} ) : ( unknown )}

Choose your preferred color scheme

Show only your messages and the assistant's replies. Hides tool calls, reasoning, diffs, and agent details.

updateSettings({ simpleChatMode: checked })} />

Automatically scroll to bottom when new messages arrive

updateSettings({ autoScroll: checked })} />
{!preferences?.simpleChatMode && ( <>

Display model reasoning and thought process

updateSettings({ showReasoning: checked })} />

Automatically expand tool call details by default

updateSettings({ expandToolCalls: checked })} />

Show file diffs expanded by default for edit operations

updateSettings({ expandDiffs: checked })} />
)} {isUpdating && (
Saving...
)}
) }