Skip to main content

Module settings

Module settings 

Source
Expand description

Wisp settings management and theme loading.

Wisp has two tiers of configuration:

  1. Wisp settings — persisted in ~/.wisp/settings.json (or $WISP_HOME/settings.json). Currently controls theme selection via WispSettings.
  2. Agent settings — model, reasoning effort, MCP servers, etc. These are advertised by the agent over ACP and edited through the in-app SettingsOverlay.

§Theme resolution

  1. load_or_create_settings reads (or creates) the settings file.
  2. load_theme checks ThemeSettings::file for a .tmTheme filename.
  3. resolve_theme_file_path validates the filename (must be a bare basename, no path traversal) and resolves it to ~/.wisp/themes/<name>.
  4. tui::Theme::load_from_path parses the file, falling back to the default theme on error.

Modules§

menu
overlay
types

Structs§

ThemeSettings
WispSettings
Persisted UI preferences for Wisp.

Constants§

DEFAULT_CONTENT_PADDING

Functions§

list_theme_files
load_or_create_settings
load_theme
resolve_content_padding
resolve_theme_file_path
save_settings
themes_dir_path
wisp_home