From ebae87eaadebdc847a20a2b55f37aa3a98ac0b54 Mon Sep 17 00:00:00 2001 From: askdevai-bot Date: Sun, 1 Jun 2025 21:22:39 -0400 Subject: [PATCH 1/2] Add Smolagents memory compatibility to .DS_Store --- .DS_Store | Bin 0 -> 6148 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..bcdaabe739fb9c7522c0ba770746e2d9bfae4097 GIT binary patch literal 6148 zcmeHKO-sW-5S?wSCKRCu1&<3}i`Ldpyu_*puSWEsQWINhFlMDqEm8_O>mTx$_;++> zcPmQkQL!=uvv0CHFWI~eyBPow^p|z7u1=JS!%-ZBr%|ilC@t)(Bn_gZ)zO5g*}{~IvnXk* zeqHsFW><54GvK(c+bAs!2Gy;NvaD@ahGjX}saDEzy|y_Vy3XSA>h5vlHoi;Llb$;W z{8qKiTO7eN1{1V+@HFIFhmknaqGvHPh$CpiP!SDP*b+k+I`&JO=UL1Q8afDDd(kXu%O75J(E)qZFtI{y#9um5!tH>?0F@IMt0g#-Vfj_+pA*0Hyw vvsR*Cp_5TwX7Gc8fj){cmyY5kbZyu#DM0irW(Khbjei8R4BW5+zpB7H%}-k5 literal 0 HcmV?d00001 From 1aa3012101ecc95a937eae6a0a4806ad51d4b38f Mon Sep 17 00:00:00 2001 From: askdevai-bot Date: Sun, 1 Jun 2025 21:22:40 -0400 Subject: [PATCH 2/2] Add Smolagents memory compatibility to tinyagent/mcp_client.py --- tinyagent/mcp_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tinyagent/mcp_client.py b/tinyagent/mcp_client.py index eb1919f..e4fab50 100644 --- a/tinyagent/mcp_client.py +++ b/tinyagent/mcp_client.py @@ -109,11 +109,11 @@ async def close(self): if self.exit_stack: try: await self.exit_stack.aclose() - except (RuntimeError, asyncio.CancelledError) as e: - # Log the error but don't re-raise it + except Exception as e: + # Log any cleanup error (including cancel-scope mismatches) but don’t re-raise self.logger.error(f"Error during client cleanup: {e}") finally: - # Always reset these regardless of success or failure + # Reset client state unconditionally self.session = None self.exit_stack = AsyncExitStack()