fix: claude加入首条消息检测应对claude不说话的情况

This commit is contained in:
ikechan8370 2023-04-16 13:50:22 +08:00
parent 1e5010e9f1
commit ba0c382886

View file

@ -56,8 +56,10 @@ export class SlackClaudeClient {
} }
} }
await delay(500) await delay(500)
tryTimes++
if (tryTimes > 10 && response === '_Typing…_') { if (tryTimes > 10 && response === '_Typing…_') {
// 过了5秒还没任何回复就重新发一下试试 // 过了5秒还没任何回复就重新发一下试试
logger.warn('claude没有响应重试中')
return await this.sendMessage(prompt) return await this.sendMessage(prompt)
} }
} }