From 54825fb8a615101ad00b32fab508b32da0d9d402 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=B3=93=E9=93=AE?= Date: Fri, 15 Aug 2025 16:01:46 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=8F=AF=E9=80=89=E7=9A=84base64?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uixt/driver_ext_ai.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/uixt/driver_ext_ai.go b/uixt/driver_ext_ai.go index c312f149..630eff95 100644 --- a/uixt/driver_ext_ai.go +++ b/uixt/driver_ext_ai.go @@ -252,6 +252,8 @@ func (dExt *XTDriver) AIAssert(assertion string, opts ...option.ActionOption) (* screenOptions := []option.ActionOption{option.WithScreenShotFileName("ai_assert"), option.WithScreenShotBase64(true)} if options.ScreenShotWithUpload { screenOptions = append(screenOptions, option.WithScreenShotUpload(true)) + } else { + screenOptions = append(screenOptions, option.WithScreenShotBase64(true)) } // Step 1: Take screenshot and convert to base64 @@ -306,9 +308,11 @@ func (dExt *XTDriver) PlanNextAction(ctx context.Context, prompt string, opts .. // Parse action options to get ResetHistory setting options := option.NewActionOptions(opts...) resetHistory := options.ResetHistory - screenOptions := []option.ActionOption{option.WithScreenShotFileName("ai_planning"), option.WithScreenShotBase64(true)} + screenOptions := []option.ActionOption{option.WithScreenShotFileName("ai_planning")} if options.ScreenShotWithUpload { screenOptions = append(screenOptions, option.WithScreenShotUpload(true)) + } else { + screenOptions = append(screenOptions, option.WithScreenShotBase64(true)) } // Step 1: Take screenshot and convert to base64