MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / ulid

Function ulid

apps/kimi-web/src/api/daemon/agentEventProjector.ts:66–70  ·  view source on GitHub ↗
(prefix = 'msg_')

Source from the content-addressed store, hash-verified

64// ---------------------------------------------------------------------------
65
66function ulid(prefix = 'msg_'): string {
67 const t = Date.now().toString(36).padStart(10, '0');
68 const r = Math.random().toString(36).slice(2, 12).padEnd(10, '0');
69 return `${prefix}${t}${r}`;
70}
71
72/** Normalise the raw token usage shape emitted by agent-core. */
73function normalizeUsage(raw: unknown): {

Callers 15

constructorMethod · 0.85
connectMethod · 0.85
subscribeMethod · 0.85
unsubscribeMethod · 0.85
_sendWsControlMethod · 0.85
parseOrGenerateRequestIdFunction · 0.85
request-id.test.tsFile · 0.85
submitMethod · 0.85
createMethod · 0.85
startLoginMethod · 0.85
saveMethod · 0.85
registerApiV1RoutesFunction · 0.85

Calls 2

toStringMethod · 0.65
nowMethod · 0.65

Tested by

no test coverage detected