Skip to content

Conversation

@USERNAME-STOCK
Copy link

@USERNAME-STOCK USERNAME-STOCK commented Nov 8, 2025

PR Type

Enhancement, Other


Description

  • Restructured all AI prompts with hybrid markdown + XML format for clarity and consistency

    • Selection tools (Explain, Translate, Summary, Polish, Code, Sentiment) completely rewritten with detailed instructions and structured outputs
    • GitHub analyzer prompts enhanced with separate issue/PR handlers and conventional commit support
    • Video summarizers (YouTube/Bilibili) upgraded with structured output templates
    • arXiv analyzer improved with research domain classification and methodology breakdown
    • Search engine handler enhanced with intent classification
    • System prompts for Chat/Completion/Custom APIs expanded with explicit capabilities and constraints
  • Simplified build process to Chrome-only with English locale only

    • Removed Firefox and Safari build outputs, keeping only Chromium
    • Disabled webpack concatenateModules for better debugging
    • Removed minimal build variants (without-katex-and-tiktoken)
    • Removed all non-English locales, keeping only English
    • Updated language configuration and browser detection utilities

Diagram Walkthrough

flowchart LR
  A["Old Simple Prompts"] -->|"Restructure with<br/>Markdown + XML"| B["Structured Prompts<br/>with Role/Task/Instructions"]
  B --> C["Better AI Responses<br/>& Consistency"]
  D["Multi-Platform<br/>Multi-Locale Build"] -->|"Simplify to<br/>Chrome + English"| E["Chrome-Only<br/>English Build"]
  E --> F["Faster Build Time<br/>Reduced Complexity"]
Loading

File Walkthrough

Relevant files
Enhancement
8 files
index.mjs
Rewrite selection tool prompts with structured format       
+471/-35
index.mjs
Enhance GitHub issue and PR analysis prompts                         
+164/-26
shared.mjs
Expand system prompts with detailed capabilities and guidelines
+140/-8 
index.jsx
Restructure search engine handler prompt with intent classification
+77/-7   
index.mjs
Upgrade arXiv paper analyzer with research domain classification
+71/-8   
index.mjs
Enhance page summarization prompt with content type identification
+82/-1   
index.mjs
Restructure YouTube video summarizer with structured output format
+60/-4   
index.mjs
Restructure Bilibili video summarizer with structured output format
+60/-4   
Configuration changes
5 files
build.mjs
Simplify build to Chrome-only with single output directory
+3/-25   
index.mjs
Remove multi-language support and set default model to English
+3/-4     
language.mjs
Simplify language list to English only                                     
+5/-10   
is-firefox.mjs
Hardcode Firefox detection to always return false               
+2/-1     
is-safari.mjs
Hardcode Safari detection to always return false                 
+2/-1     
Documentation
1 files
AGENTS.md
Update documentation to reflect Chrome-only build               
+5/-11   
Additional files
27 files
pre-release-build.yml +0/-18   
tagged-release.yml +0/-21   
README_IN.md +0/-140 
README_JA.md +0/-138 
README_TR.md +0/-141 
README_ZH.md +0/-143 
package.json +0/-1     
appdmg.json +0/-8     
build.sh +0/-13   
export-options.plist +0/-8     
project.patch +0/-2     
project.pre.patch +0/-18   
project_developer.patch +0/-196 
main.json +0/-163 
main.json +0/-163 
main.json +0/-163 
main.json +0/-163 
main.json +0/-163 
main.json +0/-163 
main.json +0/-163 
main.json +0/-163 
resources.mjs +0/-48   
main.json +0/-163 
main.json +0/-163 
main.json +0/-170 
main.json +0/-165 
manifest.v2.json +0/-90   

Summary by CodeRabbit

  • New Features

    • Enhanced AI system prompts with structured, role-based formats for improved consistency and clarity across tools.
  • Chores

    • Simplified distribution to Chrome-only build; Firefox and Safari variants removed.
    • Consolidated language support to English; removed additional language localizations.
    • Streamlined build process and CI/CD workflows.

…iled instructions

