添加中断,修复电脑手机运行时信号
This commit is contained in:
@@ -159,7 +159,7 @@ export const useSocketStore = defineStore('socket', () => {
|
||||
} = messageData || {}
|
||||
|
||||
// 调试日志:明确输出 type 和 data
|
||||
console.log('[handleMessage] type =', type, ', data =', JSON.stringify(data));
|
||||
console.log(`[handleMessage] type = ${type}, data = ${JSON.stringify(data)}`);
|
||||
|
||||
switch (type) {
|
||||
case 'auth_ok':
|
||||
@@ -180,6 +180,10 @@ export const useSocketStore = defineStore('socket', () => {
|
||||
addLog('warn', 'AI正在回复信息')
|
||||
handleBusinessMessage(data)
|
||||
break
|
||||
|
||||
case 'pc_offline':
|
||||
addLog('warn', 'PC 端已离线')
|
||||
break
|
||||
|
||||
default:
|
||||
addLog('info', `未知事件类型: ${type}`)
|
||||
@@ -252,6 +256,10 @@ export const useSocketStore = defineStore('socket', () => {
|
||||
if (chunk) {
|
||||
// 拼接 ai 回复的内容
|
||||
messageString.value += chunk
|
||||
if (!isThinking.value) {
|
||||
console.log("修改状态为开始思考");
|
||||
isThinking.value = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user