import React from 'react' import { getThemePreference, setTheme } from '../../lib/theme' import type { ThemePreference } from '../../lib/theme' import { getDensityPreference, setDensity } from '../../lib/density' import type { DensityPreference } from '../../lib/density' import { getToolCallsPreference, setToolCalls } from '../../lib/toolCalls' import type { ToolCallsPreference } from '../../lib/toolCalls' export function DisplaySection(): React.JSX.Element { const [theme, setThemeState] = React.useState(getThemePreference) const [density, setDensityState] = React.useState(getDensityPreference) const [toolCalls, setToolCallsState] = React.useState( getToolCallsPreference, ) function handleThemeChange(value: ThemePreference) { setThemeState(value) setTheme(value === 'system' ? null : value) } function handleDensityChange(value: DensityPreference | null) { const next = value ?? 'cozy' setDensityState(next) setDensity(value) } function handleToolCallsChange(value: ToolCallsPreference | null) { const next = value ?? 'yes' setToolCallsState(next) setToolCalls(value) } return (
Theme
Follows your OS appearance setting when System is selected.
Row density
Controls vertical spacing in session lists and project tables.
Tool calls
Tool-call turns are hidden with CSS; they remain in the DOM for anchor-target and selection stability.
) }