feat:智能体库样式修改和置顶功能
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user