Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a new types file open-sse/utils/stream/types.ts containing various type definitions for SSE streaming, including SSEStreamContext and StreamOptions. Feedback was provided regarding unused imports and a missing import for initState which would cause TypeScript compilation errors.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
| import { convertOpenAIToResponsesToolCall } from "../handlers/responseTranslator.ts"; | ||
| import { v4 as uuidv4 } from "uuid"; |
There was a problem hiding this comment.
The imports on lines 1 and 2 are unused in this file. Additionally, convertOpenAIToResponsesToolCall is not exported by ../handlers/responseTranslator.ts, and TranslateState (line 45) references initState which is not imported or defined in this file. This will cause TypeScript compilation errors.\n\nRemove the unused imports and import initState from ../stream.ts instead.
| import { convertOpenAIToResponsesToolCall } from "../handlers/responseTranslator.ts"; | |
| import { v4 as uuidv4 } from "uuid"; | |
| import { initState } from "../stream.ts"; |
Part of Issue cheaper-inference#3594 modularization. Extracted type definitions from the monolithic stream.ts into a dedicated module. Types exported: - StreamOptions, StreamLogger, StreamCompletePayload, StreamFailurePayload - TranslateState, ToolCall, UsageTokenRecord - SSEStreamContext, JsonRecord
Fixes TypeScript error: TranslateState references initState without import.
|
Thanks, @oyi77 🙏. These stream extractions are currently additive — the new modules under |
Part of modularization effort (Issue #3594).
Extracts type definitions from the monolithic
open-sse/utils/stream.tsinto a dedicated module.Changes:
open-sse/utils/stream/types.ts(138 lines)StreamOptions,StreamLogger,StreamCompletePayload,StreamFailurePayload,TranslateState,ToolCall,UsageTokenRecord,SSEStreamContext,JsonRecordTesting: No behavior change - types only. Existing stream tests pass.
Follow-up PRs will extract: utils, errors, textualToolCalls, sseFormatters, openaiChunks, claudeLifecycle, responsesLifecycle, and streamCore.