-
Notifications
You must be signed in to change notification settings - Fork 852
Claude/review src files 011 c uv uy qzzb4 x4 v pk ze g4f m #902
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Claude/review src files 011 c uv uy qzzb4 x4 v pk ze g4f m #902
Conversation
…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.
|
Caution Review failedThe pull request is closed. WalkthroughThe 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
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (41)
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. Comment |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
||||||||||||||||||||||||
Summary of ChangesHello @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
Ignored Files
Using Gemini Code AssistThe 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
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 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
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
||||||||||||
There was a problem hiding this 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, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
| 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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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:] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
PR Type
Enhancement, Other
Description
Restructured all AI prompts with hybrid markdown + XML format for clarity and consistency
Simplified build process to Chrome-only with English locale only
Diagram Walkthrough
File Walkthrough
8 files
Rewrite selection tool prompts with structured formatEnhance GitHub issue and PR analysis promptsExpand system prompts with detailed capabilities and guidelinesRestructure search engine handler prompt with intent classificationUpgrade arXiv paper analyzer with research domain classificationEnhance page summarization prompt with content type identificationRestructure YouTube video summarizer with structured output formatRestructure Bilibili video summarizer with structured output format5 files
Simplify build to Chrome-only with single output directoryRemove multi-language support and set default model to EnglishSimplify language list to English onlyHardcode Firefox detection to always return falseHardcode Safari detection to always return false1 files
Update documentation to reflect Chrome-only build27 files
Summary by CodeRabbit
New Features
Chores