mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-03-21 11:30:38 -07:00
fix(settings): display objects as JSON instead of [object Object] (#21458)
Co-authored-by: Zheyuan <zlin252@emory.edu> Co-authored-by: Jacob Richman <jacob314@gmail.com>
This commit is contained in:
@@ -284,7 +284,14 @@ export function getDisplayValue(
|
||||
|
||||
let valueString = String(value);
|
||||
|
||||
if (definition?.type === 'enum' && definition.options) {
|
||||
// Handle object types by stringifying them
|
||||
if (
|
||||
definition?.type === 'object' &&
|
||||
value !== null &&
|
||||
typeof value === 'object'
|
||||
) {
|
||||
valueString = JSON.stringify(value);
|
||||
} else if (definition?.type === 'enum' && definition.options) {
|
||||
const option = definition.options?.find((option) => option.value === value);
|
||||
valueString = option?.label ?? `${value}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user