AiSettingsController class
Owns the user's AI preferences, persisting each change to SettingsStore and exposing the Hub's advertised default for the settings panel.
The agent can run with the Hub's default provider/model (the API key stays on
the Hub and is injected when proxying) or with a custom provider/model and the
user's own key. DOM-free so it stays unit-testable; changes take effect the
next time a session registers the :ai command.
Constructors
- AiSettingsController(SettingsStore _settings, OmnyShellService _service)
-
Creates a controller over
settingsandservice.
Properties
- apiKey ↔ String
-
The user's own API key (empty uses the Hub's key).
getter/setter pair
- hashCode → int
-
The hash code for this object.
no setterinherited
- language ↔ String
-
The reply-language preference (empty for the model default).
getter/setter pair
- mode ↔ String
-
The default agent mode token (
standard/plan/auto).getter/setter pair - model ↔ String
-
The user's custom model id (empty falls back to the provider default).
getter/setter pair
- provider ↔ String
-
The user's custom provider token (
anthropic/openai/gemini).getter/setter pair - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- useHubDefault ↔ bool
-
Whether to use the Hub's default provider/model (key injected Hub-side).
getter/setter pair
Methods
-
hubDefault(
) → Future< HubAiConfig?> -
Fetches the Hub's advertised default AI config (provider/model, no key),
or
nullwhen unavailable or the call fails (best-effort, for display). -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited