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

Function extractNameFromFilePath

packages/parser/src/formats/chatlab-jsonl.ts:85–89  ·  view source on GitHub ↗

* 从文件名提取群名

(filePath: string)

Source from the content-addressed store, hash-verified

83 * 从文件名提取群名
84 */
85function extractNameFromFilePath(filePath: string): string {
86 const basename = path.basename(filePath)
87 const name = basename.replace(/\.jsonl$/i, '')
88 return name || '未知群聊'
89}
90
91/**
92 * 解析单行 JSONL

Callers 1

parseChatLabJsonlFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected