MCPcopy Create free account
hub / github.com/ChatLab/ChatLab / extractNameFromFilePath

Function extractNameFromFilePath

packages/parser/src/formats/qq-native-txt.ts:38–42  ·  view source on GitHub ↗

* 从文件名提取群名

(filePath: string)

Source from the content-addressed store, hash-verified

36 * 从文件名提取群名
37 */
38function extractNameFromFilePath(filePath: string): string {
39 const basename = path.basename(filePath)
40 const name = basename.replace(/\.txt$/i, '')
41 return name || '未知群聊'
42}
43
44// ==================== 特征定义 ====================
45

Callers 1

parseTxtFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected