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

Function loadToastDurationMs

packages/plugin/src/tui/data/context-db.ts:303–311  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

301
302/** Resolve global toast duration from server config via RPC. */
303export async function loadToastDurationMs(): Promise<number> {
304 if (!rpcClient) return 5000;
305 try {
306 const result = await rpcClient.call<{ toastDurationMs?: number }>("toast-duration", {});
307 return typeof result.toastDurationMs === "number" ? result.toastDurationMs : 5000;
308 } catch {
309 return 5000;
310 }
311}
312
313/**
314 * Fetch the current startup announcement from the server, if any.

Callers 1

refreshToastDurationMsFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected