(provider: Provider, prompt: string, content: string, timeout: number)
| 186 | } |
| 187 | |
| 188 | // ========== 消息收集 ========== |
| 189 | type MessageData = { time: string; sender: string; text: string }; |
| 190 | |
| 191 | // 将各种 ID 类型统一转换为字符串进行比较 |
| 192 | function normalizeId(id: any): string { |
| 193 | if (id === null || id === undefined) return ""; |
| 194 | // 处理 BigInt |
| 195 | if (typeof id === "bigint") return id.toString(); |
| 196 | // 处理对象(可能是 Api.PeerUser 等) |
no test coverage detected