feat(agent): enhance agent sharing and selection features

- Updated the AgentSelector component to improve agent selection logic, ensuring accurate representation of selected agents.
- Introduced new AgentShareSettings component for managing agent sharing with organizations, including UI for selecting organizations and displaying shared agents.
- Enhanced API interactions for sharing agents, including new methods for listing and managing agent shares.
- Improved localization support for agent sharing features across multiple languages.
- Updated various components to reflect changes in agent capabilities and sharing status, enhancing user experience and clarity.

This update strengthens the agent management features, providing users with better tools for sharing and selecting agents within organizations.
This commit is contained in:
wizardchen
2026-02-04 20:12:29 +08:00
committed by lyingbug
parent faa4e9e7b5
commit dfaf862bc0
45 changed files with 3606 additions and 477 deletions
+47 -1
View File
@@ -261,9 +261,39 @@ export default {
mcp: 'MCP Services Enabled',
multiTurn: 'Multi-turn Conversation',
},
tabs: {
all: 'All',
mine: 'My Agents',
sharedToMe: 'Shared to Me',
},
empty: {
title: 'No Custom Agents',
description: 'Click the button in the top right to create your first agent',
sharedTitle: 'No shared agents yet',
sharedDescription: 'You can join a space or ask others to share agents with you',
},
detail: {
title: 'Agent Details',
useInChat: 'Use in Chat',
},
shareScope: {
title: 'Share Scope',
desc: 'Space members have read-only access to this agent and will use it according to your current configuration; your changes to the agent will sync to shared spaces. To allow space members to edit knowledge base content, share the knowledge base to the space.',
knowledgeBase: 'Knowledge bases',
chatModel: 'Chat model',
rerankModel: 'Rerank model',
webSearch: 'Web search',
mcp: 'MCP services',
kbAll: 'All knowledge bases',
kbSelected: '{count} selected',
kbNone: 'None',
modelConfigured: 'Configured',
modelNotSet: 'Not set',
enabled: 'On',
disabled: 'Off',
mcpAll: 'All services',
mcpSelected: '{count} selected',
mcpNone: 'None',
},
delete: {
confirmTitle: 'Delete Agent',
@@ -400,6 +430,7 @@ export default {
addNew: 'Add New Agent',
current: 'Current',
goToSettings: 'Settings',
sharedLabel: 'Shared',
},
// Built-in agent information
builtinInfo: {
@@ -1011,6 +1042,7 @@ export default {
knowledgeBase: 'Knowledge Base',
knowledgeBaseWithCount: 'Knowledge Base ({count})',
notConfigured: 'Not configured',
sharedAgentModelLabel: 'Model from shared agent',
model: 'Model',
remote: 'Remote',
noModel: 'No available models',
@@ -2376,6 +2408,7 @@ export default {
preview: 'Preview & Join',
memberCount: '{count} members',
shareCount: '{count} shared knowledge bases',
agentShareCount: '{count} agents',
alreadyMember: 'You are already a member of this space',
invalidCode: 'Invalid invite code',
byInviteCode: 'Enter invite code',
@@ -2401,6 +2434,7 @@ export default {
previewFailed: 'Preview failed, please try again',
members: 'Members',
knowledgeBases: 'Knowledge Bases',
agents: 'Agents',
alreadyMember: 'You are already a member of this space',
confirmJoin: 'Confirm Join',
submitRequest: 'Request to Join',
@@ -2472,6 +2506,10 @@ export default {
sharedDesc: 'View all knowledge bases shared to this space',
noSharedKB: 'No shared knowledge bases yet',
noSharedKBTip: 'Knowledge base owners can share their knowledge bases to this space in KB settings',
sharedAgents: 'Shared Agents',
noSharedAgents: 'No shared agents yet',
sharedAgentsDesc: 'Agents shared to this space; members can use them in chat',
noSharedAgentsTip: 'Admins can share agents to this space from agent settings',
sharePermissionLabel: 'Space permission',
myPermissionLabel: 'My actual permission',
permissionCalcFormula: 'Space permission is what was set when the KB was shared to this space; my actual permission = min(space permission, my role in this space)',
@@ -2490,6 +2528,7 @@ export default {
remainingValidityExpired: 'Expired',
removeShareFromOrg: 'Remove from space',
removeShareConfirm: 'Remove "{name}" from this space? Members will no longer have access to this knowledge base.',
removeAgentShareConfirm: 'Remove "{name}" from this space? Members will no longer have access to this agent.',
removeShareSuccess: 'Removed from space',
removeShareFailed: 'Failed to remove, please try again',
requireApproval: 'Require Approval',
@@ -2587,13 +2626,20 @@ export default {
unshareSuccess: 'Share cancelled',
unshareFailed: 'Failed to cancel share',
sharedTo: 'Shared to',
noShares: 'This knowledge base has not been shared to any space',
noShares: 'Not shared to any space yet',
sharedKnowledgeBase: 'Shared Knowledge Base',
shareToSpace: 'Share to space',
shareModelToSpace: 'Share "{name}" to space',
shareAgentToSpace: 'Share "{name}" to space',
modelShareDesc: 'Share this model to a space so members can use it',
agentShareDesc: 'Share this agent to a space so members can use it',
spaceAgentShareCountTip: 'Number of agents shared to this space',
sharedFrom: 'From',
sharedBadge: 'Shared',
permissionReadonly: 'Read-only',
permissionEditable: 'Editable',
sharedKBs: ' knowledge bases',
sharedAgents: ' agents',
},
},
}
+1
View File
@@ -1557,6 +1557,7 @@ export default {
knowledgeBase: "지식베이스",
knowledgeBaseWithCount: "지식베이스({count})",
notConfigured: "구성되지 않음",
sharedAgentModelLabel: "공유 에이전트에 구성된 모델",
model: "모델",
remote: "원격",
noModel: "사용 가능한 모델 없음",
+1
View File
@@ -1801,6 +1801,7 @@ export default {
knowledgeBase: 'База знаний',
knowledgeBaseWithCount: 'База знаний ({count})',
notConfigured: 'Не настроено',
sharedAgentModelLabel: 'Модель из общего агента',
model: 'Модель',
remote: 'Удалённая',
noModel: 'Нет доступных моделей',
+49 -3
View File
@@ -799,9 +799,39 @@ export default {
mcp: "支持MCP服务",
multiTurn: "多轮对话",
},
tabs: {
all: "全部",
mine: "我的智能体",
sharedToMe: "共享给我",
},
empty: {
title: "暂无自定义智能体",
description: "点击右上角按钮创建您的第一个智能体",
sharedTitle: "暂无共享智能体",
sharedDescription: "您可以加入空间或请求他人将智能体共享给您",
},
detail: {
title: "智能体详情",
useInChat: "在对话中使用",
},
shareScope: {
title: "共享范围说明",
desc: "空间成员以只读方式使用该智能体,将遵循您当前配置的能力与资源;您对智能体的修改会同步给已共享的空间。如需允许空间成员编辑知识库内容,请将知识库共享到空间。",
knowledgeBase: "知识库",
chatModel: "对话模型",
rerankModel: "重排模型",
webSearch: "网络搜索",
mcp: "MCP 服务",
kbAll: "全部知识库",
kbSelected: "指定 {count} 个知识库",
kbNone: "不使用",
modelConfigured: "已配置",
modelNotSet: "未配置",
enabled: "开启",
disabled: "关闭",
mcpAll: "全部服务",
mcpSelected: "指定 {count} 个服务",
mcpNone: "不使用",
},
delete: {
confirmTitle: "删除智能体",
@@ -938,6 +968,7 @@ export default {
addNew: "添加新智能体",
current: "当前",
goToSettings: "设置",
sharedLabel: "共享",
},
// 内置智能体信息
builtinInfo: {
@@ -1820,6 +1851,7 @@ export default {
knowledgeBase: "知识库",
knowledgeBaseWithCount: "知识库({count})",
notConfigured: "未配置",
sharedAgentModelLabel: "共享智能体配置的模型",
model: "模型",
remote: "远程",
noModel: "暂无可用模型",
@@ -2381,6 +2413,7 @@ export default {
preview: "预览并加入",
memberCount: "{count} 名成员",
shareCount: "{count} 个共享知识库",
agentShareCount: "{count} 个智能体",
alreadyMember: "您已经是该空间的成员",
invalidCode: "无效的邀请码",
byInviteCode: "输入邀请码",
@@ -2406,6 +2439,7 @@ export default {
previewFailed: "预览失败,请稍后重试",
members: "成员",
knowledgeBases: "知识库",
agents: "智能体",
alreadyMember: "您已经是该空间的成员",
confirmJoin: "确认加入",
submitRequest: "申请加入",
@@ -2477,6 +2511,10 @@ export default {
sharedDesc: "查看共享到此空间的所有知识库",
noSharedKB: "暂无共享的知识库",
noSharedKBTip: "知识库拥有者可以在知识库设置中将其共享到此空间",
sharedAgents: "共享智能体",
noSharedAgents: "暂无共享的智能体",
sharedAgentsDesc: "已共享到本空间的智能体,成员可在对话中使用",
noSharedAgentsTip: "管理员可将智能体从智能体设置中共享到本空间",
sharePermissionLabel: "空间权限",
myPermissionLabel: "我的实际权限",
permissionCalcFormula: "空间权限为共享时给该空间设定的权限;我的实际权限 = min(空间权限, 我在本空间的角色)",
@@ -2495,6 +2533,7 @@ export default {
remainingValidityExpired: "已过期",
removeShareFromOrg: "从空间中移除",
removeShareConfirm: "确定将「{name}」从本空间中移除?移除后空间成员将无法再访问该知识库。",
removeAgentShareConfirm: "确定将「{name}」从本空间中移除?移除后空间成员将无法再访问该智能体。",
removeShareSuccess: "已从空间中移除",
removeShareFailed: "移除失败,请重试",
requireApproval: "需要审核",
@@ -2582,23 +2621,30 @@ export default {
},
},
share: {
title: "共享知识库",
title: "共享到空间",
shareToSpace: "共享到空间",
shareModelToSpace: "共享「{name}」到空间",
shareAgentToSpace: "共享「{name}」到空间",
modelShareDesc: "将模型共享到空间,空间成员可使用该模型",
agentShareDesc: "将智能体共享到空间,空间成员可使用该智能体",
spaceAgentShareCountTip: "该空间的共享智能体数量",
selectOrg: "选择空间",
selectOrgPlaceholder: "请选择要共享的空间",
permission: "权限",
permissionTip: "可编辑权限允许成员修改知识库内容,只读权限仅允许检索和问答",
shareSuccess: "知识库已共享",
shareSuccess: "已共享",
shareFailed: "共享失败",
unshareSuccess: "已取消共享",
unshareFailed: "取消共享失败",
sharedTo: "已共享到",
noShares: "该知识库尚未共享到任何空间",
noShares: "尚未共享到任何空间",
sharedKnowledgeBase: "共享知识库",
sharedFrom: "来自",
sharedBadge: "共享",
permissionReadonly: "只读",
permissionEditable: "可编辑",
sharedKBs: "个知识库",
sharedAgents: "个智能体",
},
},
};