MCPcopy Create free account
hub / github.com/modelcontextprotocol/inspector / makeTaskId

Function makeTaskId

client/src/lib/hooks/useConnection.ts:843–852  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

841 const nowIso = () => new Date().toISOString();
842
843 const makeTaskId = () => {
844 // Prefer UUID when available; otherwise fall back to a reasonably unique id.
845 const cryptoAny = globalThis.crypto as unknown as
846 | { randomUUID?: () => string }
847 | undefined;
848 return (
849 cryptoAny?.randomUUID?.() ??
850 `task_${Date.now()}_${Math.random().toString(16).slice(2)}`
851 );
852 };
853
854 const emitTaskStatus = async (task: Task) => {
855 // Best-effort; task status notifications are optional.

Callers 1

createReceiverTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected