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

Function createProgress

packages/parser/src/utils.ts:29–39  ·  view source on GitHub ↗
(stage, bytesRead, totalBytes, messagesProcessed, message)

Source from the content-addressed store, hash-verified

27 * 创建进度对象
28 */
29export const createProgress: CreateProgress = (stage, bytesRead, totalBytes, messagesProcessed, message) => {
30 const percentage = totalBytes > 0 ? Math.min(99, Math.round((bytesRead / totalBytes) * 100)) : 0
31 return {
32 stage,
33 bytesRead,
34 totalBytes,
35 messagesProcessed,
36 percentage: stage === 'done' ? 100 : percentage,
37 message,
38 }
39}
40
41/**
42 * 解析 ISO 时间戳或毫秒时间戳

Callers 14

parseWeFlowFunction · 0.90
parseTxtFunction · 0.90
parseWhatsAppFunction · 0.90
parseInstagramFunction · 0.90
parseV4Function · 0.90
parseChatLabFunction · 0.90
parseChatLabJsonlFunction · 0.90
parseTelegramSingleFunction · 0.90
parseChunkedJsonlFunction · 0.90
parseDiscordExporterFunction · 0.90
parseGoogleChatFunction · 0.90
parseTelegramFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected