Update Nov 19th#114
Conversation
Comprehensive Markdown Rendering Pipeline with Math Support
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 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".
| 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"; | ||
|
|
There was a problem hiding this comment.
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 👍 / 👎.
| // 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'); |
There was a problem hiding this comment.
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 👍 / 👎.
Expose Prometheus metrics endpoint
removed invalid test cases
No description provided.