mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
fix: enhance mcp_source logic in McpServersDialog
--bug=1060762 --user=刘瑞斌 【应用】v2.0.2版本已存在的应用的MCP,升级版本后,编辑界面,MCP回显错误 https://www.tapd.cn/62980211/s/1760254
This commit is contained in:
parent
925cedec28
commit
b6919c34f8
|
|
@ -145,7 +145,15 @@ function mcpSourceChange() {
|
|||
|
||||
const open = (data: any, selectOptions: any) => {
|
||||
form.value = {...form.value, ...data}
|
||||
form.value.mcp_source = data.mcp_source || 'referencing'
|
||||
if (data.mcp_servers) {
|
||||
form.value.mcp_source = 'custom'
|
||||
} else if (data.mcp_tool_id) {
|
||||
form.value.mcp_source = 'referencing'
|
||||
form.value.mcp_tool_id = data.mcp_tool_id
|
||||
form.value.mcp_servers = ''
|
||||
} else {
|
||||
form.value.mcp_source = data.mcp_source || 'referencing'
|
||||
}
|
||||
dialogVisible.value = true
|
||||
mcpToolSelectOptions.value = selectOptions || []
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue