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