* 从文件名提取名称(备用)
(filePath: string)
| 128 | * 从文件名提取名称(备用) |
| 129 | */ |
| 130 | function extractNameFromFilePath(filePath: string): string { |
| 131 | const basename = path.basename(filePath) |
| 132 | return basename.replace(/\.json$/i, '') || '未知对话' |
| 133 | } |
| 134 | |
| 135 | /** |
| 136 | * 判断是否为系统消息 |