File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -80,11 +80,12 @@ def respond(self, run_code=None):
8080 run_code = self .auto_run
8181
8282 for chunk in self ._respond_and_store ():
83- if chunk ["type" ] == "confirmation" :
84- if run_code :
85- continue # We don't need to send out confirmation chunks on the server. I don't even like them.
86- else :
87- break
83+ # To preserve confirmation chunks, we add this to the bottom instead
84+ # if chunk["type"] == "confirmation":
85+ # if run_code:
86+ # continue
87+ # else:
88+ # break
8889
8990 if self .stop_event .is_set ():
9091 return
@@ -101,6 +102,10 @@ def respond(self, run_code=None):
101102
102103 self .output_queue .sync_q .put (chunk )
103104
105+ if chunk ["type" ] == "confirmation" :
106+ if not run_code :
107+ break
108+
104109 self .output_queue .sync_q .put (
105110 {"role" : "server" , "type" : "status" , "content" : "complete" }
106111 )
You can’t perform that action at this time.
0 commit comments