Skip to content

Commit 163061c

Browse files
OrKoNsamiyac
authored andcommitted
feat: make pageId routing always-on by default
Rename --experimental-page-id-routing to --page-id-routing and enable it by default. Users can opt out with --no-page-id-routing if token overhead is unacceptable or routing does not work as expected. - Rename serverArgs.experimentalPageIdRouting to pageIdRouting and set default: true; describe text updated to reflect opt-out semantics. - Update ToolHandler.ts schema injection and page resolution to use the new flag name. - Drop the now-redundant delete of pageIdRouting from chrome-devtools-cli start options (was previously removing experimentalPageIdRouting). - Update evaluate_script to use cliArgs.pageIdRouting and guard getPageById with a request.params.pageId check so passing the flag without a pageId no longer throws (mirrors the guard used in ToolHandler.ts). - Improve pageIdSchema description: explain list_pages and selected-page fallback so the field is self-documenting. - Fix generate-docs.ts to inject pageIdSchema for page-scoped tools so tool-reference.md surfaces pageId on every page-scoped tool; pass a slim flag so slim docs stay unchanged. - Update eval scenarios to rely on the new default instead of passing --experimental-page-id-routing; update the example flag in the TestScenario JSDoc accordingly. - Fix pageId type in script.test.ts (string -> number). - Regenerated docs/tool-reference.md, README options section, and src/telemetry/{flag_usage_metrics,tool_call_metrics}.json. - Add pageIdRouting/page-id-routing to the cli.test.ts default args fixture to reflect the new default.
1 parent f70dc53 commit 163061c

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

src/tools/script.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ Example with arguments: \`(el) => {
5959
.describe(
6060
'Handle dialogs while execution. "accept", "dismiss", or string for response of window.prompt. Defaults to accept.',
6161
),
62+
...(cliArgs?.pageIdRouting ? pageIdSchema : {}),
6263
...(cliArgs?.categoryExtensions
6364
? {
6465
serviceWorkerId: zod

0 commit comments

Comments
 (0)