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

Function generateMainSessionTaskId

src/tasks/LocalMainSessionTask.ts:75–82  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

73const TASK_ID_ALPHABET = '0123456789abcdefghijklmnopqrstuvwxyz'
74
75function generateMainSessionTaskId(): string {
76 const bytes = randomBytes(8)
77 let id = 's'
78 for (let i = 0; i < 8; i++) {
79 id += TASK_ID_ALPHABET[bytes[i]! % TASK_ID_ALPHABET.length]
80 }
81 return id
82}
83
84/**
85 * Register a backgrounded main session task.

Callers 1

registerMainSessionTaskFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected