Skip to content

Commit 91d70d6

Browse files
committed
chore: enable extensions by default on cli
1 parent 922b0ab commit 91d70d6

3 files changed

Lines changed: 1 addition & 20 deletions

File tree

skills/chrome-devtools-cli/SKILL.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,6 @@ chrome-devtools take_snapshot --verbose true --filePath "s.txt" # Take a verbose
125125

126126
## Extensions
127127

128-
Extensions tools are disabled by default. Enable them with `chrome-devtools start --categoryExtensions=true`.
129-
130128
```bash
131129
chrome-devtools list_extensions # Lists all the Chrome extensions installed in the browser
132130
chrome-devtools install_extension "/path/to/extension" # Installs a Chrome extension from the given path

src/bin/chrome-devtools.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ if (!('default' in cliOptions.headless)) {
5959
if ('default' in cliOptions.isolated) {
6060
throw new Error('isolated cli option unexpectedly has a default');
6161
}
62+
startCliOptions.categoryExtensions!.default = true;
6263
startCliOptions.headless!.default = true;
6364
startCliOptions.isolated!.description =
6465
'If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed. Defaults to true unless userDataDir is provided.';

tests/e2e/chrome-devtools-commands.test.ts

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -72,24 +72,6 @@ describe('chrome-devtools', () => {
7272
);
7373
});
7474

75-
it('fails to invoke list_extensions when categoryExtensions is disabled (default)', async () => {
76-
await runCli(['start'], sessionId);
77-
78-
const result = await runCli(['list_extensions'], sessionId);
79-
assert.strictEqual(result.status, 0);
80-
81-
assert(
82-
result.stdout.includes(
83-
'Tool list_extensions is in category Extensions which is currently disabled',
84-
),
85-
'error message is unexpected: ' + result.stdout,
86-
);
87-
assert(
88-
result.stdout.includes('chrome-devtools start --categoryExtensions=true'),
89-
'restart command suggestion is missing: ' + result.stdout,
90-
);
91-
});
92-
9375
it('fails to invoke list_network_requests when categoryNetwork is disabled', async () => {
9476
await runCli(['start', '--categoryNetwork=false'], sessionId);
9577

0 commit comments

Comments
 (0)