AiSettingsStore.h header

#include <ew/app/AiSettingsStore.h>

Namespace ew::app

Functions

AiSettings ew::app::loadAiSettings(const Settings &settings)

Loads the user's AiSettings from a Settings store. Reads the endpoint, API key, model, and temperature stored under the "ai/" key prefix; any key that is absent keeps its AiSettings default (so an unconfigured store yields an unconfigured AiSettings). Pure with respect to the store, so it is unit-testable with an in-memory Settings.

void ew::app::saveAiSettings(Settings &settings, const AiSettings &ai)

Saves ai into settings under the "ai/" key prefix, overwriting any existing values. The API key is written verbatim; callers persist it per-user (never in a shared project) because it is a secret.