From 19bb712743b2228073a6a46313d8e7b42b137c11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BD=99=E6=B3=93=E9=93=AE?= Date: Mon, 28 Jul 2025 21:20:50 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=9B=9E=E6=BB=9A=E5=A4=9A=E4=BD=99?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uixt/ai/asserter.go | 7 +++---- uixt/ai/wings_service.go | 7 +------ uixt/cache.go | 1 + 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/uixt/ai/asserter.go b/uixt/ai/asserter.go index 87300ad9..f34e5513 100644 --- a/uixt/ai/asserter.go +++ b/uixt/ai/asserter.go @@ -24,10 +24,9 @@ type IAsserter interface { // AssertOptions represents the input options for assertion type AssertOptions struct { - Assertion string `json:"assertion"` // The assertion text to verify - Screenshot string `json:"screenshot"` // Base64 encoded screenshot - Size types.Size `json:"size"` // Screen dimensions - ResetHistory bool `json:"reset_history"` // whether to reset conversation history before assertion + Assertion string `json:"assertion"` // The assertion text to verify + Screenshot string `json:"screenshot"` // Base64 encoded screenshot + Size types.Size `json:"size"` // Screen dimensions } // AssertionResult represents the response from an AI assertion diff --git a/uixt/ai/wings_service.go b/uixt/ai/wings_service.go index 1dda31b8..4faf9495 100644 --- a/uixt/ai/wings_service.go +++ b/uixt/ai/wings_service.go @@ -164,11 +164,6 @@ func (w *WingsService) Assert(ctx context.Context, opts *AssertOptions) (*Assert return nil, errors.Wrap(err, "validate assertion parameters failed") } - // Reset history if requested - if opts.ResetHistory { - w.resetHistory() - } - // Clean screenshot data URL prefix cleanScreenshot := w.cleanScreenshotDataURL(opts.Screenshot) @@ -177,7 +172,7 @@ func (w *WingsService) Assert(ctx context.Context, opts *AssertOptions) (*Assert // Prepare Wings API request for assertion apiRequest := WingsActionRequest{ - Historys: w.history, + Historys: []History{}, DeviceInfo: deviceInfo, StepText: opts.Assertion, BizId: w.bizId, diff --git a/uixt/cache.go b/uixt/cache.go index ca0233b4..7ca0c6f0 100644 --- a/uixt/cache.go +++ b/uixt/cache.go @@ -323,6 +323,7 @@ func createXTDriverWithConfig(config DriverCacheConfig) (*XTDriver, error) { // Default AI options aiOpts = []option.AIServiceOption{ option.WithCVService(option.CVServiceTypeVEDEM), + option.WithLLMConfig(option.RecommendedConfigurations()["ui_focused"]), } }