From e2d1b192167c2ffa3826194512beda9ce634a60f Mon Sep 17 00:00:00 2001 From: zenobit Date: Wed, 1 Apr 2026 01:17:25 +0200 Subject: [PATCH] fix: resolve typecheck error and add missing hi translations --- open-sse/handlers/responseTranslator.ts | 5 +++-- src/i18n/messages/hi.json | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/open-sse/handlers/responseTranslator.ts b/open-sse/handlers/responseTranslator.ts index ef2fe7d3df..daa687b90a 100644 --- a/open-sse/handlers/responseTranslator.ts +++ b/open-sse/handlers/responseTranslator.ts @@ -402,12 +402,13 @@ export function translateNonStreamingResponse( * Helper to convert an OpenAI chat.completion JSON object to Claude format for non-streaming. */ function convertOpenAINonStreamingToClaude(openaiResponse: JsonRecord): JsonRecord { - const isChoicesArray = Array.isArray(openaiResponse.choices); + const choices = openaiResponse.choices as unknown[] | undefined; + const isChoicesArray = Array.isArray(choices); if (!isChoicesArray && openaiResponse.object !== "chat.completion") { return openaiResponse; // If it doesn't look like OpenAI, return as-is } - const choice = isChoicesArray ? openaiResponse.choices[0] : null; + const choice = isChoicesArray ? choices[0] : null; const choiceObj = choice ? toRecord(choice) : {}; const messageObj = choiceObj.message ? toRecord(choiceObj.message) : {}; diff --git a/src/i18n/messages/hi.json b/src/i18n/messages/hi.json index 588d0e0a2d..8a0a45e5ec 100644 --- a/src/i18n/messages/hi.json +++ b/src/i18n/messages/hi.json @@ -2512,7 +2512,8 @@ "waitingForIFlowAuthorization": "Waiting for iFlow authorization...", "waitingForAntigravityAuthorization": "Waiting for Antigravity authorization...", "Authorization": "Authorization", - "exchangingCodeForTokens": "Exchanging code for tokens..." + "exchangingCodeForTokens": "Exchanging code for tokens...", + "waitingForQoderAuthorization": "Waiting for Qoder authorization..." }, "landing": { "brandName": "ओम्निरूट",