From 1569db1754d0da81a2185e171b4534079f9bc24d Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sat, 17 Jan 2026 00:03:00 +0000 Subject: [PATCH] style: format with oxfmt --- src/agents/tools/web-tools.ts | 24 ++++++++++++++---------- src/config/schema.ts | 6 ++---- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/agents/tools/web-tools.ts b/src/agents/tools/web-tools.ts index 133e42bae..5351ecc24 100644 --- a/src/agents/tools/web-tools.ts +++ b/src/agents/tools/web-tools.ts @@ -33,14 +33,16 @@ type WebFetchConfig = NonNullable["web"] extends infer : undefined : undefined; -type FirecrawlFetchConfig = { - enabled?: boolean; - apiKey?: string; - baseUrl?: string; - onlyMainContent?: boolean; - maxAgeMs?: number; - timeoutSeconds?: number; -} | undefined; +type FirecrawlFetchConfig = + | { + enabled?: boolean; + apiKey?: string; + baseUrl?: string; + onlyMainContent?: boolean; + maxAgeMs?: number; + timeoutSeconds?: number; + } + | undefined; type CacheEntry = { value: T; @@ -497,7 +499,7 @@ async function runWebSearch(params: { ui_lang?: string; }): Promise> { const cacheKey = normalizeCacheKey( - `${params.provider}:${params.query}:${params.count}:${params.country || "default"}:${params.search_lang || "default"}:${params.ui_lang || "default"}` + `${params.provider}:${params.query}:${params.count}:${params.country || "default"}:${params.search_lang || "default"}:${params.ui_lang || "default"}`, ); const cached = readCache(SEARCH_CACHE, cacheKey); if (cached) return { ...cached.value, cached: true }; @@ -701,7 +703,9 @@ async function runWebFetch(params: { } } } else { - throw new Error("Web fetch extraction failed: Readability disabled and Firecrawl unavailable."); + throw new Error( + "Web fetch extraction failed: Readability disabled and Firecrawl unavailable.", + ); } } else if (contentType.includes("application/json")) { try { diff --git a/src/config/schema.ts b/src/config/schema.ts index cacc100d4..3c3269019 100644 --- a/src/config/schema.ts +++ b/src/config/schema.ts @@ -265,16 +265,14 @@ const FIELD_HELP: Record = { "tools.web.fetch.readability": "Use Readability to extract main content from HTML (fallbacks to basic HTML cleanup).", "tools.web.fetch.firecrawl.enabled": "Enable Firecrawl fallback for web_fetch (if configured).", - "tools.web.fetch.firecrawl.apiKey": - "Firecrawl API key (fallback: FIRECRAWL_API_KEY env var).", + "tools.web.fetch.firecrawl.apiKey": "Firecrawl API key (fallback: FIRECRAWL_API_KEY env var).", "tools.web.fetch.firecrawl.baseUrl": "Firecrawl base URL (e.g. https://api.firecrawl.dev or custom endpoint).", "tools.web.fetch.firecrawl.onlyMainContent": "When true, Firecrawl returns only the main content (default: true).", "tools.web.fetch.firecrawl.maxAgeMs": "Firecrawl maxAge (ms) for cached results when supported by the API.", - "tools.web.fetch.firecrawl.timeoutSeconds": - "Timeout in seconds for Firecrawl requests.", + "tools.web.fetch.firecrawl.timeoutSeconds": "Timeout in seconds for Firecrawl requests.", "channels.slack.allowBots": "Allow bot-authored messages to trigger Slack replies (default: false).", "channels.slack.thread.historyScope":