MCPcopy Create free account
hub / github.com/Roy3838/Observer / optimisticUpdateQuota

Method optimisticUpdateQuota

app/src/utils/ModelManager.ts:805–817  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

803 }
804
805 private optimisticUpdateQuota(): void {
806 try {
807 const key = 'observer-quota-remaining';
808 const current = localStorage.getItem(key);
809 if (current !== null) {
810 const n = parseInt(current, 10);
811 if (!isNaN(n)) {
812 localStorage.setItem(key, (n - 1).toString());
813 window.dispatchEvent(new CustomEvent('quotaUpdated'));
814 }
815 }
816 } catch {}
817 }
818}

Callers 3

sendPromptMethod · 0.95
sendMessagesMethod · 0.95
sendToolMessagesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected