chore: introduce response type (#738)
This commit is contained in:
parent
c2b98dc70b
commit
601a74305c
32 changed files with 443 additions and 526 deletions
|
|
@ -31,7 +31,7 @@ const install = defineTool({
|
|||
type: 'destructive',
|
||||
},
|
||||
|
||||
handle: async context => {
|
||||
handle: async (context, params, response) => {
|
||||
const channel = context.config.browser?.launchOptions?.channel ?? context.config.browser?.browserName ?? 'chrome';
|
||||
const cliUrl = import.meta.resolve('playwright/package.json');
|
||||
const cliPath = path.join(fileURLToPath(cliUrl), '..', 'cli.js');
|
||||
|
|
@ -49,11 +49,7 @@ const install = defineTool({
|
|||
reject(new Error(`Failed to install browser: ${output.join('')}`));
|
||||
});
|
||||
});
|
||||
return {
|
||||
code: [`// Browser ${channel} installed`],
|
||||
captureSnapshot: false,
|
||||
waitForNetwork: false,
|
||||
};
|
||||
response.setIncludeTabs();
|
||||
},
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue