fix: enhance mcp_source logic in McpServersDialog
--bug=1060762 --user=刘瑞斌 【应用】v2.0.2版本已存在的应用的MCP,升级版本后,编辑界面,MCP回显错误 https://www.tapd.cn/62980211/s/1760254v3.2
parent
925cedec28
commit
b6919c34f8
|
|
@ -145,7 +145,15 @@ function mcpSourceChange() {
|
||||||
|
|
||||||
const open = (data: any, selectOptions: any) => {
|
const open = (data: any, selectOptions: any) => {
|
||||||
form.value = {...form.value, ...data}
|
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
|
dialogVisible.value = true
|
||||||
mcpToolSelectOptions.value = selectOptions || []
|
mcpToolSelectOptions.value = selectOptions || []
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue