setting to disable early access tools

This commit is contained in:
Fabian Freund
2024-06-05 17:19:43 +02:00
parent 692a962acf
commit bb23870bf8
10 changed files with 149 additions and 63 deletions
@@ -34,6 +34,12 @@ class KagiScreen extends HookConsumerWidget {
final displayedSheet = ref.watch(bottomSheetProvider);
final displayedOverlayDialog = ref.watch(overlayDialogProvider);
final showEarlyAccessFeatures = ref.watch(
settingsRepositoryProvider.select(
(value) => value.valueOrNull?.showEarlyAccessFeatures ?? true,
),
);
final lastBackButtonPress = useRef<DateTime?>(null);
final webViewController = useRef<InAppWebViewController?>(null);
@@ -188,15 +194,6 @@ class KagiScreen extends HookConsumerWidget {
leadingIcon: const Icon(MdiIcons.searchWeb),
child: const Text('Search'),
),
MenuItemButton(
onPressed: () {
ref.read(createTabStreamProvider.notifier).createTab(
CreateTab(preferredTool: KagiTool.assistant),
);
},
leadingIcon: const Icon(MdiIcons.brain),
child: const Text('Assistant'),
),
MenuItemButton(
onPressed: () {
ref.read(createTabStreamProvider.notifier).createTab(
@@ -206,15 +203,26 @@ class KagiScreen extends HookConsumerWidget {
leadingIcon: const Icon(MdiIcons.text),
child: const Text('Summarizer'),
),
if (showEarlyAccessFeatures)
MenuItemButton(
onPressed: () {
ref.read(createTabStreamProvider.notifier).createTab(
CreateTab(preferredTool: KagiTool.assistant),
);
},
leadingIcon: const Icon(MdiIcons.brain),
child: const Text('Assistant'),
),
const Divider(),
MenuItemButton(
onPressed: () async {
await context.push(ChatArchiveListRoute().location);
},
leadingIcon: const Icon(MdiIcons.archive),
child: const Text('Chat Archive'),
),
const Divider(),
if (showEarlyAccessFeatures)
MenuItemButton(
onPressed: () async {
await context.push(ChatArchiveListRoute().location);
},
leadingIcon: const Icon(MdiIcons.archive),
child: const Text('Chat Archive'),
),
if (showEarlyAccessFeatures) const Divider(),
MenuItemButton(
onPressed: () async {
await context.push(AboutRoute().location);