Upgraded all AI prompts throughout the extension to use a hybrid markdown + XML
structure with explicit role definitions, task descriptions, instructions, output
formats, and constraints. This provides better clarity and more consistent,
high-quality responses from AI models.

Changes:
- YouTube/Bilibili video summarizers: Added structured output format with
  overview, main topics, key takeaways, and important details sections
- GitHub analyzer: Separate improved prompts for issues/PRs and commits with
  conventional commit message format support
- arXiv paper analyzer: Added research domain classification, methodology
  breakdown, and relevance keywords
- Search engine handler: Enhanced with search intent classification and
  structured answer format
- Selection tools (Explain, Translate, Summary, Polish, Code, Sentiment):
  Complete rewrite with detailed instructions and structured outputs
- Menu tools: Improved page summarization with content type identification
- System prompts: Enhanced base prompts for Chat/Completion/Custom APIs with
  explicit capabilities, guidelines, and constraints

All prompts now include:
- Clear role and task definitions
- Step-by-step instructions
- Structured output format templates
- Explicit constraints to prevent hallucination
- Multi-language support where appropriate

This addresses the need for more reliable, structured AI responses across all
extension features.
…locale

Streamlined the build configuration to reduce complexity and build time:

Build Simplification:
- Removed Firefox build output (kept Chrome/Chromium only)
- Disabled webpack concatenateModules for better debugging
- Removed minimal build variants (without-katex-and-tiktoken)
- Removed Safari build script from package.json
- Build now produces single chromium/ output directory with full features

Locale Simplification:
- Removed all non-English locales (de, es, fr, in, it, ja, ko, pt, ru, tr, zh-hans, zh-hant)
- Kept only English (en) locale
- Updated languageList to only include auto and en
- Simplified getNavigatorLanguage() to always return 'en'
- Removed language-specific model defaults (Chinese → Moonshot)
- Updated resources.mjs to import only English translations

Documentation:
- Removed non-English README files (README_IN.md, README_JA.md, README_TR.md, README_ZH.md)
- Kept only main README.md

Benefits:
- Faster build times (single target, no variants)
- Smaller codebase (~13 locale directories removed)
- Easier maintenance (one browser target)
- Better debuggability (no concatenation)
- Clearer output structure

Build output: build/chromium/ and build/chromium.zip
Complete platform cleanup to streamline development for Chrome/Chromium only:

**Deleted Safari-related files:**
- safari/ directory (build scripts, patches, app-dmg config)

**Deleted Firefox-related files:**
- src/manifest.v2.json (Firefox manifest)

**Modified browser detection:**
- src/utils/is-safari.mjs - now always returns false
- src/utils/is-firefox.mjs - now always returns false

**Updated CI/CD workflows:**
- .github/workflows/pre-release-build.yml - removed Firefox build artifacts
- .github/workflows/tagged-release.yml - removed Safari and Firefox release uploads

**Updated documentation:**
- AGENTS.md - reflected Chrome-only build structure

This cleanup builds upon the previous localization and build simplification,
creating a focused Chrome-only development environment with faster builds
and reduced maintenance overhead.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 8, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The PR transforms the extension from a multi-platform, multi-language project to a Chrome-only, English-only build. It removes Safari and Firefox build infrastructure, deletes all non-English localization files, simplifies configuration to support only English, and restructures prompts across multiple modules to use consistent, detailed formatting.

Changes

