fix: 高亮消息时不再退出子智能体视图

子智能体视图的消息源是同一 chat_id,高亮消息不需要退出子智能体栈。仅定时任务视图(另一个 chat_id)需要退出。
This commit is contained in:
oudecheng 2026-07-07 14:12:42 +08:00
parent b9c880d823
commit fdd22556a1

View File

@ -435,10 +435,7 @@ function App() {
alert('该待办的完成记录无法定位,可能是历史数据') alert('该待办的完成记录无法定位,可能是历史数据')
return return
} }
// 若处于子智能体视图或定时任务视图,先退出回到主会话视图 // 仅定时任务视图需要退出(其消息源是另一个 chat_id
if (subAgentStack.length > 0) {
navigateToSubAgentLevel(-1)
}
if (schedulerView) { if (schedulerView) {
exitSchedulerJobView() exitSchedulerJobView()
} }
@ -449,7 +446,7 @@ function App() {
setTimeout(() => { setTimeout(() => {
setHighlightedMessageId(msgId) setHighlightedMessageId(msgId)
}, 50) }, 50)
}, [setHighlightedMessageId, subAgentStack.length, schedulerView, navigateToSubAgentLevel, exitSchedulerJobView]) }, [setHighlightedMessageId, schedulerView, exitSchedulerJobView])
const handleRefreshSchedulerJobs = useCallback(() => { const handleRefreshSchedulerJobs = useCallback(() => {
const cmd = requestSchedulerJobList() const cmd = requestSchedulerJobList()