Skip to content

Commit 6bce414

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

3 files changed

Lines changed: 5 additions & 21 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: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ async function start(args: string[], sessionId: string) {
3737
logDisclaimers(parseArguments(VERSION, combinedArgs));
3838
}
3939

40-
const defaultArgs = ['--viaCli', '--experimentalStructuredContent'];
40+
const defaultArgs = [
41+
'--viaCli',
42+
'--experimentalStructuredContent',
43+
'--categoryExtensions',
44+
];
4145

4246
const startCliOptions = {
4347
...cliOptions,

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)