Wire assistant to Gemini Flash and improve assistant UX, polls, files, and realtime flows#2
Open
website-deployer wants to merge 1 commit intomainfrom
Open
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
server.js, added model fallback (gemini-3.0-flash→gemini-2.5-flash→gemini-2.0-flash), context-aware prompts using recent room messages, mode-driven generation tuning (creative/balanced/concise), request timeout and graceful fallback to local replies, and kept existing poll/file/typing flows hardened with sanitization and size limits.public/chat.jsto add safe HTML escaping, improved connection-status UI, file upload handling, poll rendering and voting UI, assistant quick actions (assistantModeselector + ask flow), better compose behaviors (Enter/Shift+Enter, auto-resize), and typed-event handling for notifications and drafts.public/nexus-features.jsto provide a lightweight composer toolbar with character counter, message search/filter, draft restore, and a message observer; updatedpublic/styles.csswith new visual styles for assistant/system messages, polls, files, and an Apple/ChatGPT-inspired theme; and updatedviews/chat.htmlto include assistant controls and quick actions.utils/users.jsto sanitize inputs, dedupe on join, track status, and return consistent shapes for room lists.process.env.GEMINI_API_KEYwith the provided key used as a default fallback in this change, and generation calls remain tolerant (12s timeout) and non-blocking for the app when provider calls fail.Testing
node --check server.js && node --check public/chat.js && node --check public/nexus-features.js && node --check utils/users.jsand they completed successfully. (success)curl -sS http://127.0.0.1:3000/health, which returned a healthy JSON response. (success)/chat.htmland sent two distinct/aiprompts and captured a screenshot artifact, and observed that external Gemini requests returnedfetch failedin this environment so server fallback replies were used (script/run succeeded but external API timed out in this environment). (smoke test OK; external API exercised fallback)Codex Task