Skip to content

Commit 9b3dfce

Browse files
authored
Merge branch 'main' into add-in-page-tools
2 parents 5ae8622 + 0a7c0a7 commit 9b3dfce

6 files changed

Lines changed: 41 additions & 30 deletions

File tree

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,17 @@ startup_timeout_ms = 20_000
198198

199199
</details>
200200

201+
<details>
202+
<summary>Command Code</summary>
203+
204+
Use the Command Code CLI to add the Chrome DevTools MCP server (<a href="https://commandcode.ai/docs/mcp">MCP guide</a>):
205+
206+
```bash
207+
cmd mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latest
208+
```
209+
210+
</details>
211+
201212
<details>
202213
<summary>Copilot CLI</summary>
203214

package-lock.json

Lines changed: 19 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
"devDependencies": {
4848
"@eslint/js": "^9.35.0",
4949
"@google/genai": "^1.37.0",
50-
"@modelcontextprotocol/sdk": "1.27.1",
50+
"@modelcontextprotocol/sdk": "1.28.0",
5151
"@rollup/plugin-commonjs": "^29.0.0",
5252
"@rollup/plugin-json": "^6.1.0",
5353
"@rollup/plugin-node-resolve": "^16.0.3",
@@ -60,15 +60,15 @@
6060
"@typescript-eslint/eslint-plugin": "^8.43.0",
6161
"@typescript-eslint/parser": "^8.43.0",
6262
"chrome-devtools-frontend": "1.0.1602348",
63-
"core-js": "3.48.0",
63+
"core-js": "3.49.0",
6464
"debug": "4.4.3",
6565
"eslint": "^9.35.0",
6666
"eslint-import-resolver-typescript": "^4.4.4",
6767
"eslint-plugin-import": "^2.32.0",
6868
"globals": "^17.0.0",
6969
"lighthouse": "13.0.3",
7070
"prettier": "^3.6.2",
71-
"puppeteer": "24.39.1",
71+
"puppeteer": "24.40.0",
7272
"rollup": "4.59.1",
7373
"rollup-plugin-cleanup": "^3.2.1",
7474
"rollup-plugin-license": "^3.6.0",

src/McpResponse.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -224,10 +224,10 @@ export class McpResponse implements Response {
224224
}
225225

226226
attachNetworkRequest(
227-
reqid: number,
227+
reqId: number,
228228
options?: {requestFilePath?: string; responseFilePath?: string},
229229
): void {
230-
this.#attachedNetworkRequestId = reqid;
230+
this.#attachedNetworkRequestId = reqId;
231231
this.#attachedNetworkRequestOptions = options;
232232
}
233233

@@ -405,7 +405,7 @@ export class McpResponse implements Response {
405405
});
406406
if (!formatter.isValid()) {
407407
throw new Error(
408-
"Can't provide detals for the msgid " + consoleMessageStableId,
408+
"Can't provide details for the msgid " + consoleMessageStableId,
409409
);
410410
}
411411
detailedConsoleMessage = formatter;

src/PageCollector.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,13 +272,13 @@ class PageEventSubscriber {
272272
if (this.#issueAggregator) {
273273
this.#issueAggregator.removeEventListener(
274274
DevTools.IssueAggregatorEvents.AGGREGATED_ISSUE_UPDATED,
275-
this.#onAggregatedissue,
275+
this.#onAggregatedIssue,
276276
);
277277
}
278278
this.#issueAggregator = new DevTools.IssueAggregator(this.#issueManager);
279279
this.#issueAggregator.addEventListener(
280280
DevTools.IssueAggregatorEvents.AGGREGATED_ISSUE_UPDATED,
281-
this.#onAggregatedissue,
281+
this.#onAggregatedIssue,
282282
);
283283
}
284284

@@ -303,15 +303,15 @@ class PageEventSubscriber {
303303
if (this.#issueAggregator) {
304304
this.#issueAggregator.removeEventListener(
305305
DevTools.IssueAggregatorEvents.AGGREGATED_ISSUE_UPDATED,
306-
this.#onAggregatedissue,
306+
this.#onAggregatedIssue,
307307
);
308308
}
309309
void this.#session.send('Audits.disable').catch(() => {
310310
// might fail.
311311
});
312312
}
313313

314-
#onAggregatedissue = (
314+
#onAggregatedIssue = (
315315
event: DevTools.Common.EventTarget.EventTargetEvent<DevTools.AggregatedIssue>,
316316
) => {
317317
if (this.#seenIssues.has(event.data)) {

tests/McpResponse.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ describe('McpResponse', () => {
622622
try {
623623
await response.handle('test', context);
624624
} catch (e) {
625-
assert.ok(e.message.includes("Can't provide detals for the msgid 1"));
625+
assert.ok(e.message.includes("Can't provide details for the msgid 1"));
626626
}
627627
});
628628
});

0 commit comments

Comments
 (0)