feat(creator_name): add creator_name field to agents and knowledge bases for enhanced visibility

Introduced a new optional field, creator_name, in both CustomAgent and KnowledgeBase types to allow the front end to display the creator's name. This enhancement enables better differentiation between resources created by the current user and those created by other members of the same tenant. Updated relevant API handlers to populate this field during list operations, ensuring accurate representation in the UI. Additionally, modified the ResourceOriginBadge component to utilize the creator_name for improved context in resource listings.

Refs: #1303
This commit is contained in:
wizardchen
2026-05-18 00:28:16 +08:00
committed by lyingbug
parent 8b681e4a2e
commit 8d4c58c5fa
13 changed files with 894 additions and 433 deletions
+2
View File
@@ -99,6 +99,8 @@ export interface CustomAgent {
is_builtin: boolean;
tenant_id?: number;
created_by?: string;
// creator_name 由后端 list 接口批量回填,仅用于列表卡片来源徽章。
creator_name?: string;
config: CustomAgentConfig;
created_at?: string;
updated_at?: string;
+3
View File
@@ -115,6 +115,9 @@ export interface KnowledgeBaseInfo {
// Set by PR 5 of the multi-tenant RBAC series; nullable for legacy
// KBs created before that migration backfilled the column.
creator_id?: string
// creator_name 由后端 list 接口批量回填(username 优先,退化到 email),
// 仅用于列表卡片来源徽章;缺失代表无法解析(已删除 / 老数据)。
creator_name?: string
created_at: string
updated_at: string
document_count?: number