Cohort / File(s) Summary
CI/CD Workflow Simplification
.github/workflows/pre-release-build.yml, .github/workflows/tagged-release.yml
Removed artifact upload steps for Firefox, Safari, and variant builds; retained only Chromium release uploads. Eliminated Safari build setup steps (Python, Xcode, SDK configuration). Simplified release workflow to single-platform targeting.
Safari Build Infrastructure
safari/build.sh, safari/appdmg.json, safari/export-options.plist, safari/project.patch, safari/project_developer.patch
Deleted entire Safari build orchestration, DMG configuration, Xcode export settings, and associated patch files. Removes multi-step macOS/iOS packaging workflow.
Build Configuration
build.mjs, package.json
Disabled concatenateModules optimization and removed Firefox output generation; removed "build:safari" npm script. Kept single Chromium build path.
Documentation Files
README_IN.md, README_JA.md, README_TR.md, README_ZH.md, AGENTS.md
Deleted Indonesian, Japanese, Turkish, and Chinese README files. Updated AGENTS.md to reflect Chrome-only build with multi-platform variants removed.
Localization Resources
src/_locales/de/main.json, src/_locales/es/main.json, src/_locales/fr/main.json, src/_locales/in/main.json, src/_locales/it/main.json, src/_locales/ja/main.json, src/_locales/ko/main.json, src/_locales/pt/main.json, src/_locales/ru/main.json, src/_locales/tr/main.json, src/_locales/zh-hans/main.json, src/_locales/zh-hant/main.json, src/_locales/resources.mjs
Removed all non-English locale translation files and simplified resources.mjs to export only English locale.
Language & Configuration Simplification
src/config/language.mjs, src/config/index.mjs
Reduced languageList to only auto and en entries; removed locale-based model selection and simplified getNavigatorLanguage() to always return 'en'; defaultModelName now fixed to claude2WebFree.
Platform Detection
src/utils/is-firefox.mjs, src/utils/is-safari.mjs
Changed both isFirefox() and isSafari() to always return false, enforcing Chrome-only behavior.
Prompt Structure Refactoring
src/content-script/index.jsx, src/content-script/menu-tools/index.mjs, src/content-script/selection-tools/index.mjs, src/content-script/site-adapters/arxiv/index.mjs, src/content-script/site-adapters/bilibili/index.mjs, src/content-script/site-adapters/github/index.mjs, src/content-script/site-adapters/youtube/index.mjs, src/services/apis/shared.mjs
Replaced simple prompts with comprehensive, multi-section structured templates including Role, Task, Instructions, Output Format, Input Data, and Constraints sections. Integrated dynamic language handling via getPreferredLanguage() in selection tools.
Manifest & Extension Config
src/manifest.v2.json
Deleted Chrome extension manifest v2 configuration file (manifest_version 2).

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~50 minutes

  • Prompt restructuring across 8+ modules: Each new multi-section prompt template requires validation to ensure semantic correctness and that language/context integration works as intended.
  • Configuration consolidation: Changes to language detection and model selection need verification that simplified logic doesn't break existing user configurations.
  • Platform detection hardcoding: Confirm that always-false returns for Firefox/Safari don't inadvertently trigger error paths or bypass necessary code branches.
  • Build infrastructure removal: Validate that workflow changes correctly target only Chromium and that no platform-specific assets are accidentally referenced.

Possibly related PRs

  • Refine built-in prompts #866: Modifies prompt-generation strings in menu-tools and selection-tools modules, sharing similar prompt expansion and refinement patterns with this PR.

Suggested labels

Review effort 2/5

Suggested reviewers

  • PeterDaveHello

Poem

🐰 Hops with glee through Chrome's bright door,
English words, no more, no more!
Prompts now shine in structured light,
One true build—simplified right!
Safari, Firefox bade goodbye,
Firefox/Safari bade goodbye!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7b99ec5 and 38b5d71.

