可用应用只显示Dify应用类型为Chatflow的
This commit is contained in:
1 parent
b1613824ce
commit
dc8ad4de52
1 file changed
+4
-2
@@ -589,7 +589,7 @@ const copiedIndex = ref<number | null>(null);
|
|||||||
const { messages, isThinking, conversationId, sendMessage } = useChat();
|
const { messages, isThinking, conversationId, sendMessage } = useChat();
|
||||||
const input = ref('');
|
const input = ref('');
|
||||||
const currentAgent = ref<any>(null);
|
const currentAgent = ref<any>(null);
|
||||||
const userAgents = ref<Array<{ id: number; name: string; description: string; icon_url?: string }>>([]);
|
const userAgents = ref<Array<{ id: number; name: string; description: string; icon_url?: string; dify_app_type?: 'chatflow' | 'workflow' }>>([]);
|
||||||
const showGeneralFeedbackDialog = ref(false);
|
const showGeneralFeedbackDialog = ref(false);
|
||||||
const showAgentPanel = ref(true);
|
const showAgentPanel = ref(true);
|
||||||
|
|
||||||
@@ -1689,7 +1689,9 @@ const loadUserAgents = async () => {
|
|||||||
const res = await fetch('/api/agents', { headers: getAuthHeaders() });
|
const res = await fetch('/api/agents', { headers: getAuthHeaders() });
|
||||||
if (res.ok) {
|
if (res.ok) {
|
||||||
const agents = await res.json();
|
const agents = await res.json();
|
||||||
userAgents.value = Array.isArray(agents) ? agents.filter((a: any) => a.id !== agentId) : [];
|
userAgents.value = Array.isArray(agents)
|
||||||
|
? agents.filter((a: any) => a.id !== agentId && (a.dify_app_type || 'chatflow') === 'chatflow')
|
||||||
|
: [];
|
||||||
if (userAgents.value.length === 0) {
|
if (userAgents.value.length === 0) {
|
||||||
showAgentPanel.value = false;
|
showAgentPanel.value = false;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user