Skip to content

Conversation

@igorovh
Copy link
Member

@igorovh igorovh commented Nov 23, 2025

image image

@igorovh igorovh requested a review from Copilot November 23, 2025 22:28
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @igorovh, 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 significantly enhances the chat's capability to display a wider range of images by integrating support for new hosting platforms like prnt.sc and files.catbox.moe. It achieves this by routing image requests through a CORS proxy, ensuring seamless rendering within the chat interface, and also includes mechanisms to correctly identify and link back to the original image sources.

Highlights

  • Expanded Image Hosting Support: The chat now supports displaying images from additional third-party hosting services, specifically prnt.sc and files.catbox.moe.
  • CORS Proxy Integration: A CORS proxy service (corsgo.enhancer.at) has been integrated to fetch images from these new hosts, effectively bypassing potential cross-origin restrictions that might prevent them from being displayed directly.
  • Original URL Resolution: Logic has been added to correctly resolve and extract the original image URL from the proxied URL, allowing users to navigate to the source content if needed.
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.

@igorovh
Copy link
Member Author

igorovh commented Nov 23, 2025

todo:

  • there is some glitch that if image link is in the chat input, we are constantly getting requests, im gonna check on that
  • create a/b tests for like 10% of users

Copy link
Contributor

@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 adds support for displaying images from additional hostings like prnt.sc and files.catbox.moe by using a CORS proxy. The implementation looks good, but I've found a critical issue where the new hosts are not added to the ALLOWED_HOSTS list, which would prevent the feature from working. I've also left a couple of suggestions to improve maintainability and error handling by removing magic strings and empty catch blocks. Please take a look at the detailed comments.

Copy link
Contributor

Copilot AI left a comment

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 adds support for displaying images from additional hosting services (prnt.sc and files.catbox.moe) in chat by routing them through a CORS proxy service (corsgo.enhancer.at). The implementation includes URL transformation for the proxy and a reverse parser to extract original URLs for navigation.

  • Added CORSGO_PROXY_URL_PARSER to route specific hosts through the corsgo.enhancer.at proxy
  • Configured prnt.sc and files.catbox.moe to use the CORS proxy for image display
  • Added preview URL parser to extract original URLs from proxied corsgo.enhancer.at URLs

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

@igorovh igorovh merged commit 42ce0b8 into master Dec 1, 2025
1 check passed
@igorovh igorovh deleted the feat/add-service-to-display-other-image-hostings branch December 1, 2025 19:48
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