Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/tool-reference.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<!-- AUTO GENERATED DO NOT EDIT - run 'npm run gen' to update-->

# Chrome DevTools MCP Tool Reference (~6963 cl100k_base tokens)
# Chrome DevTools MCP Tool Reference (~6962 cl100k_base tokens)

- **[Input automation](#input-automation)** (9 tools)
- [`click`](#click)
Expand Down
2 changes: 1 addition & 1 deletion src/bin/cliDefinitions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ export const commands: Commands = {
},
},
list_pages: {
description: 'Get a list of pages open in the browser.',
description: 'Get a list of pages open in the browser.',
category: 'Navigation automation',
args: {},
},
Expand Down
2 changes: 1 addition & 1 deletion src/formatters/NetworkFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ function converNetworkRequestDetailedToStringDetailed(
let indent = 0;
for (const request of redirectChain.reverse()) {
response.push(
`${' '.repeat(indent)}${convertNetworkRequestConciseToString(request)})}`,
`${' '.repeat(indent)}${convertNetworkRequestConciseToString(request)}`,
);
indent++;
}
Expand Down
2 changes: 1 addition & 1 deletion src/tools/pages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
export const listPages = defineTool(args => {
return {
name: 'list_pages',
description: `Get a list of pages ${args?.categoryExtensions ? 'including extension service workers' : ''} open in the browser.`,
description: `Get a list of pages${args?.categoryExtensions ? ' including extension service workers' : ''} open in the browser.`,
annotations: {
category: ToolCategory.NAVIGATION,
readOnlyHint: true,
Expand Down
8 changes: 8 additions & 0 deletions tests/formatters/NetworkFormatter.test.js.snapshot
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
exports[`NetworkFormatter > toStringDetailed > handles redirect chain 1`] = `
## Request http://example.com
Status: pending
### Request Headers
- content-size:10
### Redirect chain
reqid=2 GET http://example.com/redirect [pending]
`;
5 changes: 2 additions & 3 deletions tests/formatters/NetworkFormatter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ describe('NetworkFormatter', () => {
assert.match(result, /"response":"body"/);
});

it('handles redirect chain', async () => {
it('handles redirect chain', async t => {
const redirectRequest = getMockRequest({
url: 'http://example.com/redirect',
});
Expand All @@ -305,8 +305,7 @@ describe('NetworkFormatter', () => {
redactNetworkHeaders: false,
});
const result = formatter.toStringDetailed();
assert.match(result, /Redirect chain/);
assert.match(result, /reqid=2/);
t.assert.snapshot?.(result);
});
it('shows saved to file message in toStringDetailed', async () => {
const request = {
Expand Down
Loading