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):
80
80
run_code = self .auto_run
81
81
82
82
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
88
89
89
90
if self .stop_event .is_set ():
90
91
return
@@ -101,6 +102,10 @@ def respond(self, run_code=None):
101
102
102
103
self .output_queue .sync_q .put (chunk )
103
104
105
+ if chunk ["type" ] == "confirmation" :
106
+ if not run_code :
107
+ break
108
+
104
109
self .output_queue .sync_q .put (
105
110
{"role" : "server" , "type" : "status" , "content" : "complete" }
106
111
)
You can’t perform that action at this time.
0 commit comments