refactor: default to websockets

This commit is contained in:
cogwheel0
2025-09-07 14:51:55 +05:30
parent 0d175b1e0a
commit 9f3f02a27e
2 changed files with 3 additions and 3 deletions

View File

@@ -199,7 +199,7 @@ class SettingsService {
/// Transport mode: 'auto' (polling+websocket) or 'ws' (websocket only) /// Transport mode: 'auto' (polling+websocket) or 'ws' (websocket only)
static Future<String> getSocketTransportMode() async { static Future<String> getSocketTransportMode() async {
final prefs = await SharedPreferences.getInstance(); final prefs = await SharedPreferences.getInstance();
return prefs.getString(_socketTransportModeKey) ?? 'auto'; return prefs.getString(_socketTransportModeKey) ?? 'ws';
} }
static Future<void> setSocketTransportMode(String mode) async { static Future<void> setSocketTransportMode(String mode) async {
@@ -291,7 +291,7 @@ class AppSettings {
this.voiceLocaleId, this.voiceLocaleId,
this.voiceHoldToTalk = false, this.voiceHoldToTalk = false,
this.voiceAutoSendFinal = false, this.voiceAutoSendFinal = false,
this.socketTransportMode = 'auto', this.socketTransportMode = 'ws',
this.quickPills = const [], this.quickPills = const [],
}); });

View File

@@ -682,7 +682,7 @@ class _ModernChatInputState extends ConsumerState<ModernChatInput>
if (t.id == id) { tool = t; break; } if (t.id == id) { tool = t; break; }
} }
if (tool != null) { if (tool != null) {
final lbl = tool!.name; final lbl = tool.name;
final tp = TextPainter( final tp = TextPainter(
text: TextSpan(text: lbl, style: textStyle), text: TextSpan(text: lbl, style: textStyle),
maxLines: 1, maxLines: 1,