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

Function getActionTrigger

packages/shared/src/features/patchy/patchyTriggers.ts:113–121  ·  view source on GitHub ↗
(
  action: 'upvote' | 'bookmark',
  countToday: number,
)

Source from the content-addressed store, hash-verified

111 (count - PATCHY_ESCALATE_AT) % PATCHY_ESCALATE_EVERY === 0);
112
113export const getActionTrigger = (
114 action: 'upvote' | 'bookmark',
115 countToday: number,
116): PatchyTrigger => {
117 if (!isEscalation(countToday)) {
118 return action;
119 }
120 return action === 'upvote' ? 'on_a_roll' : 'bookmark_pile';
121};

Callers 2

usePatchyCompanionFunction · 0.90

Calls 1

isEscalationFunction · 0.85

Tested by

no test coverage detected