fix(web): 主代理执行结束时刷新 topic 列表以更新 token 统计
LLM usage 在消息持久化后已写入 DB,主代理本次执行结束时触发 bumpTopicRefreshTrigger,list_topics 重新读取最新 token 统计并更新侧边栏。
This commit is contained in:
parent
6fc6d5628f
commit
beb7b581a6
@ -170,6 +170,9 @@ export function useMessages(options: UseMessagesOptions): UseMessagesReturn {
|
|||||||
if (getSubagentTaskId(message)) return true;
|
if (getSubagentTaskId(message)) return true;
|
||||||
if (msg.topic_id && msg.topic_id !== selectedTopicRef.current) return true;
|
if (msg.topic_id && msg.topic_id !== selectedTopicRef.current) return true;
|
||||||
setIsLoading(false);
|
setIsLoading(false);
|
||||||
|
// 主代理本次执行结束:刷新 topic 列表以更新 token 统计
|
||||||
|
// (LLM usage 在消息持久化后已写入 DB,list_topics 会读到最新值)
|
||||||
|
bumpTopicRefreshTrigger();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user