Skip to content

Commit f10f417

Browse files
committed
fix: resolving lint issues
1 parent c00090d commit f10f417

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

src/McpContext.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,6 @@ import type {
3434
} from './third_party/index.js';
3535
import {Locator} from './third_party/index.js';
3636
import {PredefinedNetworkConditions} from './third_party/index.js';
37-
import {listPages} from './tools/pages.js';
38-
import {takeSnapshot} from './tools/snapshot.js';
3937
import {CLOSE_PAGE_ERROR} from './tools/ToolDefinition.js';
4038
import type {Context, DevToolsData} from './tools/ToolDefinition.js';
4139
import type {TraceResult} from './trace-processing/parse.js';
@@ -510,7 +508,7 @@ export class McpContext implements Context {
510508
}
511509
if (page.isClosed()) {
512510
throw new Error(
513-
`The selected page has been closed. Call ${listPages().name} to see open pages.`,
511+
`The selected page has been closed. Call list_pages to see open pages.`,
514512
);
515513
}
516514
return page;
@@ -622,7 +620,7 @@ export class McpContext implements Context {
622620
const mcpPage = this.#mcpPages.get(page);
623621
if (!mcpPage?.textSnapshot) {
624622
throw new Error(
625-
`No snapshot found for page ${mcpPage?.id ?? '?'}. Use ${takeSnapshot.name} to capture one.`,
623+
`No snapshot found for page ${mcpPage?.id ?? '?'}. Use take_snapshot to capture one.`,
626624
);
627625
}
628626
const node = mcpPage.textSnapshot.idToNode.get(uid);
@@ -663,9 +661,7 @@ export class McpContext implements Context {
663661
}
664662
}
665663
if (!anySnapshot) {
666-
throw new Error(
667-
`No snapshot found. Use ${takeSnapshot.name} to capture one.`,
668-
);
664+
throw new Error(`No snapshot found. Use take_snapshot to capture one.`);
669665
}
670666
throw new Error('No such element found in any snapshot.');
671667
}

src/tools/ToolDefinition.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
*/
66

77
import type {ParsedArguments} from '../cli.js';
8-
import {ExtensionServiceWorker} from '../McpContext.js';
8+
import type {ExtensionServiceWorker} from '../McpContext.js';
99
import {zod} from '../third_party/index.js';
1010
import type {
1111
Dialog,

tests/tools/script.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import {installExtension} from '../../src/tools/extensions.js';
1313
import {evaluateScript} from '../../src/tools/script.js';
1414
import {serverHooks} from '../server.js';
1515
import {html, withMcpContext} from '../utils.js';
16+
1617
import {extractId} from './extensions.test.js';
1718

1819
const EXTENSION_PATH = path.join(

0 commit comments

Comments
 (0)