From 9f3f02a27eedc1889854f09f846fff81cbfff506 Mon Sep 17 00:00:00 2001 From: cogwheel0 <172976095+cogwheel0@users.noreply.github.com> Date: Sun, 7 Sep 2025 14:51:55 +0530 Subject: [PATCH] refactor: default to websockets --- lib/core/services/settings_service.dart | 4 ++-- lib/features/chat/widgets/modern_chat_input.dart | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/core/services/settings_service.dart b/lib/core/services/settings_service.dart index df493d1..db9536c 100644 --- a/lib/core/services/settings_service.dart +++ b/lib/core/services/settings_service.dart @@ -199,7 +199,7 @@ class SettingsService { /// Transport mode: 'auto' (polling+websocket) or 'ws' (websocket only) static Future getSocketTransportMode() async { final prefs = await SharedPreferences.getInstance(); - return prefs.getString(_socketTransportModeKey) ?? 'auto'; + return prefs.getString(_socketTransportModeKey) ?? 'ws'; } static Future setSocketTransportMode(String mode) async { @@ -291,7 +291,7 @@ class AppSettings { this.voiceLocaleId, this.voiceHoldToTalk = false, this.voiceAutoSendFinal = false, - this.socketTransportMode = 'auto', + this.socketTransportMode = 'ws', this.quickPills = const [], }); diff --git a/lib/features/chat/widgets/modern_chat_input.dart b/lib/features/chat/widgets/modern_chat_input.dart index 7f53700..24801ce 100644 --- a/lib/features/chat/widgets/modern_chat_input.dart +++ b/lib/features/chat/widgets/modern_chat_input.dart @@ -682,7 +682,7 @@ class _ModernChatInputState extends ConsumerState if (t.id == id) { tool = t; break; } } if (tool != null) { - final lbl = tool!.name; + final lbl = tool.name; final tp = TextPainter( text: TextSpan(text: lbl, style: textStyle), maxLines: 1,