MCPcopy Create free account
hub / github.com/dailydotdev/apps / canPatchyOffer

Function canPatchyOffer

packages/shared/src/features/patchy/patchyAssistant.ts:117–124  ·  view source on GitHub ↗
(
  memory: PatchyOfferMemory,
  kind: PatchyOfferKind,
)

Source from the content-addressed store, hash-verified

115};
116
117export const canPatchyOffer = (
118 memory: PatchyOfferMemory,
119 kind: PatchyOfferKind,
120): boolean =>
121 memory.shownToday < PATCHY_OFFERS_PER_DAY &&
122 !memory.never.includes(kind) &&
123 !memory.offeredToday.includes(kind) &&
124 (memory.dismissed[kind] ?? 0) < PATCHY_DISMISSALS_TO_MUTE;
125
126export const withPatchyOfferShown = (
127 memory: PatchyOfferMemory,

Callers 2

usePatchyAssistantFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected