feat: 支持自主配置LLM Service

This commit is contained in:
余泓铮
2025-07-21 14:21:18 +08:00
parent 984edf3f3c
commit 6f3a8b1cbd
5 changed files with 43 additions and 137 deletions
-16
View File
@@ -347,22 +347,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",