From 0a8d824124feecee81ff5f6dfd6f22300453a82a Mon Sep 17 00:00:00 2001 From: manjunath22466 <301209272+manjunath22466@users.noreply.github.com> Date: Tue, 3 Nov 2026 22:34:21 +0530 Subject: [PATCH] fix(voice): keep a stopped round's actions and follow-up memory A reply stopped partway through a round now keeps the actions that ran, answering the calls it never reached as skipped, so the history stays paired for both providers. A failed typed turn no longer resets the pointer, referents and follow-up memory, since its conversation continues. The server now tells a rejected key (401, or Gemini's 400 with reason API_KEY_INVALID, matched exactly), denied access (403) and an account out of credit (OpenAI's 429 insufficient_quota) apart; each cools down for a minute and gets its own message in the chat. --- SECURITY.md | 2 +- docs/CURRENT-STATE.md | 10 ++-- server/providers/common/textChat.js | 43 ++++++++++++----- src/i18n/locales/ar.json | 4 +- src/i18n/locales/de.json | 4 +- src/i18n/locales/es.json | 4 +- src/i18n/locales/fr.json | 4 +- src/i18n/locales/it.json | 4 +- src/i18n/locales/ja.json | 4 +- src/i18n/locales/pt.json | 4 +- src/i18n/locales/ru.json | 4 +- src/i18n/locales/uk.json | 4 +- src/i18n/locales/zh-CN.json | 4 +- src/i18n/locales/zh-Hant.json | 4 +- src/textChatServer.test.mjs | 37 +++++++++++++++ src/voice/panel/host.test.mjs | 18 ++++++++ src/voice/sessionCommands.js | 7 ++- src/voice/textChat.js | 71 +++++++++++++++++++---------- src/voice/textChat.test.mjs | 57 +++++++++++++++++++++++ 19 files changed, 238 insertions(+), 51 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index a749fd439..6b248ddef 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -85,7 +85,7 @@ The data proxies under `server/providers/` are written so the browser cannot tur Allowing `maps.googleapis.com` in `script-src` also trusts its JSONP endpoints, which can bypass the script allowlist if an HTML-injection bug exists; this is an accepted limitation of loading the Maps JavaScript API, alongside the existing `'unsafe-eval'` allowance. - **Full Content-Security-Policy.** The dev and preview servers send a real CSP (`script-src 'self' 'unsafe-eval' blob:` plus the YouTube, Facebook and X scripts the Nepal event's embedded media loads, with a matching `frame-src` for their players and posts: no inline script and no other script origin; `blob:` covers the object URLs Cesium's bundled workers bootstrap through in the built app), alongside the existing `X-Frame-Options: DENY` and `frame-ancestors 'none'`. `'unsafe-eval'` stays because Knockout, bundled inside Cesium's widgets package, resolves the global object with `eval` at load time and the globe does not initialize without it; styles permit `'unsafe-inline'` and Google Fonts because Vite's dev client injects `