fix: 修复上次 examples 错误

This commit is contained in:
Wenjie Zhang 2025-11-07 12:38:29 +08:00
parent 99aae1c00a
commit 0e2b7c86a3

View File

@ -247,7 +247,10 @@ const currentAgentName = computed(() => {
return '智能体';
});
const currentAgent = computed(() => agents.value[currentAgentId.value] || null);
const currentAgent = computed(() => {
if (!currentAgentId.value || !agents.value || !agents.value.length) return null;
return agents.value.find(a => a.id === currentAgentId.value) || null;
});
const chatsList = computed(() => threads.value || []);
const currentChatId = computed(() => chatState.currentThreadId);
const currentThread = computed(() => {