(filePath?: string)
| 562 | |
| 563 | // 清理临时文件 |
| 564 | async function cleanupTempFile(filePath?: string): Promise<void> { |
| 565 | if (filePath) { |
| 566 | try { |
| 567 | await fs.promises.unlink(filePath); |
| 568 | } catch { |
| 569 | // 忽略清理错误 |
| 570 | } |
| 571 | } |
| 572 | } |
| 573 | |
| 574 | // 主处理函数 |
| 575 | async function handleGptRequest(msg: Api.Message): Promise<void> { |