Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:0xranx OpenContext Settings Component

From Leeroopedia
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

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 />;
}

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment