3636
3737import cecli .prompts .utils .system as prompts
3838from cecli import __version__ , models , urls , utils
39- from cecli .commands import Commands , SwitchCoder
39+ from cecli .commands import Commands , SwitchCoderSignal
4040from cecli .exceptions import LiteLLMExceptions
4141from cecli .helpers import coroutines
4242from cecli .helpers .profiler import TokenProfiler
@@ -1370,7 +1370,7 @@ async def _run_parallel(self, with_message=None, preproc=True):
13701370 if task .exception ():
13711371 raise task .exception ()
13721372
1373- except (SwitchCoder , SystemExit ):
1373+ except (SwitchCoderSignal , SystemExit ):
13741374 # Re-raise SwitchCoder to be handled by outer try block
13751375 raise
13761376 except KeyboardInterrupt :
@@ -1461,7 +1461,7 @@ async def input_task(self, preproc):
14611461 self .io .set_placeholder ("" )
14621462 self .keyboard_interrupt ()
14631463 await self .io .stop_task_streams ()
1464- except (SwitchCoder , SystemExit ):
1464+ except (SwitchCoderSignal , SystemExit ):
14651465 raise
14661466 except Exception as e :
14671467 if self .verbose or self .args .debug :
@@ -1496,7 +1496,7 @@ async def output_task(self, preproc):
14961496 if self .io .output_task .done ():
14971497 exception = self .io .output_task .exception ()
14981498 if exception :
1499- if isinstance (exception , SwitchCoder ):
1499+ if isinstance (exception , SwitchCoderSignal ):
15001500 await self .io .output_task
15011501 raise exception
15021502
@@ -1519,7 +1519,7 @@ async def output_task(self, preproc):
15191519 self .io .stop_spinner ()
15201520 self .keyboard_interrupt ()
15211521 await self .io .stop_task_streams ()
1522- except (SwitchCoder , SystemExit ):
1522+ except (SwitchCoderSignal , SystemExit ):
15231523 raise
15241524 except Exception as e :
15251525 if self .verbose or self .args .debug :
@@ -2138,7 +2138,7 @@ def warm_cache(self, chunks):
21382138 return
21392139
21402140 delay = 5 * 60 - 5
2141- delay = float (os .environ .get ("CECLICACHE_KEEPALIVE_DELAY " , delay ))
2141+ delay = float (os .environ .get ("CECLI_CACHE_KEEPALIVE_DELAY " , delay ))
21422142 self .next_cache_warm = time .time () + delay
21432143 self .warming_pings_left = self .num_cache_warming_pings
21442144 self .cache_warming_chunks = chunks
@@ -2741,7 +2741,7 @@ async def get_server_tools(server):
27412741 )
27422742 return (server .name , server_tools )
27432743 except Exception as e :
2744- if server .name != "unnamed-server" and server .name != "local_tools " :
2744+ if server .name != "unnamed-server" and server .name != "Local " :
27452745 self .io .tool_warning (f"Error initializing MCP server { server .name } : { e } " )
27462746 return None
27472747
0 commit comments