Skip to content

Conversation

@EAGzzyCSL
Copy link
Collaborator

No description provided.

- Move screenshot scaling logic from Agent to commonContextParser
  - Remove screenshotScale calculation from Agent class
  - Centralize shrink factor computation in commonContextParser
  - Automatically resize screenshots to match logical dimensions

- Remove deprecated getContext method from AbstractInterface
  - Delete getContext implementations across all platforms (web, chrome-extension, puppeteer)
  - Simplify context retrieval to use commonContextParser uniformly

- Standardize screenshot data structure
  - Replace screenshotBase64 field usage with ScreenshotItem.create()
  - Update StaticPage to use screenshot property consistently
  - Remove legacy compatibility layer for screenshotBase64

- Clean up type definitions
  - Remove WebUIContext type alias (use UIContext directly)
  - Delete PlaygroundWebUIContext related types
  - Update imports across packages

- Consolidate context parsers
  - Remove WebPageContextParser (superseded by commonContextParser)
  - Update all usages to use commonContextParser from @midscene/core/agent
  - Simplify evaluation and test utilities

This refactoring unifies UI context handling across all device types,
reduces code duplication, and improves maintainability by centralizing
screenshot processing logic in a single location.
@cloudflare-workers-and-pages
Copy link

Deploying midscene with  Cloudflare Pages  Cloudflare Pages

Latest commit: 9dd2335
Status: ✅  Deploy successful!
Preview URL: https://d3ac0ebb.midscene.pages.dev
Branch Preview URL: https://zzy-shrink.midscene.pages.dev

View logs

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant