mirror of
https://github.com/jackwener/OpenCLI.git
synced 2026-09-14 18:25:42 +08:00
f88e7569e9
* refactor: deduplicate transient error checks, cache VM contexts, expose tab ID - Extract shared isTransientBrowserError() into browser/errors.ts, replacing duplicated string-matching lists in daemon-client.ts and pipeline/executor.ts - Cache compiled vm.Script objects in template.ts with LRU eviction (max 256), avoiding per-invocation VM context creation in pipeline loops - Add getActiveTabId() to IPage interface and Page class for tab state inspection * refactor: extract BasePage to deduplicate DOM helpers across Page and CDPPage Both Page (daemon-backed) and CDPPage (direct CDP) had ~200 lines of identical DOM helper implementations (click, type, scroll, wait, snapshot, interceptor, etc). Extract shared logic into abstract BasePage class. Subclasses now only implement transport-specific methods. * refactor: rename mcp.ts to bridge.ts and clean up Playwright MCP references The file browser/mcp.ts contained BrowserBridge (daemon session manager), not MCP functionality. Renamed to bridge.ts for clarity. Also removed all stale "Playwright MCP" references from comments and variable names across the codebase — Playwright was removed long ago.