refactor(open-sse): DRY SSE primitives into utils/sseConstants.js
Gom SSE_DONE + SSE_HEADERS + SSE_HEADERS_NO_BUFFER vào 1 file không phụ thuộc (tránh kéo usageDb vào executor). Áp cho kiro, cursor, qoder, github, commandcode, perplexity-web, grok-web. Byte-for-byte verified (headers/DONE giữ nguyên; biến thể no-buffer dùng const riêng). Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
1 parent
0a8d92a6ba
commit
6ee4555821
9 files changed
+42
-25
No files matched your search
@@ -6,7 +6,10 @@ import { parseSSELine, hasValuableContent, fixInvalidId, formatSSE } from "./str
|
||||
import { getOpenAIResponsesEventName, isOpenAIResponsesTerminalEvent, formatIncompleteOpenAIResponsesStreamFailure } from "./responsesStreamHelpers.js";
|
||||
import { dbg, isDebugEnabled } from "./debugLog.js";
|
||||
|
||||
import { SSE_DONE, SSE_HEADERS, SSE_HEADERS_NO_BUFFER } from "./sseConstants.js";
|
||||
|
||||
export { COLORS, formatSSE };
|
||||
export { SSE_DONE, SSE_HEADERS, SSE_HEADERS_NO_BUFFER };
|
||||
|
||||
// sharedEncoder is stateless — safe to share across streams
|
||||
const sharedEncoder = new TextEncoder();
|
||||
|
||||
Reference in new issue
Block a user