Skip to content

Update Nov 19th#114

Merged
Deodat-Lawson merged 10 commits intostablefrom
main
Dec 5, 2025
Merged

Update Nov 19th#114
Deodat-Lawson merged 10 commits intostablefrom
main

Conversation

@Deodat-Lawson
Copy link
Copy Markdown
Owner

No description provided.

@vercel
Copy link
Copy Markdown

vercel Bot commented Nov 19, 2025

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

Project Deployment Preview Comments Updated (UTC)
pdr-ai-v2 Ready Ready Preview Comment Dec 5, 2025 2:57pm

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +3 to +10
import React from "react";
import ReactMarkdown from "react-markdown";
import remarkGfm from "remark-gfm";
import remarkMath from "remark-math";
import rehypeKatex from "rehype-katex";
import clsx from "clsx";
import "katex/dist/katex.min.css";

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Import KaTeX global CSS from client component

The new MarkdownMessage component imports "katex/dist/katex.min.css" directly inside a client component. Next.js only allows global CSS imports from the root layout/page entry points; importing it from an arbitrary component triggers a build‑time error (“Global CSS cannot be imported from files other than …/layout.tsx”). Move this CSS import to the app layout or a global stylesheet that is loaded once rather than from the component.

Useful? React with 👍 / 👎.

Comment on lines +534 to +544
// Debug logging: Print raw AI response to terminal
console.log('\n=== RAW AI RESPONSE (before normalization) ===');
console.log(JSON.stringify(summarizedAnswerMessage.content, null, 2));
console.log('=== END RAW AI RESPONSE ===\n');

const summarizedAnswer = normalizeModelContent(summarizedAnswerMessage.content);

// Debug logging: Print normalized response
console.log('\n=== NORMALIZED RESPONSE (after conversion) ===');
console.log(summarizedAnswer);
console.log('=== END NORMALIZED RESPONSE ===\n');
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P1 Badge Remove unconditional logging of AI responses

The API route now logs the entire model response before and after normalization for every request. These logs will contain user questions and retrieved document text, which may include sensitive or proprietary data, and they will be emitted in production because there is no environment guard. This is likely unintended debug output and can leak PII and bloat server logs. Consider removing these console.log calls or gating them behind an explicit debug flag.

Useful? React with 👍 / 👎.

@Deodat-Lawson Deodat-Lawson merged commit 5c24224 into stable Dec 5, 2025
5 checks passed
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.

3 participants