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(
96
96
if event .content and event .content .parts :
97
97
if text := '' .join (part .text or '' for part in event .content .parts ):
98
98
click .echo (f'[{ event .author } ]: { text } ' )
99
+ await runner .close ()
99
100
100
101
101
102
async def run_cli (
@@ -145,7 +146,7 @@ async def run_cli(
145
146
input_path = input_file ,
146
147
)
147
148
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 :
149
150
loaded_session = Session .model_validate_json (f .read ())
150
151
151
152
if loaded_session :
@@ -184,7 +185,7 @@ async def run_cli(
184
185
user_id = session .user_id ,
185
186
session_id = session .id ,
186
187
)
187
- with open (session_path , 'w' ) as f :
188
+ with open (session_path , 'w' , encoding = 'utf-8' ) as f :
188
189
f .write (session .model_dump_json (indent = 2 , exclude_none = True ))
189
190
190
191
print ('Session saved to' , session_path )
You can’t perform that action at this time.
0 commit comments