Skip to content

Commit 7906180

Browse files
committed
make mark terminated sync instead of async (#28)
1 parent ff77437 commit 7906180

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vocode/streaming/streaming_conversation.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ async def process(self, item: InterruptibleAgentResponseEvent[AgentResponse]):
421421
if self.last_agent_response_tracker is not None:
422422
await self.last_agent_response_tracker.wait()
423423
item.agent_response_tracker.set()
424-
await self.conversation.mark_terminated(bot_disconnect=True)
424+
self.conversation.mark_terminated(bot_disconnect=True)
425425
return
426426

427427
agent_response_message = typing.cast(AgentResponseMessage, agent_response)
@@ -747,7 +747,7 @@ async def send_initial_message(
747747

748748
async def action_on_idle(self):
749749
logger.debug("Conversation idle for too long, terminating")
750-
await self.mark_terminated(bot_disconnect=True)
750+
self.mark_terminated(bot_disconnect=True)
751751
return
752752

753753
async def check_for_idle(self):
@@ -961,11 +961,11 @@ async def get_chunks(
961961
synthesis_result.synthesis_total_span.finish()
962962
return message_sent, cut_off
963963

964-
async def mark_terminated(self, bot_disconnect: bool = False):
964+
def mark_terminated(self, bot_disconnect: bool = False):
965965
self.active = False
966966

967967
async def terminate(self):
968-
await self.mark_terminated()
968+
self.mark_terminated()
969969
self.broadcast_interrupt()
970970
self.events_manager.publish_event(
971971
TranscriptCompleteEvent(

0 commit comments

Comments
 (0)