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

Function extractNameFromFilePath

packages/parser/src/formats/weflow.ts:47–51  ·  view source on GitHub ↗

* 从文件名提取聊天名称

(filePath: string)

Source from the content-addressed store, hash-verified

45 * 从文件名提取聊天名称
46 */
47function extractNameFromFilePath(filePath: string): string {
48 const basename = path.basename(filePath)
49 const name = basename.replace(/\.json$/i, '')
50 return name || '未知聊天'
51}
52
53// ==================== 特征定义 ====================
54

Callers 1

parseWeFlowFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected