Repository navigation
fix(cli): pass config to getDisplayString in Footer for custom model displayName - #30490
bitwizard25 wants to merge 1 commit into
Conversation
Summary of ChangesHello, 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 addresses an issue where the CLI footer failed to display user-defined model names for certain providers. By correctly injecting the configuration context into the display string logic, the application can now resolve custom display names, preventing the UI from falling back to verbose, long-form resource paths that would otherwise cause layout issues. Highlights
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 the 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 counterproductive. 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. Footnotes
|
|
📊 PR Size: size/S
|
There was a problem hiding this comment.
Code Review
This pull request updates the Footer component to pass the config object to getDisplayString when rendering the model-name column. It also adds a unit test in Footer.test.tsx to verify that a custom configured displayName is correctly displayed for long Vertex AI model resource paths instead of truncating or dropping the model information. There are no review comments, so I have no feedback to provide.
Summary
Passes
configtogetDisplayString(model, config)inFooter.tsxso custom model definitions with a configureddisplayNameare resolved in the footer.Root Cause
Footer.tsxcalledgetDisplayString(model)without passing theconfiginstance that is already in scope viauseConfig(). Withoutconfig,getDisplayStringskips custommodelConfigServicelookups and returns the raw model identifier verbatim. For Vertex AI fully qualified resource paths (e.g.projects/.../locations/.../publishers/google/models/...), the raw string exceeds the remaining footer width budget at standard terminal widths (e.g. 120 columns), causing the width-fitting logic to drop themodel-namecolumn and render an ellipsis (…).Changes
packages/cli/src/ui/components/Footer.tsx: PassconfigtogetDisplayString(model, config)in themodel-namefooter item.packages/cli/src/ui/components/Footer.test.tsx: Add a regression test verifying that a long Vertex AI model resource path with a configureddisplayNamerenders the shortdisplayNameat 120 columns instead of dropping model info.Testing
packages/cli/src/ui/components/Footer.test.tsx(confirmed failing before the fix with model column dropped to…).npx vitest run packages/cli/src/ui/components/Footer.test.tsx(41/41 passing).npx prettier --checkandnpx eslint --max-warnings 0on both modified files.Fixes #30482