refactor: default to websockets
This commit is contained in:
@@ -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 [],
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user