📒 Files selected for processing (41)
  • .github/workflows/pre-release-build.yml (0 hunks)
  • .github/workflows/tagged-release.yml (0 hunks)
  • AGENTS.md (2 hunks)
  • README_IN.md (0 hunks)
  • README_JA.md (0 hunks)
  • README_TR.md (0 hunks)
  • README_ZH.md (0 hunks)
  • build.mjs (3 hunks)
  • package.json (0 hunks)
  • safari/appdmg.json (0 hunks)
  • safari/build.sh (0 hunks)
  • safari/export-options.plist (0 hunks)
  • safari/project.patch (0 hunks)
  • safari/project.pre.patch (0 hunks)
  • safari/project_developer.patch (0 hunks)
  • src/_locales/de/main.json (0 hunks)
  • src/_locales/es/main.json (0 hunks)
  • src/_locales/fr/main.json (0 hunks)
  • src/_locales/in/main.json (0 hunks)
  • src/_locales/it/main.json (0 hunks)
  • src/_locales/ja/main.json (0 hunks)
  • src/_locales/ko/main.json (0 hunks)
  • src/_locales/pt/main.json (0 hunks)
  • src/_locales/resources.mjs (0 hunks)
  • src/_locales/ru/main.json (0 hunks)
  • src/_locales/tr/main.json (0 hunks)
  • src/_locales/zh-hans/main.json (0 hunks)
  • src/_locales/zh-hant/main.json (0 hunks)
  • src/config/index.mjs (2 hunks)
  • src/config/language.mjs (1 hunks)
  • src/content-script/index.jsx (1 hunks)
  • src/content-script/menu-tools/index.mjs (1 hunks)
  • src/content-script/selection-tools/index.mjs (3 hunks)
  • src/content-script/site-adapters/arxiv/index.mjs (1 hunks)
  • src/content-script/site-adapters/bilibili/index.mjs (1 hunks)
  • src/content-script/site-adapters/github/index.mjs (3 hunks)
  • src/content-script/site-adapters/youtube/index.mjs (1 hunks)
  • src/manifest.v2.json (0 hunks)
  • src/services/apis/shared.mjs (1 hunks)
  • src/utils/is-firefox.mjs (1 hunks)
  • src/utils/is-safari.mjs (1 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Nov 8, 2025

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status:
No auditing: New logic and expanded prompt-generation paths add user-driven processing without any
added logging of critical actions or outcomes, but absence of logging in the diff may be
acceptable if handled elsewhere.

Referred Code
export const getChatSystemPromptBase = async () => {
  return `## Role
<role>
You are an intelligent, helpful AI assistant designed to engage in natural, informative conversations while being respectful, accurate, and user-focused.
</role>

## Capabilities
<capabilities>
- Answer questions across diverse topics with accurate, well-reasoned responses
- Engage in creative tasks (writing, brainstorming, problem-solving)
- Provide explanations tailored to user's knowledge level
- Communicate effectively in multiple languages
- Assist with analysis, research, and decision-making
- Maintain context throughout multi-turn conversations
</capabilities>

## Guidelines
<guidelines>
1. **Be helpful**: Prioritize user's needs and provide actionable information
2. **Be accurate**: Base responses on reliable knowledge; acknowledge uncertainty when appropriate
3. **Be clear**: Use language appropriate for the user's expertise level


 ... (clipped 127 lines)
Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status:
Limited errors: Multiple try/catch blocks only console.log errors without contextual details or recovery,
which may hinder debugging but might be sufficient if outer layers handle errors.

Referred Code
        return await cropText(summaryPrompt)
      }
      const patchUrl = await getPatchUrl()
      const patchData = await getPatchData(patchUrl)
      if (!patchData) return

      return await cropText(
        `## Role
<role>
You are a senior software engineer specializing in version control and code review, with expertise in writing clear, conventional commit messages.
</role>

## Task
<task>
Analyze the provided git patch and generate both a properly formatted commit message and a technical summary of changes.
</task>

## Instructions
<instructions>
1. **Analyze the patch**:


 ... (clipped 85 lines)
Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status:
Console errors: Error paths use console.error/console.log without clear separation of user-facing vs
internal logs, which could leak internals if surfaced to end users depending on runtime
environment.

Referred Code
function generateWebpackCallback(finishOutputFunc) {
  return async function webpackCallback(err, stats) {
    if (err || stats.hasErrors()) {
      console.error(err || stats.toString())
      return
    }
    // console.log(stats.toString())

    await finishOutputFunc()
  }
Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status:
Unvalidated input: Newly added prompt builders incorporate DOM-extracted text (search inputs) directly into
large prompts without visible sanitization or bounds checks, which could risk prompt
injection or oversized inputs unless handled elsewhere.

Referred Code
async function getInput(inputQuery) {
  let input
  if (typeof inputQuery === 'function') {
    input = await inputQuery()
    const replyPromptBelow = `Reply in ${await getPreferredLanguage()}. Regardless of the language of content I provide below. !!This is very important!!`
    const replyPromptAbove = `Reply in ${await getPreferredLanguage()}. Regardless of the language of content I provide above. !!This is very important!!`
    if (input) return `${replyPromptBelow}\n\n` + input + `\n\n${replyPromptAbove}`
    return input
  }
  const searchInput = getPossibleElementByQuerySelector(inputQuery)
  if (searchInput) {
    if (searchInput.value) input = searchInput.value
    else if (searchInput.textContent) input = searchInput.textContent
    if (input) {
      const preferredLanguage = await getPreferredLanguage()
      return `## Role
<role>
You are a knowledgeable research assistant helping users understand search queries and providing relevant information.
</role>

## Task


 ... (clipped 69 lines)
Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@gemini-code-assist
Copy link

Summary of Changes

Hello @USERNAME-STOCK, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces significant architectural changes by simplifying the build system to support only Chromium browsers and consolidating localization efforts to English only. Concurrently, it vastly improves the AI's interaction capabilities by implementing a new, highly structured prompt engineering framework across all AI-powered features, ensuring more consistent and detailed responses.

Highlights

  • Build System Simplification: The project's build process has been streamlined to focus exclusively on Chromium-based browsers, removing support for Firefox and Safari. This includes the removal of platform-specific build scripts and configurations.
  • Localization Consolidation: All localization files for languages other than English have been removed, simplifying the project's internationalization strategy to a single English locale.
  • Enhanced AI Prompt Engineering: A major refactoring of AI interaction prompts has been implemented across various functionalities (search, summarization, translation, code explanation, GitHub issue/PR analysis, video summarization). Prompts now follow a highly structured format, including explicit roles, tasks, instructions, output formats, input data, and constraints, aiming for more precise and context-aware AI responses.
  • Default AI Model Update: The default AI model has been standardized to 'claude2WebFree', removing previous conditional logic that would select 'moonshotWebFree' for Chinese users.
Ignored Files
  • Ignored by pattern: .github/workflows/** (2)
    • .github/workflows/pre-release-build.yml
    • .github/workflows/tagged-release.yml
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@qodo-merge-pro
Copy link
Contributor

qodo-merge-pro bot commented Nov 8, 2025

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
High-level
The PR removes multi-browser and multi-language support

The PR eliminates support for Firefox, Safari, and all languages except English.
This major feature regression needs clear justification in the PR description to
explain if it's a temporary or permanent strategic change.

Examples:

.github/workflows/tagged-release.yml [30-50]
      - name: Push files
        continue-on-error: true
        run: |
          git config --global user.email "github-actions[bot]@users.noreply.github.com"
          git config --global user.name "github-actions[bot]"
          git commit -am "release v${{ env.VERSION }}"
          git push

      - run: |
          gh release create ${{github.ref_name}} -d -F CURRENT_CHANGE.md -t ${{github.ref_name}}

 ... (clipped 11 lines)
src/_locales/resources.mjs [1-7]
import en from './en/main.json'

export const resources = {
  en: {
    translation: en,
  },
}

Solution Walkthrough:

Before:

// .github/workflows/tagged-release.yml
- name: Update manifest.v2.json version
  ...
- run: npm run build:safari
- run: |
    gh release upload ... build/chromium.zip
    gh release upload ... build/firefox.zip
    gh release upload ... build/safari.dmg

// src/_locales/resources.mjs
import de from './de/main.json'
import en from './en/main.json'
import es from './es/main.json'
// ... many other languages
export const resources = { de: ..., en: ..., es: ... }

After:

// .github/workflows/tagged-release.yml
// (Firefox and Safari build steps are removed)
- run: |
    gh release upload ... build/chromium.zip

// src/_locales/resources.mjs
import en from './en/main.json'

export const resources = {
  en: {
    translation: en,
  },
}
Suggestion importance[1-10]: 9

__

Why: The suggestion correctly identifies the removal of multi-browser and multi-language support as a major strategic regression and rightly calls for justification, which is critical for a change of this magnitude.

High
General
Update prompt for consistency and quality

Update the translateBidi tool to use the new structured prompt format for
consistency with other translation tools modified in this PR.

src/content-script/selection-tools/index.mjs [261-266]

     ...
     label: 'Translate (Bidirectional)',
-    genPrompt: createGenPrompt({
-      isTranslation: true,
-      enableBidirectional: true,
-    }),
+    genPrompt: async (selection) => {
+      const preferredLanguage = await getPreferredLanguage()
+      return `## Role
+    <role>
+    You are a professional translator. Your task is to translate the given text.
+    </role>
+    
+    ## Task
+    <task>
+    First, detect the language of the source text.
+    If the text is in ${preferredLanguage}, translate it to English.
+    If the text is NOT in ${preferredLanguage}, translate it to ${preferredLanguage}.
+    Preserve the original formatting.
+    </task>
+    
+    ## Output Format
+    <output_format>
+    [Provide ONLY the translated text]
+    </output_format>
+    
+    ## Input Data
+    <input_data>
+    Source Text:
+    ${selection}
+    </input_data>
+    
+    ## Constraints
+    <constraints>
+    - Return only the translated text.
+    - Preserve markdown formatting.
+    </constraints>`
+    },
   },
   summary: {
     ...

[To ensure code accuracy, apply this suggestion manually]

Suggestion importance[1-10]: 7

__

Why: The suggestion correctly identifies that the translateBidi prompt was not updated to the new structured format, unlike other similar tools in the PR, which improves consistency and prompt quality.

Medium
  • More

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a significant and well-executed refactoring of the AI prompts across the application, adopting a structured markdown and XML-like format. This change greatly enhances clarity and should lead to more consistent and higher-quality AI responses. Additionally, the build process has been streamlined to support only Chrome and the English locale, which simplifies the development and maintenance workflow. My review includes a few suggestions to further refine the new prompts for better AI interpretation and a recommendation to optimize the Webpack configuration for production builds.

new CssMinimizerPlugin(),
],
concatenateModules: !isAnalyzing,
concatenateModules: false,

Choose a reason for hiding this comment

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

medium

Disabling concatenateModules is beneficial for debugging, but it can negatively impact performance in production by increasing bundle size and runtime overhead. For a better balance, consider enabling it for production builds while keeping it disabled for development and analysis. This provides the performance benefits of scope hoisting in production while maintaining debuggability during development.

Suggested change
concatenateModules: false,
concatenateModules: isProduction && !isAnalyzing,

[Main conclusion or action item from the content]
## Content Quality Note
[Optional: Note if content is incomplete, poorly extracted, or unclear]

Choose a reason for hiding this comment

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

medium

The instruction [Optional: Note if content is incomplete, poorly extracted, or unclear] is currently inside the <output_format> block. This creates a risk that the AI might include this meta-instruction in its actual output. It's better to remove it from here, as the same constraint is already clearly stated in the <constraints> section on line 91: "If extraction quality is poor (lots of navigation/ads), note this limitation."

<output_format>
[Translated text with original formatting preserved]
[If cultural notes are necessary, add after translation:]

Choose a reason for hiding this comment

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

medium

The conditional instruction [If cultural notes are necessary, add after translation:] within the <output_format> block can be confusing for the model and might lead to inconsistent output. It's better to move this logic into the <instructions> section to make the instructions for the model more direct. For example, you could add a new instruction: 5. **Cultural notes**: If you make significant cultural adaptations, add a "Translator's Note" section after a '---' separator at the end of the translation.

<output_format>
[Polished version of the text with improvements applied]
[ONLY provide edited text - no explanations, markup, or commentary]

Choose a reason for hiding this comment

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

medium

This meta-instruction [ONLY provide edited text - no explanations, markup, or commentary] is inside the <output_format> block, which could cause the AI to include it in the response. This instruction is already covered in the <constraints> section on line 375. Removing it from the output format will make the prompt cleaner and reduce the risk of incorrect output.

@USERNAME-STOCK USERNAME-STOCK deleted the claude/review-src-files-011CUvUyQzzb4X4VPkZeG4fM branch November 8, 2025 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants