fix(settings): display objects as JSON instead of [object Object]#21458
fix(settings): display objects as JSON instead of [object Object]#21458jacob314 merged 3 commits intogoogle-gemini:mainfrom
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 primarily resolves a display bug in the CLI, ensuring that complex settings with object values are now presented as readable JSON strings rather than generic object representations. Concurrently, it significantly expands the CLI's sandboxing capabilities by integrating gVisor/runsc, offering a more robust and isolated execution environment for operations on Linux systems. This dual enhancement improves both user experience through clearer output and operational security through advanced sandboxing. Highlights
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
|
|
I think you diffed extra files because you checked out this PR's branch from your previous PR. You should checkout a new branch from main. |
There was a problem hiding this comment.
Code Review
This pull request introduces two main changes. First, it fixes a display bug where object-based settings were shown as [object Object], and now correctly displays them as JSON strings. Second, it adds support for runsc (gVisor) as a new sandboxing option, which includes a critical security fix for command injection when using a proxy command with container-based sandboxes. My review identifies a critical security issue where the command injection fix was not applied to all relevant code paths. A similar vulnerability remains in the sandbox-exec path, which needs to be addressed to ensure both sandbox paths are secure.
a61bf19 to
ba2a925
Compare
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request fixes a bug where settings with object values were displayed as [object Object] by correctly serializing them to JSON for display. The change is implemented in getDisplayValue and is accompanied by a comprehensive unit test that covers both empty and populated objects. The fix is correct and well-tested.
…ogle-gemini#21458) Co-authored-by: Zheyuan <zlin252@emory.edu> Co-authored-by: Jacob Richman <jacob314@gmail.com>
…ogle-gemini#21458) Co-authored-by: Zheyuan <zlin252@emory.edu> Co-authored-by: Jacob Richman <jacob314@gmail.com>
…1458) Co-authored-by: Zheyuan <zlin252@emory.edu> Co-authored-by: Jacob Richman <jacob314@gmail.com>
…ogle-gemini#21458) Co-authored-by: Zheyuan <zlin252@emory.edu> Co-authored-by: Jacob Richman <jacob314@gmail.com>

Summary
This PR fixes a bug where settings with object values were displayed as [object Object] in the CLI. They are now correctly stringified to JSON for better readability.
Details
JSON.stringify() to display their content.
objects and objects with properties are displayed as valid JSON strings.
Related Issues
Fixes #21202
How to Validate
experimental.gemmaModelRouter).
[object Object] string.
1 npm test -w @google/gemini-cli -- src/utils/settingsUtils.test.ts
Pre-Merge Checklist