File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,27 +10,30 @@ import z from 'zod';
1010import { ToolCategories } from './categories.js' ;
1111import { defineTool } from './ToolDefinition.js' ;
1212
13- const FILTERABLE_RESOURCE_TYPES = [
14- 'document' ,
15- 'stylesheet' ,
16- 'image' ,
17- 'media' ,
18- 'font' ,
19- 'script' ,
20- 'texttrack' ,
21- 'xhr' ,
22- 'fetch' ,
23- 'prefetch' ,
24- 'eventsource' ,
25- 'websocket' ,
26- 'manifest' ,
27- 'signedexchange' ,
28- 'ping' ,
29- 'cspviolationreport' ,
30- 'preflight' ,
31- 'fedcm' ,
32- 'other' ,
33- ] as const satisfies readonly ResourceType [ ] ;
13+ const FILTERABLE_RESOURCE_TYPES : readonly [
14+ ResourceType ,
15+ ...ResourceType [ ] ,
16+ ] = [
17+ 'document' ,
18+ 'stylesheet' ,
19+ 'image' ,
20+ 'media' ,
21+ 'font' ,
22+ 'script' ,
23+ 'texttrack' ,
24+ 'xhr' ,
25+ 'fetch' ,
26+ 'prefetch' ,
27+ 'eventsource' ,
28+ 'websocket' ,
29+ 'manifest' ,
30+ 'signedexchange' ,
31+ 'ping' ,
32+ 'cspviolationreport' ,
33+ 'preflight' ,
34+ 'fedcm' ,
35+ 'other' ,
36+ ] ;
3437
3538export const listNetworkRequests = defineTool ( {
3639 name : 'list_network_requests' ,
@@ -58,12 +61,7 @@ export const listNetworkRequests = defineTool({
5861 ) ,
5962 resourceTypes : z
6063 . array (
61- z . enum (
62- FILTERABLE_RESOURCE_TYPES as unknown as [
63- ResourceType ,
64- ...ResourceType [ ] ,
65- ] ,
66- ) ,
64+ z . enum ( FILTERABLE_RESOURCE_TYPES ) ,
6765 )
6866 . optional ( )
6967 . describe (
You can’t perform that action at this time.
0 commit comments