feat:智能体库样式修改和置顶功能
This commit is contained in:
@@ -121,8 +121,17 @@ const agentsStore = useAgentsStore()
|
||||
<div class="p-[8px] pt-0">
|
||||
<!-- 信息描述 -->
|
||||
<template v-if="getTabState(item.Name) === 'info'">
|
||||
<div class="text-[12px] text-[var(--color-text-detail)]">
|
||||
{{ item.Profile }}
|
||||
<!-- 数据空间 -->
|
||||
<div class="text-[12px]">
|
||||
<span class="text-[var(--color-text)] font-bold">数据空间</span>
|
||||
<div class="text-[var(--color-text-secondary)] mt-1">归属于{{ item.Classification }}数据空间</div>
|
||||
</div>
|
||||
<!-- 分割线 -->
|
||||
<div class="h-[1px] w-full bg-[var(--color-border-default)] my-[8px]"></div>
|
||||
<!-- 介绍 -->
|
||||
<div class="text-[12px]">
|
||||
<span class="text-[var(--color-text)] font-bold">介绍</span>
|
||||
<div class="text-[var(--color-text-secondary)] mt-1">{{ item.Profile }}</div>
|
||||
</div>
|
||||
</template>
|
||||
<!-- 当前职责 -->
|
||||
@@ -219,4 +228,10 @@ const agentsStore = useAgentsStore()
|
||||
right: 0 !important;
|
||||
margin-left: 0px;
|
||||
}
|
||||
|
||||
// 标签悬浮样式(仅未激活状态)
|
||||
.duty-info .rounded-\[9px\]:not(.bg-\[var\(--color-tab-bg-active\)\]):hover {
|
||||
background: var(--color-tab-bg-hover) !important;
|
||||
color: var(--color-tab-text-hover) !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -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