MCPcopy Create free account
hub / github.com/astercloud/aster / generateId

Function generateId

ui/src/utils/format.ts:60–64  ·  view source on GitHub ↗
(prefix = "")

Source from the content-addressed store, hash-verified

58 * 生成唯一 ID
59 */
60export function generateId(prefix = ""): string {
61 const timestamp = Date.now();
62 const random = Math.random().toString(36).substring(2, 9);
63 return prefix ? `${prefix}-${timestamp}-${random}` : `${timestamp}-${random}`;
64}
65
66/**
67 * 截断文本

Callers 9

addTextMessageFunction · 0.90
handleAgentEventFunction · 0.90
sendMessageFunction · 0.90
emitThinkFunction · 0.90
executeFunction · 0.90
sendMessageFunction · 0.90
sendImageFunction · 0.90
handleAgentEventFunction · 0.90
useChatFunction · 0.90

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected