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

Function extractNameFromFilePath

packages/parser/src/formats/chatlab.ts:41–46  ·  view source on GitHub ↗

* 从文件名提取群名 * 返回不含扩展名的文件名

(filePath: string)

Source from the content-addressed store, hash-verified

39 * 返回不含扩展名的文件名
40 */
41function extractNameFromFilePath(filePath: string): string {
42 const basename = path.basename(filePath)
43 // 移除 .json 扩展名
44 const name = basename.replace(/\.json$/i, '')
45 return name || '未知群聊'
46}
47
48// ==================== 特征定义 ====================
49

Callers 1

parseChatLabFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected