MCPcopy Create free account
hub / github.com/cortexkit/magic-context / refreshToastDurationMs

Function refreshToastDurationMs

packages/plugin/src/tui/index.tsx:16–25  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14let unifiedToastDurationMs = DEFAULT_TOAST_DURATION_MS
15
16async function refreshToastDurationMs(): Promise<void> {
17 try {
18 const resolved = await loadToastDurationMs()
19 if (typeof resolved === "number" && Number.isFinite(resolved)) {
20 unifiedToastDurationMs = resolved
21 }
22 } catch {
23 // Keep the current value; the next poll/startup can retry.
24 }
25}
26
27function getToastDurationMs(): number {
28 return unifiedToastDurationMs

Callers 1

tuiFunction · 0.85

Calls 1

loadToastDurationMsFunction · 0.90

Tested by

no test coverage detected