@@ -404,6 +404,51 @@
< / div >
< / div >
<!-- MCP XML 协议注入 ( 仅 antigravity 平台 ) -- >
< div v-if = "createForm.platform === 'antigravity'" class="border-t pt-4" >
< div class = "mb-1.5 flex items-center gap-1" >
< label class = "text-sm font-medium text-gray-700 dark:text-gray-300" >
{ { t ( 'admin.groups.mcpXml.title' ) } }
< / label >
< div class = "group relative inline-flex" >
< Icon
name = "questionCircle"
size = "sm"
:stroke-width = "2"
class = "cursor-help text-gray-400 transition-colors hover:text-primary-500 dark:text-gray-500 dark:hover:text-primary-400"
/ >
< div class = "pointer-events-none absolute bottom-full left-0 z-50 mb-2 w-72 opacity-0 transition-all duration-200 group-hover:pointer-events-auto group-hover:opacity-100" >
< div class = "rounded-lg bg-gray-900 p-3 text-white shadow-lg dark:bg-gray-800" >
< p class = "text-xs leading-relaxed text-gray-300" >
{ { t ( 'admin.groups.mcpXml.tooltip' ) } }
< / p >
< div class = "absolute -bottom-1.5 left-3 h-3 w-3 rotate-45 bg-gray-900 dark:bg-gray-800" > < / div >
< / div >
< / div >
< / div >
< / div >
< div class = "flex items-center gap-3" >
< button
type = "button"
@click ="createForm.mcp_xml_inject = !createForm.mcp_xml_inject"
: class = "[
'relative inline-flex h-6 w-11 items-center rounded-full transition-colors',
createForm.mcp_xml_inject ? 'bg-primary-500' : 'bg-gray-300 dark:bg-dark-600'
]"
>
< span
: class = "[
'inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform',
createForm.mcp_xml_inject ? 'translate-x-6' : 'translate-x-1'
]"
/ >
< / button >
< span class = "text-sm text-gray-500 dark:text-gray-400" >
{ { createForm . mcp _xml _inject ? t ( 'admin.groups.mcpXml.enabled' ) : t ( 'admin.groups.mcpXml.disabled' ) } }
< / span >
< / div >
< / div >
<!-- Claude Code 客户端限制 ( 仅 anthropic 平台 ) -- >
< div v-if = "createForm.platform === 'anthropic'" class="border-t pt-4" >
< div class = "mb-1.5 flex items-center gap-1" >
@@ -862,6 +907,51 @@
< / div >
< / div >
<!-- MCP XML 协议注入 ( 仅 antigravity 平台 ) -- >
< div v-if = "editForm.platform === 'antigravity'" class="border-t pt-4" >
< div class = "mb-1.5 flex items-center gap-1" >
< label class = "text-sm font-medium text-gray-700 dark:text-gray-300" >
{ { t ( 'admin.groups.mcpXml.title' ) } }
< / label >
< div class = "group relative inline-flex" >
< Icon
name = "questionCircle"
size = "sm"
:stroke-width = "2"
class = "cursor-help text-gray-400 transition-colors hover:text-primary-500 dark:text-gray-500 dark:hover:text-primary-400"
/ >
< div class = "pointer-events-none absolute bottom-full left-0 z-50 mb-2 w-72 opacity-0 transition-all duration-200 group-hover:pointer-events-auto group-hover:opacity-100" >
< div class = "rounded-lg bg-gray-900 p-3 text-white shadow-lg dark:bg-gray-800" >
< p class = "text-xs leading-relaxed text-gray-300" >
{ { t ( 'admin.groups.mcpXml.tooltip' ) } }
< / p >
< div class = "absolute -bottom-1.5 left-3 h-3 w-3 rotate-45 bg-gray-900 dark:bg-gray-800" > < / div >
< / div >
< / div >
< / div >
< / div >
< div class = "flex items-center gap-3" >
< button
type = "button"
@click ="editForm.mcp_xml_inject = !editForm.mcp_xml_inject"
: class = "[
'relative inline-flex h-6 w-11 items-center rounded-full transition-colors',
editForm.mcp_xml_inject ? 'bg-primary-500' : 'bg-gray-300 dark:bg-dark-600'
]"
>
< span
: class = "[
'inline-block h-4 w-4 transform rounded-full bg-white shadow transition-transform',
editForm.mcp_xml_inject ? 'translate-x-6' : 'translate-x-1'
]"
/ >
< / button >
< span class = "text-sm text-gray-500 dark:text-gray-400" >
{ { editForm . mcp _xml _inject ? t ( 'admin.groups.mcpXml.enabled' ) : t ( 'admin.groups.mcpXml.disabled' ) } }
< / span >
< / div >
< / div >
<!-- Claude Code 客户端限制 ( 仅 anthropic 平台 ) -- >
< div v-if = "editForm.platform === 'anthropic'" class="border-t pt-4" >
< div class = "mb-1.5 flex items-center gap-1" >
@@ -1311,7 +1401,8 @@ const createForm = reactive({
fallback _group _id : null as number | null ,
fallback _group _id _on _invalid _request : null as number | null ,
// 模型路由开关
model _routing _enabled : false
model _routing _enabled : false ,
mcp _xml _inject : true
} )
// 简单账号类型(用于模型路由选择)
@@ -1483,7 +1574,8 @@ const editForm = reactive({
fallback _group _id : null as number | null ,
fallback _group _id _on _invalid _request : null as number | null ,
// 模型路由开关
model _routing _enabled : false
model _routing _enabled : false ,
mcp _xml _inject : true
} )
// 根据分组类型返回不同的删除确认消息
@@ -1566,6 +1658,7 @@ const closeCreateModal = () => {
createForm . claude _code _only = false
createForm . fallback _group _id = null
createForm . fallback _group _id _on _invalid _request = null
createForm . mcp _xml _inject = true
createModelRoutingRules . value = [ ]
}
@@ -1617,6 +1710,7 @@ const handleEdit = async (group: Group) => {
editForm . fallback _group _id = group . fallback _group _id
editForm . fallback _group _id _on _invalid _request = group . fallback _group _id _on _invalid _request
editForm . model _routing _enabled = group . model _routing _enabled || false
editForm . mcp _xml _inject = group . mcp _xml _inject ? ? true
// 加载模型路由规则(异步加载账号名称)
editModelRoutingRules . value = await convertApiFormatToRoutingRules ( group . model _routing )
showEditModal . value = true