claude-codex-proxy 1.0.5-beta.27 → 1.0.5-beta.28
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/package.json +1 -1
- package/src/middleware/sse.js +4 -2
package/package.json
CHANGED
package/src/middleware/sse.js
CHANGED
|
@@ -20,7 +20,7 @@ function stopSSEHeartbeat(res, deleteState = false) {
|
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
/**
|
|
23
|
-
* Sets the standard SSE response headers, flushes them, and starts
|
|
23
|
+
* Sets the standard SSE response headers, flushes them, and starts comment heartbeats.
|
|
24
24
|
* @param {import('express').Response} res
|
|
25
25
|
* @param {number} heartbeatIntervalMs
|
|
26
26
|
*/
|
|
@@ -38,7 +38,9 @@ export function initSSEResponse(res, heartbeatIntervalMs = SSE_HEARTBEAT_INTERVA
|
|
|
38
38
|
return;
|
|
39
39
|
}
|
|
40
40
|
try {
|
|
41
|
-
|
|
41
|
+
// SSE comments keep the transport alive without producing a model event
|
|
42
|
+
// that resets Claude Code's semantic stream-idle watchdog.
|
|
43
|
+
res.write(': keep-alive\n\n');
|
|
42
44
|
state.count++;
|
|
43
45
|
state.lastSentAt = Date.now();
|
|
44
46
|
} catch (error) {
|