We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 99aae1c commit 0e2b7c8Copy full SHA for 0e2b7c8
web/src/components/AgentChatComponent.vue
@@ -247,7 +247,10 @@ const currentAgentName = computed(() => {
247
return '智能体';
248
});
249
250
-const currentAgent = computed(() => agents.value[currentAgentId.value] || null);
+const currentAgent = computed(() => {
251
+ if (!currentAgentId.value || !agents.value || !agents.value.length) return null;
252
+ return agents.value.find(a => a.id === currentAgentId.value) || null;
253
+});
254
const chatsList = computed(() => threads.value || []);
255
const currentChatId = computed(() => chatState.currentThreadId);
256
const currentThread = computed(() => {
0 commit comments