Disable AI Scribe if on mobile
This commit is contained in:
@@ -23,6 +23,8 @@ mixin AIScribeInComposerMixin {
|
|||||||
AccountId? get accountId;
|
AccountId? get accountId;
|
||||||
|
|
||||||
bool get isAIScribeAvailable {
|
bool get isAIScribeAvailable {
|
||||||
|
if (!PlatformInfo.isWeb) return false;
|
||||||
|
|
||||||
final currentSession = session;
|
final currentSession = session;
|
||||||
final currentAccountId = accountId;
|
final currentAccountId = accountId;
|
||||||
|
|
||||||
|
|||||||
+4
@@ -827,11 +827,15 @@ class MailboxDashBoardController extends ReloadableController
|
|||||||
|
|
||||||
void injectAIScribeBindings(Session? session, AccountId? accountId) {
|
void injectAIScribeBindings(Session? session, AccountId? accountId) {
|
||||||
try {
|
try {
|
||||||
|
if (!PlatformInfo.isWeb) return;
|
||||||
|
|
||||||
if (session == null || accountId == null) return;
|
if (session == null || accountId == null) return;
|
||||||
|
|
||||||
final aiCapability = session.getAICapability(accountId);
|
final aiCapability = session.getAICapability(accountId);
|
||||||
final scribeEndpoint = aiCapability?.scribeEndpoint;
|
final scribeEndpoint = aiCapability?.scribeEndpoint;
|
||||||
|
|
||||||
|
if (scribeEndpoint == null || scribeEndpoint.isEmpty) return;
|
||||||
|
|
||||||
// Delete existing AI bindings if they exist
|
// Delete existing AI bindings if they exist
|
||||||
if (Get.isRegistered<AIDataSourceImpl>()) {
|
if (Get.isRegistered<AIDataSourceImpl>()) {
|
||||||
Get.delete<AIDataSourceImpl>(force: true);
|
Get.delete<AIDataSourceImpl>(force: true);
|
||||||
|
|||||||
Reference in New Issue
Block a user