MCPcopy
hub / github.com/claude-code-best/claude-code / generateTaskId

Function generateTaskId

src/Task.ts:98–106  ·  view source on GitHub ↗
(type: TaskType)

Source from the content-addressed store, hash-verified

96const TASK_ID_ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz'
97
98export function generateTaskId(type: TaskType): string {
99 const prefix = getTaskIdPrefix(type)
100 const bytes = randomBytes(8)
101 let id = prefix
102 for (let i = 0; i < 8; i++) {
103 id += TASK_ID_ALPHABET[bytes[i]! % TASK_ID_ALPHABET.length]
104 }
105 return id
106}
107
108export function createTaskStateBase(
109 id: string,

Callers 8

execFunction · 0.85
constructorMethod · 0.85
createFailedCommandFunction · 0.85
spawnInProcessTeammateFunction · 0.85
registerMonitorMcpTaskFunction · 0.85
registerRemoteAgentTaskFunction · 0.85
registerDreamTaskFunction · 0.85

Calls 1

getTaskIdPrefixFunction · 0.85

Tested by

no test coverage detected