Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 6419998

Browse files
committed
Fix missing secret message issue
1 parent ff4a3a7 commit 6419998

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/codegate/providers/copilot/provider.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -754,12 +754,12 @@ def connection_made(self, transport: asyncio.Transport) -> None:
754754
logger.debug(f"Connection established to target: {transport.get_extra_info('peername')}")
755755
self.proxy.target_transport = transport
756756

757-
def _ensure_output_processor(self) -> None:
757+
def _ensure_output_processor(self, reinitialize=False) -> None:
758758
if self.proxy.context_tracking is None:
759759
# No context tracking, no need to process pipeline
760760
return
761761

762-
if self.sse_processor is not None:
762+
if (self.sse_processor is not None) and (not reinitialize):
763763
# Already initialized, no need to reinitialize
764764
return
765765

@@ -862,6 +862,8 @@ def finish_data(self):
862862
self.finish_stream = False
863863
self.headers_sent = False
864864

865+
self._ensure_output_processor(reinitialize=True)
866+
865867
def _process_chunk(self, chunk: bytes):
866868
# For debugging only
867869
# print("===========START DATA RECVD====================")

0 commit comments

Comments
 (0)