Skip to content

test pr#3

Open
Mohnish27-dev wants to merge 4 commits into
TECH_CHAOS_ANURAG_MISHRA_AI_Fixfrom
main
Open

test pr#3
Mohnish27-dev wants to merge 4 commits into
TECH_CHAOS_ANURAG_MISHRA_AI_Fixfrom
main

Conversation

@Mohnish27-dev

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI review requested due to automatic review settings July 2, 2026 08:10
@vercel

vercel Bot commented Jul 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
rag-chatbot Error Error Jul 2, 2026 8:10am

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the chat application and supporting scripts by reducing noisy logging, improving null-safety in the UI, and refactoring a data chunking script to use async filesystem APIs.

Changes:

  • Refactor scripts/chunkText.js to process files asynchronously via fs.promises.
  • Adjust client/server logging behavior and minor UI safety tweaks (e.g., optional chaining on session.user.name).
  • Minor auth/rate-limit helper adjustments and small code-style cleanups.

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
scripts/chunkText.js Switches chunk generation over ./data to async FS operations.
pages/chat.js Tweaks login error clearing, optional chaining for session name, and comments out some console logging.
pages/api/chat.js Removes some Gemini API response/error logging.
pages/api/auth/[...nextauth].js Comments out dotenv usage and reduces credential flow logging.
pages/_app.js Renames the custom App component to App and applies minor formatting.
lib/ratelimit.js Changes behavior for missing identifiers in checkRateLimit.
components/Navbar.js Adjusts JSX in the navbar (currently introduces stray semicolons).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread components/Navbar.js
<>
<span>Welcome, {session.user.name}</span>
<button onClick={() => signOut()}>Signout</button>
<button onClick={() => signOut()}>Signout</button>;
Comment thread components/Navbar.js
) :
(
<button onClick={() => signIn()}>Sign In</button>
<button onClick={() => signIn()}>Sign In</button>;
Comment thread pages/chat.js
Comment on lines 43 to +44
} catch (error) {
console.error("Error loading chat history:", error);
// console.error("Error loading chat history:", error);
Comment thread pages/chat.js
Comment on lines +231 to +232
} catch (error) {
// console.error("An error occurred:", error);
Comment thread scripts/chunkText.js
} No newline at end of file
}

processFiles();
Comment thread lib/ratelimit.js
*/
export async function checkRateLimit(identifier) {
if (!identifier) identifier = "anon";
if (!identifier) return { success: false, limit: 0, remaining: 0, reset: 0 };
import User from '../../../model/User';
import bcrypt from "bcryptjs";
import dotenv from "dotenv"
// import dotenv from "dotenv"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants