This commit is contained in:
waleed
2026-02-18 23:29:53 -08:00
parent a42a62005e
commit 3c1c366202

View File

@@ -492,16 +492,19 @@ Return ONLY the expand expression - no $expand= prefix, no explanations.`,
}
// Map block subBlock IDs to tool param names where they differ
if (rest.searchEntities) {
if (operation === 'search' && rest.searchEntities) {
cleanParams.entities = rest.searchEntities
rest.searchEntities = undefined
}
if (rest.functionParameters) {
if (operation === 'execute_function' && rest.functionParameters) {
cleanParams.parameters = rest.functionParameters
rest.functionParameters = undefined
// Prevent stale action parameters from overwriting mapped function parameters
rest.parameters = undefined
}
// Always clean up mapped subBlock IDs so they don't leak through the loop below
rest.searchEntities = undefined
rest.functionParameters = undefined
Object.entries(rest).forEach(([key, value]) => {
if (value !== undefined && value !== null && value !== '') {