Skip to content

Commit f0b61dd

Browse files
committed
Refer to the specific panel
1 parent fb50c44 commit f0b61dd

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

docs/tool-reference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,11 +246,11 @@
246246

247247
### `get_network_request`
248248

249-
**Description:** Gets a network request by an optional reqid, if omitted returns the request selected in DevTools UI.
249+
**Description:** Gets a network request by an optional reqid, if omitted returns the currently selected request in the DevTools Network panel.
250250

251251
**Parameters:**
252252

253-
- **reqid** (number) _(optional)_: The reqid of the network request. If omitted, looks up the current request selected in DevTools UI.
253+
- **reqid** (number) _(optional)_: The reqid of the network request. If omitted returns the currently selected request in the DevTools Network panel.
254254

255255
---
256256

src/formatters/networkFormatter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export function getShortDescriptionForRequest(
1616
selectedInDevToolsUI = false,
1717
): string {
1818
// TODO truncate the URL
19-
return `reqid=${id} ${request.method()} ${request.url()} ${getStatusFromRequest(request)}${selectedInDevToolsUI ? ` [selected in DevTools UI]` : ''}`;
19+
return `reqid=${id} ${request.method()} ${request.url()} ${getStatusFromRequest(request)}${selectedInDevToolsUI ? ` [selected in the DevTools Network panel]` : ''}`;
2020
}
2121

2222
export function getStatusFromRequest(request: HTTPRequest): string {

src/tools/network.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ export const getNetworkRequest = defineTool({
9494
.number()
9595
.optional()
9696
.describe(
97-
'The reqid of the network request. If omitted, looks up the current request selected in DevTools UI.',
97+
'The reqid of the network request. If omitted returns the currently selected request in the DevTools Network panel.',
9898
),
9999
},
100100
handler: async (request, response, context) => {
@@ -106,7 +106,7 @@ export const getNetworkRequest = defineTool({
106106
response.attachNetworkRequest(data?.requestId);
107107
} else {
108108
response.appendResponseLine(
109-
`Nothing is currently selected in DevTools UI.`,
109+
`Nothing is currently selected in the DevTools Network panel.`,
110110
);
111111
}
112112
}

tests/formatters/networkFormatter.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ describe('networkFormatter', () => {
7878

7979
assert.equal(
8080
result,
81-
'reqid=1 GET http://example.com [pending] [selected in DevTools UI]',
81+
'reqid=1 GET http://example.com [pending] [selected in the DevTools Network panel]',
8282
);
8383
});
8484
});

0 commit comments

Comments
 (0)