merge master

This commit is contained in:
lilong.129
2025-07-21 14:54:50 +08:00
4 changed files with 3 additions and 40 deletions
-16
View File
@@ -346,22 +346,6 @@ func (w *WingsService) extractScreenshotFromMessage(message *schema.Message) (st
// getDeviceInfoFromContext gets device info from context with fallback
func (w *WingsService) getDeviceInfoFromContext(ctx context.Context, screenshot string) WingsDeviceInfo {
// Try to get device info from context
if deviceID, ok := ctx.Value("device_id").(string); ok {
platformType := "android"
if platform, ok := ctx.Value("platform_type").(string); ok {
platformType = platform
}
return WingsDeviceInfo{
DeviceID: deviceID,
NowImage: screenshot,
PreImage: screenshot,
NowLayoutJSON: "",
OperationSystem: platformType,
}
}
// Fallback to default device info
return WingsDeviceInfo{
DeviceID: "default-device",