File tree Expand file tree Collapse file tree 4 files changed +22
-13
lines changed Expand file tree Collapse file tree 4 files changed +22
-13
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ import type {
2121} from './third_party/modelcontextprotocol-sdk/index.js' ;
2222import { handleDialog } from './tools/pages.js' ;
2323import type { ImageContentData , Response } from './tools/ToolDefinition.js' ;
24- import { paginate , type PaginationOptions } from './utils/pagination.js' ;
24+ import { paginate } from './utils/pagination.js' ;
25+ import type { PaginationOptions } from './utils/types.js' ;
2526
2627interface NetworkRequestData {
2728 networkRequestStableId : number ;
@@ -65,9 +66,7 @@ export class McpResponse implements Response {
6566
6667 setIncludeNetworkRequests (
6768 value : boolean ,
68- options ?: {
69- pageSize ?: number ;
70- pageIdx ?: number ;
69+ options ?: PaginationOptions & {
7170 resourceTypes ?: ResourceType [ ] ;
7271 } ,
7372 ) : void {
@@ -91,9 +90,7 @@ export class McpResponse implements Response {
9190
9291 setIncludeConsoleData (
9392 value : boolean ,
94- options ?: {
95- pageSize ?: number ;
96- pageIdx ?: number ;
93+ options ?: PaginationOptions & {
9794 types ?: string [ ] ;
9895 } ,
9996 ) : void {
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import z from 'zod';
99
1010import type { TextSnapshotNode } from '../McpContext.js' ;
1111import type { TraceResult } from '../trace-processing/parse.js' ;
12+ import type { PaginationOptions } from '../utils/types.js' ;
1213
1314import type { ToolCategories } from './categories.js' ;
1415
@@ -45,11 +46,15 @@ export interface Response {
4546 setIncludePages ( value : boolean ) : void ;
4647 setIncludeNetworkRequests (
4748 value : boolean ,
48- options ?: { pageSize ?: number ; pageIdx ?: number ; resourceTypes ?: string [ ] } ,
49+ options ?: PaginationOptions & {
50+ resourceTypes ?: string [ ] ;
51+ } ,
4952 ) : void ;
5053 setIncludeConsoleData (
5154 value : boolean ,
52- options ?: { pageSize ?: number ; pageIdx ?: number ; types ?: string [ ] } ,
55+ options ?: PaginationOptions & {
56+ types ?: string [ ] ;
57+ } ,
5358 ) : void ;
5459 setIncludeSnapshot ( value : boolean ) : void ;
5560 setIncludeSnapshot ( value : boolean , verbose ?: boolean ) : void ;
Original file line number Diff line number Diff line change 44 * SPDX-License-Identifier: Apache-2.0
55 */
66
7- export interface PaginationOptions {
8- pageSize ?: number ;
9- pageIdx ?: number ;
10- }
7+ import type { PaginationOptions } from './types.js' ;
118
129export interface PaginationResult < Item > {
1310 items : readonly Item [ ] ;
Original file line number Diff line number Diff line change 1+ /**
2+ * @license
3+ * Copyright 2025 Google LLC
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ export interface PaginationOptions {
8+ pageSize ?: number ;
9+ pageIdx ?: number ;
10+ }
You can’t perform that action at this time.
0 commit comments