yera.ui.rendering.views.settings

Render validated configuration as Settings pages and fragments.

The module presents one coherent SettingsState across overview, profile, provider, model, and appearance screens. Plain configuration values are escaped as they enter HTML. Editable controls delegate to the shared schema renderer, while read-only secret values reveal only whether a value is set.

Symbols

def render_appearance_settings — Render browser-local appearance settings.
def render_default_models_settings — Render the active profile's default-model settings page.
def render_model_settings — Render one discovered model and its editable inference defaults.
def render_models_settings — Render the model catalogue available to the active profile.
def render_profile_settings — Render editable settings for the active profile.
def render_provider_connection_form — Render an editor for an existing provider connection.
def render_provider_connection_settings — Render one configured provider connection.
def render_providers_settings — Render the configured provider connections.
def render_settings_home — Render the top-level Settings navigation page.
def render_settings_sidebar — Render Settings navigation in the shell sidebar.

render_appearance_settings

render_appearance_settings(
    state: SettingsState,
) → TrustedHTML

Render browser-local appearance settings.

Parameters

state
type: SettingsState

Loaded settings state used to provide the surrounding Settings page context.

Returns

type: TrustedHTML

Trusted HTML for the appearance settings form.

render_default_models_settings

render_default_models_settings(
    state: SettingsState,
) → TrustedHTML

Render the active profile's default-model settings page.

Parameters

state
type: SettingsState

Loaded settings state containing the active profile and model catalogue.

Returns

type: TrustedHTML

Trusted HTML for editing the active profile's default model of each supported type.

render_model_settings

render_model_settings(
    state: SettingsState,
    model_type: str,
    model_id: str,
) → TrustedHTML

Render one discovered model and its editable inference defaults.

Parameters

state
type: SettingsState

Loaded settings state containing the model catalogue.

model_type
type: str

Catalogue type containing the requested model.

model_id
type: str

Fully qualified identifier of the model to render.

Returns

type: TrustedHTML

Trusted HTML showing the model identity, capabilities, and editable inference defaults.

render_models_settings

render_models_settings(
    state: SettingsState,
) → TrustedHTML

Render the model catalogue available to the active profile.

Parameters

state
type: SettingsState

Current Settings configuration state.

Returns

type: TrustedHTML

Trusted HTML containing the filterable model catalogue.

render_profile_settings

render_profile_settings(
    state: SettingsState,
) → TrustedHTML

Render editable settings for the active profile.

Parameters

state
type: SettingsState

Settings state containing the active profile and its available provider connections.

Returns

type: TrustedHTML

Trusted HTML containing the active-profile settings form.

render_provider_connection_form

render_provider_connection_form(
    state: SettingsState,
    provider_type: str,
    connection_name: str,
    active: bool,
    error: str | None = None,
) → TrustedHTML

Render an editor for an existing provider connection.

Parameters

state
type: SettingsState

Current Settings configuration state.

provider_type
type: str

Provider key containing the connection.

connection_name
type: str

Name of the connection to edit.

active
type: bool

Whether the active profile selects this connection.

error
type: str | None = None

Optional validation or configuration conflict message.

Returns

type: TrustedHTML

Trusted HTML containing the provider connection form.

render_provider_connection_settings

render_provider_connection_settings(
    state: SettingsState,
    provider_type: str,
    connection_name: str,
) → TrustedHTML

Render one configured provider connection.

Parameters

state
type: SettingsState

Loaded settings state containing provider and profile configuration.

provider_type
type: str

Provider type containing the requested connection.

connection_name
type: str

Name of the connection to render.

Returns

type: TrustedHTML

Trusted HTML for editing the selected provider connection.

render_providers_settings

render_providers_settings(
    state: SettingsState,
    open_provider: str | None = None,
    open_connection: str | None = None,
) → TrustedHTML

Render the configured provider connections.

Parameters

state
type: SettingsState

Loaded settings state containing provider and profile configuration.

open_provider
type: str | None = None

Optional provider type whose connection disclosure should be expanded.

open_connection
type: str | None = None

Optional connection name to expand within open_provider.

Returns

type: TrustedHTML

Trusted HTML listing the existing provider connections and their editable forms.

render_settings_home

render_settings_home(
    state: SettingsState,
) → TrustedHTML

Render the top-level Settings navigation page.

Parameters

state
type: SettingsState

Loaded settings state used to identify the active profile.

Returns

type: TrustedHTML

Trusted HTML for the Settings overview.

render_settings_sidebar

render_settings_sidebar(
    state: SettingsState,
    current: str | None,
) → TrustedHTML

Render Settings navigation in the shell sidebar.

Parameters

state
type: SettingsState

Loaded settings state used to show the active profile and configuration path.

current
type: str | None

Key of the currently selected Settings destination, or None when no destination is active.

Returns

type: TrustedHTML

Trusted HTML for the Settings sidebar.