-
Notifications
You must be signed in to change notification settings - Fork 3
Bugfix/agent new #1284
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
Bugfix/agent new #1284
Conversation
…logs Adds .slice(-200) limit to prevent unbounded memory growth in live mode. Removes all [LiveTrace] and [LogsTab] debug console.log statements. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Summary of ChangesHello @athul-ab, 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 focuses on bug fixes and improvements to the agent interface. It includes styling adjustments for the TextArea component, removal of excessive console logs in the Logs tab, limiting the number of logs displayed for performance reasons, and updates to global styles for better UI consistency. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
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
|
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 several bug fixes and style adjustments. The most notable changes include removing debug console.log statements and limiting the number of log entries stored in the state to prevent performance issues in the logs view. My review includes suggestions to improve code clarity by removing redundant CSS classes, replacing magic numbers with named constants, and correcting a likely typo in a CSS padding value.
| maxLength={400} | ||
| autoSize={{ minRows: 3, maxRows: 8 }} | ||
| className="!border !border-[#757575] hover:!border-[#CFCFCF] hover:!bg-[#FFFFFF08] shadow-none !placeholder-[#808080] !placeholder:text-[#808080]" | ||
| className="!border-none !shadow-none !border-[0] hover:!bg-[#FFFFFF08] shadow-none !placeholder-[#808080] !placeholder:text-[#808080]" |
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 className string contains several redundant utility classes. For example, !shadow-none is specified twice. Also, !border-none and !border-[0] are used together, while !border-none is sufficient. Similarly, !placeholder-[#808080] and !placeholder:text-[#808080] are duplicates. Simplifying this will improve code readability and maintainability.
| className="!border-none !shadow-none !border-[0] hover:!bg-[#FFFFFF08] shadow-none !placeholder-[#808080] !placeholder:text-[#808080]" | |
| className="!border-none !shadow-none hover:!bg-[#FFFFFF08] !placeholder-[#808080]" |
|
|
||
| console.log('[LiveTrace] Created LogEntry:', newEntry); | ||
| setLogsData(prev => [...prev, newEntry]); | ||
| setLogsData(prev => [...prev, newEntry].slice(-200)); |
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 number 200 is used here to limit the number of log entries, which is a good way to prevent performance degradation. However, it's a magic number. It would be better to define it as a named constant at the top of the component (e.g., const MAX_LOG_ENTRIES = 200;). This improves readability and makes it easier to maintain, especially since this value is used elsewhere in the file.
| setLogsData(prev => [...prev, newEntry].slice(-200)); | |
| setLogsData(prev => [...prev, newEntry].slice(-MAX_LOG_ENTRIES)); |
| }; | ||
|
|
||
| setLogsData(prev => [...prev, newEntry]); | ||
| setLogsData(prev => [...prev, newEntry].slice(-200)); |
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 is another instance of using the magic number 200. As mentioned in the previous comment, this should be replaced with a shared constant like MAX_LOG_ENTRIES to ensure consistency and improve maintainability.
| setLogsData(prev => [...prev, newEntry].slice(-200)); | |
| setLogsData(prev => [...prev, newEntry].slice(-MAX_LOG_ENTRIES)); |
| color: white; | ||
| background: var(--color-background); | ||
| padding: 0 4px; | ||
| padding: 0 0.025rem; |
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.
No description provided.