feat(chat): 应用目录只配置成聚合应用
This commit is contained in:
1 parent
5bef77f86c
commit
dab04d4c3e
28 files changed
+797
-138
No files matched your search
@@ -76,7 +76,7 @@ const {
|
||||
const tableHeaderColumns = computed(() => [
|
||||
{ key: 'name', label: t('admin.agent.headers.name'), align: 'left' as const },
|
||||
{ key: 'type', label: t('admin.agent.headers.type'), align: 'left' as const },
|
||||
{ key: 'category', label: t('admin.agent.headers.category'), align: 'left' as const },
|
||||
{ key: 'aggregation', label: t('admin.agent.headers.aggregation'), align: 'left' as const },
|
||||
{ key: 'config', label: t('admin.agent.headers.config'), align: 'left' as const },
|
||||
{ key: 'status', label: t('admin.agent.headers.status'), align: 'left' as const },
|
||||
{ key: 'actions', label: t('admin.agent.headers.actions'), align: 'right' as const },
|
||||
@@ -84,16 +84,14 @@ const tableHeaderColumns = computed(() => [
|
||||
|
||||
const formatAgentCode = (agent: AgentRow) => agent.agent_code || 'generic';
|
||||
|
||||
/** 分类主行:一级分类 */
|
||||
const formatAgentCategoryPrimary = (agent: AgentRow) => {
|
||||
const category = String(agent.category || '').trim();
|
||||
return category || '—';
|
||||
};
|
||||
const formatAgentAggregationPrimary = (agent: AgentRow) => (
|
||||
agent.is_aggregate ? t('admin.agent.directory.aggregateMode') : t('admin.agent.directory.normalMode')
|
||||
);
|
||||
|
||||
/** 分类副行:二级分类 */
|
||||
const formatAgentCategorySecondary = (agent: AgentRow) => {
|
||||
const subCategory = String(agent.sub_category || '').trim();
|
||||
return subCategory || '—';
|
||||
const formatAgentAggregationSecondary = (agent: AgentRow) => {
|
||||
const memberCount = Number(agent.directory_member_count || agent.directory_members?.length || 0);
|
||||
if (agent.is_aggregate) return t('admin.agent.directory.memberCount', { count: memberCount });
|
||||
return t('admin.agent.directory.normalListHint');
|
||||
};
|
||||
|
||||
/** 配置列主行:Dify App ID 或 Iframe URL 摘要。 */
|
||||
@@ -251,11 +249,15 @@ onMounted(() => {
|
||||
</td>
|
||||
<td class="px-4 py-4 align-middle">
|
||||
<div class="agent-list-cell">
|
||||
<p class="truncate text-sm text-secondary" :title="formatAgentCategoryPrimary(agent)">
|
||||
{{ formatAgentCategoryPrimary(agent) }}
|
||||
<p
|
||||
class="truncate text-sm font-medium"
|
||||
:class="agent.is_aggregate ? 'text-brand-700' : 'text-secondary'"
|
||||
:title="formatAgentAggregationPrimary(agent)"
|
||||
>
|
||||
{{ formatAgentAggregationPrimary(agent) }}
|
||||
</p>
|
||||
<p class="truncate text-xs text-muted" :title="formatAgentCategorySecondary(agent)">
|
||||
{{ formatAgentCategorySecondary(agent) }}
|
||||
<p class="truncate text-xs text-muted" :title="formatAgentAggregationSecondary(agent)">
|
||||
{{ formatAgentAggregationSecondary(agent) }}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
@@ -348,6 +350,7 @@ onMounted(() => {
|
||||
:content-profile-options="contentProfileOptions"
|
||||
:runtime-providers="runtimeProviders"
|
||||
:conversation-modes="conversationModes"
|
||||
:agent-options="agents"
|
||||
:sync-content-profile-from-intent-routes="syncContentProfileFromIntentRoutes"
|
||||
@close="showFormDialog = false"
|
||||
@save="saveAgentForm"
|
||||
|
||||
Reference in new issue
Block a user