feat:智能体库样式修改和置顶功能

This commit is contained in:
liailing1026
2026-03-03 16:15:11 +08:00
parent 00500c9bd6
commit bc61c98804
3 changed files with 36 additions and 6 deletions

View File

@@ -119,17 +119,24 @@ const agentList = computed(() => {
data: Agent[]
}[] = []
const obj: Record<string, Agent[]> = {}
// 获取当前任务中参与流程的智能体名称列表
const selectedAgentNames = agentsStore.currentTask?.AgentSelection ?? []
if (!agentsStore.agents.length) {
return {
selected,
unselected
}
}
for (const agent of agentsStore.agents) {
// if (agentsStore.currentTask?.AgentSelection?.includes(agent.Name)) {
// selected.push(agent)
// continue
// }
// 如果智能体在当前任务的AgentSelection中则放入selected数组置顶显示
if (selectedAgentNames.includes(agent.Name)) {
selected.push(agent)
continue
}
// 其他智能体按数据空间分类
if (obj[agent.Classification]) {
obj[agent.Classification]!.push(agent)
} else {