TF-4141 Add the AI needs-action option into the user settings.

This commit is contained in:
dab246
2025-12-23 01:13:17 +07:00
committed by Dat H. Pham
parent cb0471ecb7
commit 1661210e04
19 changed files with 171 additions and 35 deletions
@@ -68,17 +68,20 @@ class PreferencesView extends GetWidget<PreferencesController> with AppLoaderMix
final availableSettingOptions = [
if (settingOption != null)
...PreferencesOptionType.values.where(
(optionType) => !optionType.isLocal,
(type) =>
!type.isLocal &&
type != PreferencesOptionType.aiNeedsAction,
),
if (localSettingOption.configs.isNotEmpty)
...PreferencesOptionType.values.where(
(optionType) => optionType.isLocal,
).where((optionType) {
if (optionType == PreferencesOptionType.aiScribe) {
return controller.isAIScribeAvailable && !PlatformInfo.isMobile;
}
return true;
}),
(type) =>
type.isLocal &&
(type != PreferencesOptionType.aiScribe ||
controller.isAICapabilitySupported),
),
if (settingOption != null &&
controller.isAICapabilitySupported)
PreferencesOptionType.aiNeedsAction,
];
return Expanded(