refactor: minor code formatting improvements and add artifacts tool

- Clean up whitespace and formatting in browserContextFactory.ts
- Improve code style in files.ts and screenshot.ts
- Add new artifacts.ts tool for artifact path management
- Enhance screenshot validation with dimension safety checks

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Ryan Malloy 2025-09-09 04:19:30 -06:00
parent 671b0a3668
commit efe1627c3f
4 changed files with 130 additions and 11 deletions

View file

@ -72,12 +72,12 @@ class BaseContextFactory implements BrowserContextFactory {
testDebug(`create browser context (${this.name})`);
const browser = await this._obtainBrowser();
const browserContext = await this._doCreateContext(browser, extensionPaths);
// Apply offline mode if configured
if ((this.browserConfig as any).offline !== undefined) {
if ((this.browserConfig as any).offline !== undefined)
await browserContext.setOffline((this.browserConfig as any).offline);
}
return { browserContext, close: () => this._closeBrowserContext(browserContext, browser) };
}