fix(ai-chat): 跳过健康检查避免服务误判
This commit is contained in:
@@ -906,15 +906,8 @@ async loadChatHistoryIfExist() {
|
||||
this.messages.push(loadingMessage)
|
||||
|
||||
try {
|
||||
// 检查AI服务状态
|
||||
const status = await aiService.getServiceStatus()
|
||||
this.isAIServiceAvailable = status.available
|
||||
|
||||
if (!this.isAIServiceAvailable) {
|
||||
throw new Error('AI服务暂不可用')
|
||||
}
|
||||
|
||||
// 使用AI服务获取回复
|
||||
// 直接发送消息(跳过健康检查,避免健康检查接口格式不匹配导致误判)
|
||||
// 如果服务不可用,实际发送时会抛出异常,由 catch 块处理
|
||||
const enhancedMessage = this.enhanceEmojiMessage(userMessage.content)
|
||||
if (this.enableStreaming) {
|
||||
await this.sendStreamMessage(enhancedMessage)
|
||||
|
||||
Reference in New Issue
Block a user