fix: clean up extension ci failures · openclaw/openclaw@7934a23
steipete
·
2026-05-02
·
via Recent Commits to openclaw:main
File tree
slack/src/monitor/message-handler
| Original file line number | Diff line number | Diff line change |
|---|
@@ -77,7 +77,7 @@ function isoDateExclusiveEnd(value: string): string {
|
77 | 77 | } |
78 | 78 | |
79 | 79 | function freshnessStartTime(freshness: GeminiFreshness, now: Date): string { |
80 | | -const start = new Date(now.getTime()); |
| 80 | +const start = new Date(now); |
81 | 81 | start.setUTCDate(start.getUTCDate() - GEMINI_FRESHNESS_DAYS[freshness]); |
82 | 82 | return start.toISOString(); |
83 | 83 | } |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -254,7 +254,8 @@ describe("google web search provider", () => {
|
254 | 254 | |
255 | 255 | await tool?.execute({ query: "latest ai news", freshness: "week" }); |
256 | 256 | |
257 | | -const body = JSON.parse(String(mockFetch.mock.calls[0]?.[1]?.body)) as { |
| 257 | +const init = mockFetch.mock.calls[0]?.[1] as { body?: unknown } | undefined; |
| 258 | +const body = JSON.parse(String(init?.body)) as { |
258 | 259 | tools?: Array<{ google_search?: { timeRangeFilter?: unknown } }>; |
259 | 260 | }; |
260 | 261 | expect(body.tools?.[0]?.google_search?.timeRangeFilter).toEqual({ |
@@ -289,7 +290,8 @@ describe("google web search provider", () => {
|
289 | 290 | date_before: "2026-04-30", |
290 | 291 | }); |
291 | 292 | |
292 | | -const body = JSON.parse(String(mockFetch.mock.calls[0]?.[1]?.body)) as { |
| 293 | +const init = mockFetch.mock.calls[0]?.[1] as { body?: unknown } | undefined; |
| 294 | +const body = JSON.parse(String(init?.body)) as { |
293 | 295 | tools?: Array<{ google_search?: { timeRangeFilter?: unknown } }>; |
294 | 296 | }; |
295 | 297 | expect(body.tools?.[0]?.google_search?.timeRangeFilter).toEqual({ |
|
| Original file line number | Diff line number | Diff line change |
|---|
@@ -582,7 +582,7 @@ export async function prepareSlackMessage(params: {
|
582 | 582 | const ackReactionMessageTs = message.ts; |
583 | 583 | const allowToolOnlyStatusReaction = |
584 | 584 | statusReactionsExplicitlyEnabled && |
585 | | -(effectiveWasMentioned || mentionDecision.shouldBypassMention === true); |
| 585 | +(effectiveWasMentioned || mentionDecision.shouldBypassMention); |
586 | 586 | const shouldSendAckReaction = |
587 | 587 | shouldAckReaction() && (!sourceRepliesAreToolOnly || allowToolOnlyStatusReaction); |
588 | 588 | const statusReactionsWillHandle = |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。