Implementation:0xranx OpenContext Settings Component
| Knowledge Sources | |
|---|---|
| Domains | Settings, React |
| Last Updated | 2026-10-24 00:00 GMT |
Overview
Desktop settings page component for managing AI configuration, embedding API keys, theme preference, and index building status.
Description
The Settings.jsx component in src/ui/src/components/ renders the desktop app settings page. It manages two sections: embedding/search API configuration (API key, base URL, model) and AI chat configuration (provider, API key, base, model, system prompt). Both support edit/read modes with masked API keys. It also provides theme switching (system/light/dark), environment info display, and index building with progress tracking. Integrates with AIContext, ThemeContext, and the api module.
Usage
Import this component as the settings view in the main app router.
Code Reference
Source Location
- Repository: 0xranx_OpenContext
- File: src/ui/src/components/Settings.jsx
- Lines: 1-857
Signature
export function Settings()
Import
import { Settings } from './components/Settings';
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (none) | — | — | Uses context hooks (useAI, useTheme, api) |
Outputs
| Name | Type | Description |
|---|---|---|
| JSX | React.Element | Full settings page |
Usage Examples
Rendering Settings
import { Settings } from './components/Settings';
function App() {
return <Settings />;
}