feat: add web search availability provider and enhance feature toggles in chat and tools modal

This commit is contained in:
cogwheel0
2025-08-24 20:55:51 +05:30
parent cc46799e20
commit 4cd00e9193
5 changed files with 77 additions and 47 deletions

View File

@@ -657,8 +657,10 @@ Future<void> _sendMessageInternal(
}
}
// Check feature toggles for API
final webSearchEnabled = ref.read(webSearchEnabledProvider);
// Check feature toggles for API (gated by server availability)
final webSearchEnabled =
ref.read(webSearchEnabledProvider) &&
ref.read(webSearchAvailableProvider);
final imageGenerationEnabled = ref.read(imageGenerationEnabledProvider);
// Prepare tools list - pass tool IDs directly