fix(Inputbar): Solve the problem that the initial state of assistant mcpServers is empty, and can not get enable mcp servers.
This commit is contained in:
parent
aed9c04c20
commit
06c730aaf6
@ -182,9 +182,9 @@ const Inputbar: FC<Props> = ({ assistant: _assistant, setActiveTopic, topic }) =
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isFunctionCallingModel(model)) {
|
if (isFunctionCallingModel(model)) {
|
||||||
if (!isEmpty(assistant.mcpServers) && !isEmpty(activedMcpServers)) {
|
if (!isEmpty(enabledMCPs) && !isEmpty(activedMcpServers)) {
|
||||||
userMessage.enabledMCPs = activedMcpServers.filter((server) =>
|
userMessage.enabledMCPs = activedMcpServers.filter((server) =>
|
||||||
assistant.mcpServers?.some((s) => s.id === server.id)
|
enabledMCPs?.some((s) => s.id === server.id)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user