File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,7 @@ async def run_interactively(
9696 if event .content and event .content .parts :
9797 if text := '' .join (part .text or '' for part in event .content .parts ):
9898 click .echo (f'[{ event .author } ]: { text } ' )
99+ await runner .close ()
99100
100101
101102async def run_cli (
@@ -145,7 +146,7 @@ async def run_cli(
145146 input_path = input_file ,
146147 )
147148 elif saved_session_file :
148- with open (saved_session_file , 'r' ) as f :
149+ with open (saved_session_file , 'r' , encoding = 'utf-8' ) as f :
149150 loaded_session = Session .model_validate_json (f .read ())
150151
151152 if loaded_session :
@@ -184,7 +185,7 @@ async def run_cli(
184185 user_id = session .user_id ,
185186 session_id = session .id ,
186187 )
187- with open (session_path , 'w' ) as f :
188+ with open (session_path , 'w' , encoding = 'utf-8' ) as f :
188189 f .write (session .model_dump_json (indent = 2 , exclude_none = True ))
189190
190191 print ('Session saved to' , session_path )
You can’t perform that action at this time.
0 commit comments