Skip to content

Conversation

@HenryHengZJ
Copy link
Contributor

No description provided.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @HenryHengZJ, 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 a deprecation strategy for all LlamaIndex integrations within the system. The primary goal is to clearly communicate to users and developers that these components are no longer actively supported and will be removed in a future release. This is achieved by programmatically marking the components as deprecated and providing a visual cue in the UI, ensuring a smooth transition away from LlamaIndex dependencies.

Highlights

  • LlamaIndex Component Deprecation: All LlamaIndex-related components, including agents, chat models, embeddings, engines, response synthesizers, tools, and vector stores, have been marked as 'DEPRECATING'.
  • New Deprecation Properties: A 'badge' property set to 'DEPRECATING' and a 'deprecateMessage' explaining the future removal of LlamaIndex integration have been added to the INode interface for all affected components.
  • UI Visual Indicator: The user interface has been updated to display a visual '!' badge next to 'LlamaIndex' items, clearly indicating their deprecated status to users.
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 adds deprecation notices to all LlamaIndex-related nodes, which is a good step. My review focuses on improving code quality and maintainability. I've pointed out several instances of duplicated code, specifically the deprecation message which is repeated across 22 files. Extracting this into a shared constant would be a significant improvement. Additionally, in the UI code, I've suggested refactoring inline styles and magic strings to use theme variables and constants for better consistency and readability. The provided rule regarding generic images for error pages does not apply to any of the comments in this review.

this.baseClasses = [this.type, ...getBaseClasses(AnthropicAgent)]
this.tags = ['LlamaIndex']
this.badge = 'DEPRECATING'
this.deprecateMessage = 'LlamaIndex integration is deprecated and will be removed in a future release.'
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The deprecation message is hardcoded here and in many other LlamaIndex-related files. To improve maintainability and ensure consistency, it's better to define this message as a constant in a shared file (e.g., packages/components/src/constants.ts) and import it where needed.

this.baseClasses = [this.type, ...getBaseClasses(OpenAIAgent)]
this.tags = ['LlamaIndex']
this.badge = 'DEPRECATING'
this.deprecateMessage = 'LlamaIndex integration is deprecated and will be removed in a future release.'
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The deprecation message is hardcoded here and in many other LlamaIndex-related files. To improve maintainability and ensure consistency, it's better to define this message as a constant in a shared file (e.g., packages/components/src/constants.ts) and import it where needed.

this.baseClasses = [this.type, 'BaseChatModel_LlamaIndex', ...getBaseClasses(OpenAI)]
this.tags = ['LlamaIndex']
this.badge = 'DEPRECATING'
this.deprecateMessage = 'LlamaIndex integration is deprecated and will be removed in a future release.'
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The deprecation message is hardcoded here and in many other LlamaIndex-related files. To improve maintainability and ensure consistency, it's better to define this message as a constant in a shared file (e.g., packages/components/src/constants.ts) and import it where needed.

this.baseClasses = [this.type, 'BaseChatModel_LlamaIndex', ...getBaseClasses(Anthropic)]
this.tags = ['LlamaIndex']
this.badge = 'DEPRECATING'
this.deprecateMessage = 'LlamaIndex integration is deprecated and will be removed in a future release.'
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The deprecation message is hardcoded here and in many other LlamaIndex-related files. To improve maintainability and ensure consistency, it's better to define this message as a constant in a shared file (e.g., packages/components/src/constants.ts) and import it where needed.

this.baseClasses = [this.type, 'BaseChatModel_LlamaIndex', ...getBaseClasses(MistralAI)]
this.tags = ['LlamaIndex']
this.badge = 'DEPRECATING'
this.deprecateMessage = 'LlamaIndex integration is deprecated and will be removed in a future release.'
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The deprecation message is hardcoded here and in many other LlamaIndex-related files. To improve maintainability and ensure consistency, it's better to define this message as a constant in a shared file (e.g., packages/components/src/constants.ts) and import it where needed.

this.description = 'Tool used to invoke query engine'
this.baseClasses = [this.type, 'Tool_LlamaIndex']
this.badge = 'DEPRECATING'
this.deprecateMessage = 'LlamaIndex integration is deprecated and will be removed in a future release.'
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The deprecation message is hardcoded here and in many other LlamaIndex-related files. To improve maintainability and ensure consistency, it's better to define this message as a constant in a shared file (e.g., packages/components/src/constants.ts) and import it where needed.

this.baseClasses = [this.type, 'VectorIndexRetriever']
this.tags = ['LlamaIndex']
this.badge = 'DEPRECATING'
this.deprecateMessage = 'LlamaIndex integration is deprecated and will be removed in a future release.'
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The deprecation message is hardcoded here and in many other LlamaIndex-related files. To improve maintainability and ensure consistency, it's better to define this message as a constant in a shared file (e.g., packages/components/src/constants.ts) and import it where needed.

this.baseClasses = [this.type, 'VectorIndexRetriever']
this.tags = ['LlamaIndex']
this.badge = 'DEPRECATING'
this.deprecateMessage = 'LlamaIndex integration is deprecated and will be removed in a future release.'
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The deprecation message is hardcoded here and in many other LlamaIndex-related files. To improve maintainability and ensure consistency, it's better to define this message as a constant in a shared file (e.g., packages/components/src/constants.ts) and import it where needed.

src={getImage(index)}
alt={item}
/>
{item === 'LlamaIndex' && (
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The string 'LlamaIndex' is used here and in the tabs definition. To avoid magic strings and improve maintainability, consider defining the tab names as constants. For example: const TABS = { LANGCHAIN: 'LangChain', LLAMAINDEX: 'LlamaIndex', UTILITIES: 'Utilities' }; and then use item === TABS.LLAMAINDEX.

Comment on lines +546 to +560
style={{
position: 'absolute',
top: '-4px',
right: '-6px',
backgroundColor: '#ff9800',
color: 'white',
borderRadius: '50%',
width: '12px',
height: '12px',
fontSize: '10px',
fontWeight: 'bold',
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}}
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

These inline styles should be moved to the sx prop to leverage Material-UI's styling solution and use theme variables. This improves maintainability and consistency with the rest of the codebase. For example, backgroundColor: '#ff9800' can be replaced with backgroundColor: 'warning.main'.

Suggested change
style={{
position: 'absolute',
top: '-4px',
right: '-6px',
backgroundColor: '#ff9800',
color: 'white',
borderRadius: '50%',
width: '12px',
height: '12px',
fontSize: '10px',
fontWeight: 'bold',
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}}
sx={{
position: 'absolute',
top: '-4px',
right: '-6px',
backgroundColor: 'warning.main',
color: 'white',
borderRadius: '50%',
width: '12px',
height: '12px',
fontSize: '10px',
fontWeight: 'bold',
display: 'flex',
alignItems: 'center',
justifyContent: 'center'
}}

@HenryHengZJ HenryHengZJ merged commit 3901ef2 into main Jan 20, 2026
5 checks passed
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