MCPcopy Index your code
hub / github.com/ChatLab/ChatLab / generateSessionId

Function generateSessionId

apps/desktop/main/database/core.ts:45–49  ·  view source on GitHub ↗

* 生成唯一的会话ID

()

Source from the content-addressed store, hash-verified

43 * 生成唯一的会话ID
44 */
45function generateSessionId(): string {
46 const timestamp = Date.now()
47 const random = Math.random().toString(36).substring(2, 8)
48 return `chat_${timestamp}_${random}`
49}
50
51/**
52 * 获取数据库文件路径

Callers 1

importDataFunction · 0.70

Calls 1

nowMethod · 0.45

Tested by

no test coverage detected