diff --git a/extensions/google/src/gemini-web-search-provider.runtime.ts b/extensions/google/src/gemini-web-search-provider.runtime.ts index 5f8d8a2993e..f57291517ca 100644 --- a/extensions/google/src/gemini-web-search-provider.runtime.ts +++ b/extensions/google/src/gemini-web-search-provider.runtime.ts @@ -77,7 +77,7 @@ function isoDateExclusiveEnd(value: string): string { } function freshnessStartTime(freshness: GeminiFreshness, now: Date): string { - const start = new Date(now.getTime()); + const start = new Date(now); start.setUTCDate(start.getUTCDate() - GEMINI_FRESHNESS_DAYS[freshness]); return start.toISOString(); } diff --git a/extensions/google/web-search-provider.test.ts b/extensions/google/web-search-provider.test.ts index 20c1cce950a..f911dcde485 100644 --- a/extensions/google/web-search-provider.test.ts +++ b/extensions/google/web-search-provider.test.ts @@ -254,7 +254,8 @@ describe("google web search provider", () => { await tool?.execute({ query: "latest ai news", freshness: "week" }); - const body = JSON.parse(String(mockFetch.mock.calls[0]?.[1]?.body)) as { + const init = mockFetch.mock.calls[0]?.[1] as { body?: unknown } | undefined; + const body = JSON.parse(String(init?.body)) as { tools?: Array<{ google_search?: { timeRangeFilter?: unknown } }>; }; expect(body.tools?.[0]?.google_search?.timeRangeFilter).toEqual({ @@ -289,7 +290,8 @@ describe("google web search provider", () => { date_before: "2026-04-30", }); - const body = JSON.parse(String(mockFetch.mock.calls[0]?.[1]?.body)) as { + const init = mockFetch.mock.calls[0]?.[1] as { body?: unknown } | undefined; + const body = JSON.parse(String(init?.body)) as { tools?: Array<{ google_search?: { timeRangeFilter?: unknown } }>; }; expect(body.tools?.[0]?.google_search?.timeRangeFilter).toEqual({ diff --git a/extensions/slack/src/monitor/message-handler/prepare.ts b/extensions/slack/src/monitor/message-handler/prepare.ts index 62a0f80aea9..e9239aac268 100644 --- a/extensions/slack/src/monitor/message-handler/prepare.ts +++ b/extensions/slack/src/monitor/message-handler/prepare.ts @@ -582,7 +582,7 @@ export async function prepareSlackMessage(params: { const ackReactionMessageTs = message.ts; const allowToolOnlyStatusReaction = statusReactionsExplicitlyEnabled && - (effectiveWasMentioned || mentionDecision.shouldBypassMention === true); + (effectiveWasMentioned || mentionDecision.shouldBypassMention); const shouldSendAckReaction = shouldAckReaction() && (!sourceRepliesAreToolOnly || allowToolOnlyStatusReaction); const statusReactionsWillHandle =