fix: separate clones for each closure to satisfy borrow checker
All checks were successful
BotServer CI/CD / build (push) Successful in 2m54s

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
This commit is contained in:
Rodrigo Rodriguez (Pragmatismo) 2026-04-12 14:26:31 -03:00
parent ff6f2200f0
commit e34481b7f8

View file

@ -70,8 +70,10 @@ pub fn add_suggestion_keyword(
let cache = state.cache.clone();
let cache2 = state.cache.clone();
let cache3 = state.cache.clone();
let cache4 = state.cache.clone();
let user_session2 = user_session.clone();
let user_session3 = user_session.clone();
let user_session4 = user_session.clone();
// ADD_SUGG_TOOL "tool_name" AS "button text" — single-token to avoid ADD conflicts
engine
@ -142,7 +144,7 @@ pub fn add_suggestion_keyword(
let context_name = context.eval_expression_tree(&inputs[0])?.to_string();
let button_text = context.eval_expression_tree(&inputs[1])?.to_string();
add_context_suggestion(cache3.as_ref(), &user_session3, &context_name, &button_text)?;
add_context_suggestion(cache4.as_ref(), &user_session4, &context_name, &button_text)?;
Ok(Dynamic::UNIT)
},