Loading component…
Loading component…
This component has not been implemented locally yet.
To reuse this local React demo, copy all files from the Code tab into the same folder, then import Settings/Preferences from ./settings-preferences.
import { SettingsPreferencesScreen } from "@/components/ui/settings-preferences";
export default function Page() {
return (
<SettingsPreferencesScreen
preferences={preferences}
providers={workspaceModels}
onSave={(preferences) => savePreferences(preferences)}
onNavigate={(label) => router.push(routes[label])}
/>
);
}| Name | Type | Default | Description |
|---|---|---|---|
| preferences | PreferenceValues | Default chat and image model, language, theme, app actions, chat tools, custom instructions (on, about, style) and memories – the sample person when left out | |
| providers | Provider[] | The workspace's providers and models, as in Settings / Models – only models that are on can be picked | |
| onSave | (preferences: PreferenceValues) => void | Called with all settings whenever something is saved – text fields on blur, everything else at once | |
| onNavigate | (label: string) => void | Called with the label of a sidebar item | |
| workspace | string | Workspace name in the sidebar | |
| user | { name: string; avatar?: string } | Account at the bottom of the sidebar | |
| loading | boolean | While the settings load: the models, language, appearance, switches, chat tools, instructions and memories as gray shapes in the shape of the real ones | |
| empty | boolean | Nothing saved yet: no custom instructions, and “No memories yet” with Start a chat – or Turn on memory while it's off – in the memories' place | |
| className | string | Extra class on the root |
Fills its container – give it the full viewport height in your app
Below 600px controls move under their labels and the chat tools stack
Dark mode built in: switches when an ancestor (usually <html>) has the class dark or data-theme="dark"; colors are CSS variables on .ui-as