Protected ReadonlyaiProtectedchangedProtected ReadonlycommandProtected ReadonlycontextProtected ReadonlymarkdownProtected ReadonlyschemaFires whenever an AI preference changes (or the workspace-trust state transitions), so owning widgets can re-render their rows.
All displayable ai-features.* preference ids — every AI setting that should appear somewhere in the view.
Infers a sensible AiSettingsControl for a preference from its schema type
(a select when it declares an enum, a masked text input for secrets/API keys). An array of strings
gets the inline list editor; more complex values — an object or an array of objects/other types —
cannot be edited meaningfully inline, so they resolve to a json control that defers to the
settings.json file. Falls back to a text input for unknown types.
Reads the label and (already-localized) markdown description a preference declares in its registered
schema, so settings rows do not have to re-author those strings. Returns undefined fields when the
preference is unknown.
Most AI preferences share the group title ("AI Features") to be grouped together in the Settings UI,
which also ignores it and derives each setting's name from its id. We mirror that: a genuinely specific
title is used as-is, but the shared group title falls back to the humanized preference id (e.g.
ai-features.google.apiKey → "Api Key") so rows show their own name rather than "AI Features".
Opens the underlying settings.json file focused on a preference, mirroring the
Settings view's "Edit in settings.json" link. Used for json controls, i.e. complex
object/array values that cannot be edited meaningfully through an inline control.
Builds SelectOptions from a preference's enum, using its enumItemLabels
(falling back to enumDescriptions, then the raw value) for the display label.
Returns an empty array when the preference declares no enum.
ProtectedformatHuman-readable name for a preference derived from its id. The ai-features root and the area segment
(chat, google, …) are dropped — the category/section already conveys them — and the remaining
segments are humanized (camelCase split, first letter upper-cased) and joined with ": ", e.g.
ai-features.chat.tokenUsageIndicator.enabled → "Token Usage Indicator: Enabled",
ai-features.google.apiKey → "Api Key".
ProtectedhumanizeOptionalresourceUri: stringWhether a preference is meant to be surfaced as an editable settings row in the AI Configuration
view. Excludes only value-less placeholders (type: 'null'), such as the redirect entries that
only link to this view. The Settings-UI hidden flag is intentionally ignored: the AI
Configuration view is the dedicated editor for AI preferences, which are hidden from the Settings
UI once the cutover (#316) is in effect but must still be editable here.
Whether a preference declares itself part of a language-model provider block, i.e. carries the
aiModelProvider MODEL_PROVIDER_TYPE_DETAIL typeDetail (in any form). The Models page uses
this positive marker to discover provider blocks, so feature areas that never claim to be a provider
are never mistaken for one.
ProtectedisWhether a preference holds a secret (an API key, token or password) that should be masked. There is no
schema flag for this, so it is inferred from the id's leaf segment, matching how every AI provider names
its key preference (e.g. ai-features.anthropic.apiKey).
ProtectedisWhether an array preference holds plain string items, so it can be edited with the inline list editor
(matching the Settings UI, which only offers its array input for string[]); everything else defers to
a json control.
ProtectedisThe human-readable language-model provider name a preference declares in its schema
typeDetails (as { [MODEL_PROVIDER_TYPE_DETAIL]: { label } }, see ModelProviderTypeDetail),
or undefined when none is declared. The Models page uses this to label a provider block without
hard-coding provider names.
ProtectednormalizeStrips the common leading indentation from a markdown description before rendering.
Preference markdownDescriptions are commonly authored as indented, multi-line JavaScript
string literals, which leaves every continuation line prefixed with the source indentation.
That accidental indentation makes markdown-it collapse bullet lists and paragraphs into a
single dense block, so the description reads as an unstructured run-on. Removing the shared
indentation (ignoring the first line, which starts right after the opening quote) restores
the intended paragraph and list structure while preserving relative indentation, so nested
lists stay nested.
ProtectedopenOpens the gear menu for a row backed by non-preference data (e.g. a per-agent setting): the same "Reset Setting" affordance as a preference row, but reset runs the given callback. Copy entries are hidden (no preference id). Lets these rows reuse the shared gear menu instead of a bespoke button.
Opens the gear context menu (Reset Setting / Copy Setting ID / Copy Setting as JSON) anchored below the
gear. Uses this view's own AI_CONFIGURATION_SETTING_CONTEXT_MENU commands, backed by
AiConfigurationService and acting in the row's own scope — rather than the Settings UI's
RESET_PREFERENCE command, which is bound to the Preferences editor widget and misbehaves when invoked
from here (it resets in the Preferences widget's scope and disturbs focus in this view).
OptionalresourceUri: stringAll registered preference ids, e.g. to discover a provider's ai-features.<provider>.* block.
Renders a markdown description into a detached element for use in a React ref.
OptionalresourceUri: stringOptionalresourceUri: stringThe schema tags declared for a preference (e.g. ['experimental']), shown as badges next to the title.
Protectedto
Thin, injectable wrapper around AiConfigurationService and MarkdownRenderer used by the presentational AiSettingsRow component, which must not itself depend on the DI container. Owning renderers/widgets inject this service and pass it down to the row.
All preference reads and writes are routed through AiConfigurationService — the AI configuration seam — rather than the raw
PreferenceService, so reads are workspace-trust-aware and the whole view stays insulated from how AI preferences are stored (see AiConfigurationService). Schema introspection still uses PreferenceSchemaService directly, as it inspects the registered schema shape rather than stored values.