|
|
@ -755,7 +755,7 @@ class AgentController extends GetxController with WidgetsBindingObserver { |
|
|
final responseId = event.data['responseId'] ?? ''; |
|
|
final responseId = event.data['responseId'] ?? ''; |
|
|
// final result = event.data['result']; |
|
|
// final result = event.data['result']; |
|
|
final metaStr = event.data['meta'] ?? ''; |
|
|
final metaStr = event.data['meta'] ?? ''; |
|
|
// final functionCall = event.data['function_call'] ?? ''; |
|
|
final functionCall = event.data['function_call'] ?? ''; |
|
|
Logger.i(TAG, 'Flutter 结束调用 mcp: $metaStr'); |
|
|
Logger.i(TAG, 'Flutter 结束调用 mcp: $metaStr'); |
|
|
if (metaStr.isNotEmpty) { |
|
|
if (metaStr.isNotEmpty) { |
|
|
Map<String, dynamic> metaResult = {}; |
|
|
Map<String, dynamic> metaResult = {}; |
|
|
@ -790,16 +790,7 @@ class AgentController extends GetxController with WidgetsBindingObserver { |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
final musicKey = metaResult.keys.firstWhere( |
|
|
if (metaResult.containsKey("maps_route_navigation")) { |
|
|
(key) => key.contains("music"), |
|
|
|
|
|
orElse: () => "", |
|
|
|
|
|
); |
|
|
|
|
|
if (musicKey.isNotEmpty) { |
|
|
|
|
|
Future.delayed(Duration(seconds: 1), () { |
|
|
|
|
|
_qqmusicManager.syncCurrentPlayInfo(isOpenPlay: true); |
|
|
|
|
|
}); |
|
|
|
|
|
// } |
|
|
|
|
|
} else if (metaResult.containsKey("maps_route_navigation")) { |
|
|
|
|
|
final maps_route_navigation = |
|
|
final maps_route_navigation = |
|
|
metaResult["maps_route_navigation"]; |
|
|
metaResult["maps_route_navigation"]; |
|
|
if (maps_route_navigation is Map<String, dynamic>) { |
|
|
if (maps_route_navigation is Map<String, dynamic>) { |
|
|
@ -858,6 +849,12 @@ class AgentController extends GetxController with WidgetsBindingObserver { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
if (functionCall.contains("music")) { |
|
|
|
|
|
Future.delayed(Duration(seconds: 1), () { |
|
|
|
|
|
_qqmusicManager.syncCurrentPlayInfo(isOpenPlay: false); |
|
|
|
|
|
}); |
|
|
|
|
|
// } |
|
|
|
|
|
} |
|
|
break; |
|
|
break; |
|
|
default: |
|
|
default: |
|
|
break; |
|
|
break; |
|
|
|