refactor: simplify AI action execution and improve sub-action handling

This commit is contained in:
lilong.129
2025-06-08 19:16:37 +08:00
parent bdf64a08aa
commit b9de3cf7a3
8 changed files with 124 additions and 184 deletions
-12
View File
@@ -112,18 +112,6 @@ func (dExt *XTDriver) Setup() error {
return nil
}
func (dExt *XTDriver) GetData(withReset bool) map[string]interface{} {
session := dExt.GetSession()
data := map[string]interface{}{
"requests": session.History(),
"screen_results": session.screenResults,
}
if withReset {
session.Reset()
}
return data
}
func (dExt *XTDriver) assertOCR(text, assert string) error {
var opts []option.ActionOption
opts = append(opts, option.WithScreenShotFileName(fmt.Sprintf("assert_ocr_%s", text)))