chore(lint): burn down remaining warnings to zero
This commit is contained in:
+4
-3
@@ -68,21 +68,22 @@ export function initTools(deps: ToolsDeps): ToolsResult {
|
||||
// Initialize browser manager and register browser tools (if enabled)
|
||||
let browserManager: BrowserManager | undefined;
|
||||
if (config.browser?.enabled) {
|
||||
browserManager = new BrowserManager({
|
||||
const manager = new BrowserManager({
|
||||
executablePath: config.browser.executable_path,
|
||||
wsEndpoint: config.browser.ws_endpoint,
|
||||
headless: config.browser.headless,
|
||||
maxPages: config.browser.max_pages,
|
||||
defaultTimeout: config.browser.default_timeout,
|
||||
});
|
||||
browserManager = manager;
|
||||
|
||||
for (const tool of createBrowserTools(browserManager)) {
|
||||
for (const tool of createBrowserTools(manager)) {
|
||||
toolRegistry.register(tool);
|
||||
}
|
||||
console.log(`Browser tools enabled (headless=${config.browser.headless})`);
|
||||
|
||||
lifecycle.onShutdown(async () => {
|
||||
await browserManager!.shutdown();
|
||||
await manager.shutdown();
|
||||
console.log('Browser manager stopped');
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user