@jeffreycao/copilot-api 1.9.5 → 1.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js CHANGED
@@ -44,7 +44,7 @@ bindElectronFetch();
44
44
  const { auth } = await import("./auth-CWEhhJYn.js");
45
45
  const { checkUsage } = await import("./check-usage-B5yr4fpk.js");
46
46
  const { debug } = await import("./debug-DcC7ZPH0.js");
47
- const { start } = await import("./start-DNhkQhQZ.js");
47
+ const { start } = await import("./start-CEjvjjF9.js");
48
48
  const main = defineCommand({
49
49
  meta: {
50
50
  name: "copilot-api",
@@ -3830,10 +3830,14 @@ const streamOpenAICompatibleProviderMessages = ({ c, payload, provider, upstream
3830
3830
  thinkingBlockOpen: false
3831
3831
  };
3832
3832
  for await (const chunk of events(upstreamResponse)) {
3833
- logger$3.debug("provider.messages.openai_compatible.raw_stream_event:", {
3834
- data: chunk.data,
3835
- event: chunk.event
3836
- });
3833
+ logger$3.debug("provider.messages.openai_compatible.raw_stream_event:", chunk.data);
3834
+ if (chunk.event === "ping") {
3835
+ await stream.writeSSE({
3836
+ event: "ping",
3837
+ data: "{\"type\":\"ping\"}"
3838
+ });
3839
+ continue;
3840
+ }
3837
3841
  if (!chunk.data || chunk.data === "[DONE]") {
3838
3842
  if (chunk.data === "[DONE]") break;
3839
3843
  continue;
@@ -4237,4 +4241,4 @@ server.route("/:provider/v1/models", providerModelRoutes);
4237
4241
 
4238
4242
  //#endregion
4239
4243
  export { server };
4240
- //# sourceMappingURL=server-MKpxApyo.js.map
4244
+ //# sourceMappingURL=server-BiAUjFEP.js.map