-
Notifications
You must be signed in to change notification settings - Fork 118
test(completion): font completion propagation fixtures #2389
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
base: main
Are you sure you want to change the base?
Conversation
Summary of ChangesHello @hongjr03, 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 completion capabilities of the language server, particularly for font and path contexts. It introduces sophisticated type propagation logic to understand complex code patterns such as 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. 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 significantly enhances font and path completion by improving type propagation and handling more complex scenarios like string concatenation and dynamic dictionary keys. The changes are well-implemented and backed by a comprehensive set of new tests. The core logic for bi-directional type constraint propagation is a major step forward for the analysis engine. I have one minor suggestion for code simplification.
| let mut new_prefix = EcoString::new(); | ||
| new_prefix.push_str(lhs.as_str()); | ||
| new_prefix.push_str(prefix.as_str()); | ||
| prefix = new_prefix; |
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 logic for prepending to the prefix string can be simplified. Instead of creating a new EcoString and reassigning, you can use insert_str to prepend the lhs string directly to the existing prefix. This is more efficient and concise.
| let mut new_prefix = EcoString::new(); | |
| new_prefix.push_str(lhs.as_str()); | |
| new_prefix.push_str(prefix.as_str()); | |
| prefix = new_prefix; | |
| prefix.insert_str(0, lhs.as_str()); |
042d257 to
77fd465
Compare
77fd465 to
471d69a
Compare
471d69a to
5e506d5
Compare
- Tighten dict.at("key") rewrite to 1 positional arg\n- Use shared const-string-key extractor for NamedRt/Args\n- Refactor keyed dict analysis to reduce nesting
5e506d5 to
ce42c42
Compare
Adds font completion fixtures for let/for-loop/record/tuple and imported show transforms. Test-only changes.
Depends on #2388.