MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / generateId

Function generateId

src/stores/aiChat.ts:328–330  ·  view source on GitHub ↗
(prefix: string)

Source from the content-addressed store, hash-verified

326 let pendingFocusReturn = false
327
328 function generateId(prefix: string): string {
329 return `${prefix}_${Date.now()}_${Math.random().toString(36).slice(2, 8)}`
330 }
331
332 function ensureSessionState(params: EnsureAIChatSessionParams): { chatKey: string; state: AIChatSessionState } {
333 const chatKey = buildAIChatKey(params)

Callers 3

startNewAIChatFunction · 0.70
sendMessageFunction · 0.70
editCurrentRoundOnlyFunction · 0.70

Calls 1

nowMethod · 0.45

Tested by

no test coverage detected