Skip to content

Conversation

@DaniilSmirnov
Copy link
Contributor

Hi!
This PR provides ability to force update for repository by deleting already cloned repo and .pkl file

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @DaniilSmirnov, 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 implements a crucial feature that allows users to force a complete refresh of a repository's data. This capability is exposed through a new UI toggle which, when activated, instructs the backend to remove all previously cloned repository files and processed data before re-fetching, guaranteeing that the system works with the latest version of the repository. The changes involve modifications to the backend API for handling the deletion logic, updates to the frontend to provide the user interface for this option, and an expansion of recognized code file types for more comprehensive processing. Additionally, several UI components were refactored for better maintainability and code quality.

Highlights

  • Force Repository Refresh: Introduced a new 'force refetch' toggle that, when enabled, will delete the existing cloned repository and its associated .pkl database file, ensuring a fresh clone and re-processing of the repository data.
  • API Endpoint Enhancement: The delete_wiki_cache API endpoint was updated to accept a force_refetch parameter, triggering the removal of the repository directory and database file in addition to the cache.
  • Expanded Code File Recognition: The list of recognized code file extensions in api/data_pipeline.py was significantly expanded to include a broader range of programming languages and script types.
  • Frontend Integration & Refactoring: The user interface was updated across several React components (page.tsx, ConfigurationModal.tsx, ModelSelectionModal.tsx, UserSelector.tsx) to incorporate the forceRefetch state and toggle. The UserSelector component also underwent significant refactoring for improved structure and reusability of UI primitives.
  • Localization Updates: New localization strings for 'Force refetch repository' were added to both English (en.json) and Russian (ru.json) message files.
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.

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 successfully adds the functionality to force a refresh of a repository by deleting its cached clone and database file. The changes are well-distributed across the backend API and the frontend components. The refactoring of the UserSelector component is a significant improvement in code quality and maintainability.

I've identified a critical bug in the backend API related to directory creation and a high-severity issue in the error handling logic that could lead to misleading error messages. I've also pointed out a couple of medium-severity issues in the frontend for improving code clarity and component accessibility. Addressing these points will make the new feature more robust and the codebase cleaner.

DaniilSmirnov and others added 4 commits October 14, 2025 22:22
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
@DaniilSmirnov DaniilSmirnov changed the title Add force refresh of repository toggle feature: add ability for repository refetch on wiki refresh Oct 23, 2025
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.

1 participant