Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
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
*/
45
function
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
importData
Function · 0.70
Calls
1
now
Method · 0.45
Tested by
no test coverage detected