Something went wrong. Try again.
Turning knowledge into answers — a self-hosted RAG-powered AMA platform that turns internal knowledge into accurate, context-aware conversa… ama.inovuslabs.org
Something went wrong. Try again.
12345678910111213141516171819202122
export function canAskToday(max = 20): boolean { const key = 'inovus-daily-usage'; const now = Date.now(); let stamps: number[] = [];
try { stamps = JSON.parse(localStorage.getItem(key) || '[]'); } catch { stamps = []; }
// Keep only timestamps from the last 24 hours stamps = stamps.filter(ts => now - ts < 24 * 60 * 60 * 1000);
if (stamps.length >= max) return false;
stamps.push(now); localStorage.setItem(key, JSON.stringify(stamps)); return true;}