Skip to content

feat(core): add aiLocateAll batch locator#2700

Open
quanru wants to merge 2 commits into
mainfrom
codex/ai-locate-all-batch
Open

feat(core): add aiLocateAll batch locator#2700
quanru wants to merge 2 commits into
mainfrom
codex/ai-locate-all-batch

Conversation

@quanru

@quanru quanru commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • add agent.aiLocateAll() and YAML aiLocateAll using the API shape from PR feat(core): add aiLocateAll (#1848) #1914
  • implement batch location as a single VLM call that returns multiple matching elements, then parse through the current locator adapter, sort, dedupe, and map results back to screen coordinates
  • wire the result through service dumps, task execution, report multi-highlight, docs, and focused unit coverage

Review doc

Feishu/Lark: https://bytedance.larkoffice.com/docx/O8wNdae2JoJhv1xzbzocgdf8nLR

Validation

  • pnpm exec tsc --noEmit --project packages/core/tsconfig.json
  • pnpm exec tsc --noEmit --project apps/report/tsconfig.json
  • pnpm --dir packages/core exec vitest run tests/unit-test/inspect-locate-all.test.ts tests/unit-test/service-locate-all.test.ts tests/unit-test/task-builder.test.ts tests/unit-test/agent-locate-all.test.ts tests/unit-test/player-action-dispatch.test.ts
  • pnpm --dir packages/web-integration exec vitest run tests/unit-test/yaml/player.test.ts
  • pnpm run lint
  • npx nx build @midscene/core
  • npx nx build @midscene/report

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 23, 2026

Copy link
Copy Markdown

Deploying midscene with  Cloudflare Pages  Cloudflare Pages

Latest commit: 23084fd
Status: ✅  Deploy successful!
Preview URL: https://0a87e4d6.midscene.pages.dev
Branch Preview URL: https://codex-ai-locate-all-batch.midscene.pages.dev

View logs

@quanru quanru force-pushed the codex/ai-locate-all-batch branch from b3f0ccc to 0b05ea0 Compare June 23, 2026 04:22
@quanru quanru force-pushed the codex/ai-locate-all-batch branch from 0b05ea0 to 23084fd Compare June 23, 2026 05:59
@quanru quanru marked this pull request as ready for review June 23, 2026 06:41

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 23084fd861

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

}

const rawResponse = JSON.stringify(res.content);
const errors: string[] = Array.isArray(res.content.errors)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Guard null locate-all responses before reading fields

If a model returns valid JSON null for a malformed/no-match locate-all response, callAIWithObjectResponse can pass it through because typeof null === 'object', and this dereference throws a TypeError before the intended fatal-response branch can create a ServiceError dump. Please validate res.content is a non-null object before reading errors or elements so malformed locate-all responses fail with the report dump preserved.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant