182 Commits

Author SHA1 Message Date
zhouxiao.shaw
3536a21469 Merge remote-tracking branch 'origin/main' into fix/optimize-recorder-element-ai-loading-error 2025-07-04 17:40:32 +08:00
Leyang
289b16b051
Feat/new UI for chrome extension (#878)
* feat(chrome-extension): new ui

* feat(chrome-extension): animation

* fix(visualizer): update error handling in PlaygroundResult and enhance cursor style in EnvConfig

* feat(web-integration): new bridge mode ui

* fix(web-integration): ui

* fix(web-integration): ui 2

* feat(chrome-extension): tip

* feat(chrome-extension): android
2025-07-04 16:36:16 +08:00
zhouxiao.shaw
999c6a5449 fix: lint error 2025-07-04 15:17:28 +08:00
zhouxiao.shaw
92d6254b67 chore: fix error formt 2025-07-04 15:13:36 +08:00
zhouxiao.shaw
bdf61309a1 chore: fix error formt 2025-07-04 15:12:41 +08:00
github-actions[bot]
a4c541c71b release: v0.20.1 2025-06-25 04:55:17 +00:00
Leyang
4f728f80b0
feat(report): each time, append the report individually instead of appending in bulk to avoid excessive memory usage (#854)
* chore: temp

* feat(report): each time, append the report individually instead of appending in bulk to avoid excessive memory usage

* test(core): fixs

* feat(web-integration): enhance report generation with memory management and append options

* fix(report): dump element loading with DOM readiness check

* fix(core): tests

* test(core): skip memory test

* feat(core): add insertScriptBeforeClosingHtml function for efficient script insertion in HTML files

* fix(reporter): update report generation to use mode for merged reports
2025-06-25 11:12:25 +08:00
Leyang
09c6aaaa8b
feat(web-integration): support user expected xpath option for locate methods (#844)
* feat(web-integration): support user expected xpath option for locate methods

* docs(site): xpath option for api

* fix(ci): nx config

* docs(site): update docs
2025-06-19 10:55:14 +08:00
Leyang
5e9eb72924
fix(web-integration): reserve the visible nodes of invisible elements (#840) 2025-06-16 20:38:22 +08:00
Leyang
50203ede36
fix(core): only replace script tag (#829)
* fix(core): only replace script tag

* test(web-integration): add more test
2025-06-16 12:18:36 +08:00
Leyang
32f503f69e
fix(shared): reduce null element node (#827)
* fix(shared): reduce null element node

* feat(web-integration): delete content and locator, support visible-only for domIncluded

* feat(web-integration): remove logScreenshot documentation and update tests to use treeToList for content extraction

* feat(web-integration): add trimContextByViewport function to filter execution tasks by visible elements

* release: v0.18.1

* fix(workflow): update default release version to 'prepatch'

* fix(web-integration): node detect empty

* release: v0.18.2

* fix(evaluation): restore generateExtractData

* fix(web-integration): reporter export

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-06-13 11:25:31 +08:00
Leyang
3510a8c736
feat(web-integration): support unstableLogContent api for agent (#826)
* feat(web-integration): support unstableLogContent api for agent

* fix(web-integration): use sync mehtod

* docs(core): update API doc

* fix(web-integration): playwright

* docs(site): update

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-06-11 16:50:11 +08:00
github-actions[bot]
67590d3273 release: v0.18.0 2025-06-09 03:04:12 +00:00
Leyang
37ae71241e
feat(web-integration): support logScreenshot api for agent (#813)
* feat(web-integration): support logScreenshot api for agent

* docs(core): update api description

* docs(site): fix error

* feat(web-integration): title is also optional

* docs(site): fix

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-06-06 18:58:49 +08:00
yuyutaotao
8a9c40ad99
fix(core): update test cases (#804) 2025-06-04 15:15:53 +08:00
0acb5af6eb
fix(cache): allow cache files to be stored in nested folders (#798)
* fix(cache): allow cache files to be stored in folders to enhance the cache

* refactor(task-cache): reorder import statements for improved readability

* feat(task-cache): add cache ID sanitization and custom path handling

* fix: lint error
2025-06-03 15:33:02 +08:00
github-actions[bot]
14b9200236 release: v0.17.4 2025-05-30 06:31:25 +00:00
Leyang
fd48cbd8c9
docs(core): add query right click and query from html docs (#787)
* docs(site): add right click docs

* docs(site): add ai query opts docs

* fix(web-integration): test

* docs(core): update api doc

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-05-30 14:25:53 +08:00
yuyutaotao
98cebe523c
feat(core,web-integration): support right-click action (#762) (#780)
* feat(core,web-integration): support right-click action (#762)

* feat(core,web-integration): support right click (solve #558)

* feat(web-integration): add aiRightClick action to PlaywrightAiFixture

* fix(core): ci

* fix(core): ci

* feat(web-integration): chrome extension suppport right click

---------

Co-authored-by: xnmeet <144585181+xnmeet@users.noreply.github.com>
Co-authored-by: quanruzhuoxiu <quanruzhuoxiu@gmail.com>
2025-05-30 11:24:10 +08:00
Leyang
ca8edcd328
ai query support query from html dom (#782)
* feat(web-integration): query from all dom element

* test(web-integration): add tests

* fix(cli): tests

* fix(shared): tests

* fix(core): tests

* feat(evaluation): update data

* refactor(web-integration): update var

* Revert "feat(evaluation): update data"

This reverts commit d882bddd38f3ce3a24d14a345c71aaf3bd725aab.

* test(web-integration): fix tests
2025-05-30 11:23:00 +08:00
Leyang
56cfbd9125
fix(web-integration): output opt is invalid in yaml (#777)
* fix(web-integration): output opt is invalid in yaml

* test(cli): fix

* fix(cli): tests
2025-05-29 10:26:18 +08:00
yuyutaotao
5451c27db4
fix(core): fix planning test (#773)
* fix(core): fix planning test

* fix(report): report insight view

* chore(core): rename workflow

* fix(core): report replay scripts

* fix(core): test case

* docs(core): update api doc for ui-tars

* chore(core): fix test case
2025-05-27 19:13:15 +08:00
yuyutaotao
3c04995e26
fix(core): update error log of dump file (#757)
* fix(core): update error log of dump file

* chore(workflow): update ci config

* fix(core): update evaluation

* chore(core): add test case

* chore(core): update ci config

* chore(core): update ci config

* fix(core): ci

* fix(core): update inspect test case

* fix(core): e2e

* fix(puppeteer): show model info in report

* fix(core): update evaluation config

* chore(core): fix lint
2025-05-26 23:50:34 +08:00
github-actions[bot]
0dd38c2537 release: v0.17.3 2025-05-26 06:36:57 +00:00
Leyang
d07c6a78e3
feat(web-integration): support full xpath for cache (#754)
* feat(web-integration): support full xpath for cache

* refactor(web-integration): simplify getElementXPath to improve clarity and performance

* feat(web-integration): add support for 'A' node type and related extraction logic

* feat(web-integration): merge children rects of button

* feat(web-integration): enhance caching documentation and tests

* test(web-integration): update snapshot

* docs(core): update caching

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-05-23 17:51:04 +08:00
github-actions[bot]
3b4671b0be release: v0.17.2 2025-05-23 06:18:49 +00:00
yutao
fd6703c6d5 chore(core): add test cases 2025-05-22 07:31:55 +08:00
Leyang
7b190ae4ee
fix(web-integration): sanitize content for reportHtmlContent (#745)
* fix(web-integration): sanitize content for reportHtmlContent

* fix(workflow): version

* fix(web-integration): recover after retrieve

* fix(web-integration): test

* chore(core): fix lint

* fix(report): remove ! for content

* chore(core): add test case

* chore(core): add test case

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-05-22 07:20:32 +08:00
yuyutaotao
08466cac1e
feat(core): add element describer (#750) 2025-05-21 21:05:47 +08:00
yuyutaotao
610e7979bf
fix(core): error in report file when planning failed (#747)
* fix(core): error in report file when planning failed

* chore(core): add testcase for aiQuery
2025-05-21 20:36:22 +08:00
Leyang
4c8d881614
fix(web-integration): handle undefined aiInput case in ScriptPlayer (#743)
* fix(web-integration): handle undefined aiInput case in ScriptPlayer

* fix(workflow): version

* fix(core): yaml player

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-05-21 19:18:29 +08:00
github-actions[bot]
049d9f6565 release: v0.17.1 2025-05-20 09:11:17 +00:00
Leyang
fb2580616c
fix cache bugs(scroll instant, text node info, cache hit condition) (#732)
* fix(web-integration): cache hit when element.id exist and scroll element instantly

* fix(web-integration): use parent xpath for text node

* fix(web-integration): only scroll in to view when element is not completly visible

* fix(shared): distinct text node

* test(web-integration): getElementInfoByXpath

* test(web-integration): rename desc

* test(web-integration): fix

* test(web-integration): snapshot attributes only

* test(web-integration): fix test
2025-05-20 13:19:32 +08:00
github-actions[bot]
39ddc57df3 release: v0.17.0 2025-05-16 14:32:01 +00:00
yuyutaotao
b261ed7f2a
feat(web): use xpath and yaml as cache (#711)
* feat(web-integration): use xpath for cache instead of id

* feat(web-integration): enhance TaskCache to support xpaths for cache matching and add new test cases

* feat(web-integration): add debug log for unknown page types in TaskCache

* feat(web-integration): update caching logic and cache hit conditions for Plan and Locate tasks

* chore(core): update debug log

* feat(web-integration): update rspress.config and enhance TaskCache structure with new properties

* feat(web-integration): recalculate id when hit cache

* fix(web-integration): update mock implementation in task-cache test to use evaluate method

* feat(web-integration): enhance element caching by adding XPath support and improving cache hit logic

* chore(core): lint

* feat(web-integration): improve XPath handling in web-extractor

* test(web-integration): fix tests

* feat(core, web-integration): add attributes to LocateResultElement and enhance element handling

* fix(core): lint

* feat(web-integration): add midsceneVersion to TaskCache and update cache validation logic

* fix(core): test

* fix(web-integration): update cache validation logic to prevent reading outdated midscene cache files

* feat(web-integration): enhance TaskCache to track used cache items and improve cache retrieval logic

* fix(core): xpath logic (#710)

* feat(core): resue context for locate

* feat(core): build yamlFlow from aiAction

* feat(core): refine task-cache

* feat(core): update cache

* feat(core): refine task-cache

* feat(core): refine task-cache

* feat(core): remove unused checkElementExistsByXPath

* feat(core): use yaml file as cache

* chore(core): fix lint

* chore(core): print warning for previous cache

* refactor(core): remove quickAnswer references and improve element matching logic

* fix(core): update import path for buildYamlFlowFromPlans

* chore(web-integration): update output image and skip task error test

* fix(web-integration): update test snapshots to handle beta versions

* fix(web-integration): adjust test snapshots for version consistency

* fix(web-integration): track original cache length and adjust matching logic in tests

* fix(web-integration): update test URLs to reflect new target site and enable previously skipped test

* chore(core): update cache docs

* fix(core): test

* feat(core): try to match element from plan

* fix(web-integration): cache id stable when retry in palywright

* fix(web-integration): typo

* style(web-integration): lint

* fix(web-integration): stable cacheid in tests

* fix(web-integration): cache id

---------

Co-authored-by: quanruzhuoxiu <quanruzhuoxiu@gmail.com>
2025-05-16 17:16:56 +08:00
yuyutaotao
80b4e7b609
fix(mcp): mcp error connection (#676)
* fix(mcp): mcp error connection

* fix(mcp): lint

* fix(core): add kill signal for server

* chore(core): force close conflict port in bridge

---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>

* chore(core): merge main
2025-04-30 16:07:59 +08:00
Leyang
4718066bb1
feat(web-integration): add support for new agent method(aiBoolean, aiString, aiNumber, aiLocate) (#658)
* feat(web-integration): add support for new agent method(aiBoolean, aiString, aiNumber, aiLocate)

* fix(core, web-integration): update data extraction logic and refine return types for agent methods

* feat(site): add detailed descriptions and examples

* fix(web-integration): remove unused properties from aiLocate return type and update UI titles

* fix(core): enhance agent methods for better extraction and querying

* fix(core): update test scripts and refine data extraction prompts

* fix(core): refine return type in ExecutionTaskApply and remove unused import in inspect

* fix(core): update data extraction logic and enhance type handling in Insight class

* fix(web-integration): update import path for puppeteerAgentForTarget in player test file

* fix(core): tests fix

* fix(core): fix tests

* fix(shared): enhance imageInfo tests by validating individual properties and updating snapshots

* fix(site): remove waitForNavigationTimeout from Playwright integration examples

* fix(site): update timeout configuration examples in FAQ for clarity

* test(web-integration): remove unused client-extractor test and related snapshots

* chore(core): fix query implementation

* fix(report): improve data handling in DetailSide component and enhance output display

* fix(core): refine data extraction prompts and improve error handling in PageTaskExecutor

* fix(core): update data extraction prompt for clarity and type validation

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-04-29 13:36:49 +08:00
yuyutaotao
667fb59474
refactor(bridge): enhance error handling and connection logic in BridgeClient and BridgeServer (#653)
---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-04-27 16:27:42 +08:00
yuyutaotao
e1f708740f
refactor(bridge): update connection handling and server close logic (#646)
---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-04-27 13:30:46 +08:00
Leyang
ca644d8914
feat(core): allow custom midscene_run dir (#631)
* feat(core): support custom midscene_run dir

* feat(report): add search functionality to PlaywrightCaseSelector component

* refactor(shared): simplify base directory resolution and remove unused environment variable

* feat(shared): integrate shared environment variables across multiple packages

* refactor(shared): update base directory resolution to use dynamic midscene_run directory

* fix(puppeteer): increase screenshot timeout from 3s to 10s for improved reliability
2025-04-24 22:54:52 +08:00
Leyang
03a597e022
feat(web-integration): enhance timeout configurations and logging for network idle and navigation (#624)
* feat(web-integration): enhance timeout configurations and logging for network idle and navigation

* fix(web-integration): refine timeout warning messages and remove unnecessary test files

* feat(site): add network timeout customization details and additional parameters for Puppeteer

* fix(site): update default timeout values and enhance customization options for network idle in YAML

* fix(site): remove redundant timeout customization details in FAQ documentation

* fix(web-integration): enhance Playwright agent to support network idle functionality

* docs(playwright): update config docs

* docs(playwright): update config docs

* fix(web-integration): refactor network idle handling in Playwright agent

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-04-24 10:28:26 +08:00
yuyutaotao
07f2068e88
refactor(playwright): rename agent interface in playwright (#610)
---------

Co-authored-by: zhouxiao.shaw <zhouxiao.shaw@bytedance.com>
2025-04-22 10:27:01 +08:00
github-actions[bot]
0a3bc1e230 release: v0.15.0 2025-04-18 11:26:30 +00:00
Zhou Xiao
bc5b6e2121
ci(workflow): add commit msg check (#587)
* ci(workflow): add commit check

* docs(workflow): add commit check to CONTRIBUTING

* chore(workflow): optimize lint error
2025-04-18 12:50:52 +08:00
Leyang
7596da2ab7
feat: support tap in prompt (#584) 2025-04-18 10:27:56 +08:00
Leyang
b76211bd5d
feat: android playground (#542)
* refactor: android api

* refactor: enhance Android agent to accept options for device connection

* fix: type error

* fix: click after clearInput

* fix: click before clearInput

* feat: android playground

* feat: support npx package name

* feat: android playground joint

* fix: git ignore conflicts

* feat: ensure adb server is running before initializing adb client

* fix: deps consistency

* ci: add android playground

* feat: integrate shared constants and improve server configuration in android playground

* feat: android playground style

* feat: style opt

* feat: add @rsbuild/plugin-svgr dependency and improve URI handling in adb

* feat: remove unused water flow scripts and update comments to English

* feat: download report file

* feat: standalone android playground

* feat: use dynamic import

* feat: migrate CSS to LESS and remove unused styles in chrome extension and report

* feat: enhance Android playground with ScrcpyPlayer ref integration and device management improvements

* feat: optimize styles and layout in Android playground and visualizer components

* chore: add bin back

* chore: update build script to exclude documentation generation

* feat: add not ready message to PlaygroundResult for improved user guidance

* feat: add error handling for screenshot capture in Android page

* docs: update readme

* feat: add PNG validation for screenshot buffer in Android page

* feat: enhance UI components with improved styling and tooltips in ScrcpyPlayer and PromptInput

* docs: update uri parameter description in integrate-with-android documentation and improve uri handling in launch function

* style: update primary color to #2B83FF across multiple components and adjust margin in App.less

* refactor: replace userConfig with globalConfig for environment configuration management and update related functions

* feat: integrate server validation logic in App, AdbDevice, and ScrcpyPlayer components for improved connection handling

* style: enhance player component layout with overflow handling and margin adjustments

* style: refine player component layout with flex adjustments and improved spacing

* feat: add midscene model name display and improve layout in EnvConfig component

* feat: integrate ShinyText component for enhanced loading progress display in PlaygroundResult

* test: add test for isValidPNGImageBuffer

* style: remove background color from App.less and adjust AI config override behavior in env.ts

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-04-17 17:44:11 +08:00
Leyang
0ca9fda7ae
feat: android yaml support (#551)
* feat: android yaml support

* feat: enhance ScriptPlayer to support web and android environments

* chore: update error message

* refactor: unify environment interfaces for YAML scripts

---------

Co-authored-by: yutao <yutao.tao@bytedance.com>
2025-04-11 09:36:41 +08:00
Zhou Xiao
2c3c540cb1
fix(playwright): make test.describe work correctly with ai fixtures (#537)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-04-04 16:14:04 +08:00
yuyutaotao
0171b5e2de
fix: ci testing (#529)
* fix: ci

* fix: ci
2025-04-03 10:51:50 +08:00
yuyutaotao
0c0675ba4b
feat: update deepThink interface (#517)
* feat: update deepThink interface

* fix: CI

* chore: update error message

* feat: update search area config

* fix: deepthink ui

---------

Co-authored-by: Zhou Xiao <zhouxiao.shaw@bytedance.com>
2025-04-02 19:26:56 +08:00