feat(config): add currency symbol and conversion rate to rprompt#2887
Merged
tusharmath merged 5 commits intomainfrom Apr 8, 2026
Merged
feat(config): add currency symbol and conversion rate to rprompt#2887tusharmath merged 5 commits intomainfrom
tusharmath merged 5 commits intomainfrom
Conversation
Comment on lines
+45
to
+54
| "currency_conversion_rate": { | ||
| "description": "Conversion rate applied to costs before display in the shell rprompt.\nThe raw USD cost is multiplied by this value, allowing costs to be shown\nin a local currency. Defaults to `1.0` (no conversion).", | ||
| "$ref": "#/$defs/double", | ||
| "default": 0.0 | ||
| }, | ||
| "currency_symbol": { | ||
| "description": "Currency symbol displayed in the shell rprompt next to the session cost\n(e.g. `\"$\"`, `\"€\"`, `\"₹\"`). Defaults to `\"$\"`.", | ||
| "type": "string", | ||
| "default": "" | ||
| }, |
Contributor
There was a problem hiding this comment.
Schema default values are incorrect
The schema defaults (0.0 for conversion rate, "" for symbol) don't match the documented behavior in the Rust code comments which state defaults should be 1.0 and "$" respectively.
This inconsistency will confuse users and tooling that relies on the schema.
Fix: Update to match documented defaults:
"currency_conversion_rate": {
...
"default": 1.0
},
"currency_symbol": {
...
"default": "$"
}
Suggested change
| "currency_conversion_rate": { | |
| "description": "Conversion rate applied to costs before display in the shell rprompt.\nThe raw USD cost is multiplied by this value, allowing costs to be shown\nin a local currency. Defaults to `1.0` (no conversion).", | |
| "$ref": "#/$defs/double", | |
| "default": 0.0 | |
| }, | |
| "currency_symbol": { | |
| "description": "Currency symbol displayed in the shell rprompt next to the session cost\n(e.g. `\"$\"`, `\"€\"`, `\"₹\"`). Defaults to `\"$\"`.", | |
| "type": "string", | |
| "default": "" | |
| }, | |
| "currency_conversion_rate": { | |
| "description": "Conversion rate applied to costs before display in the shell rprompt.\nThe raw USD cost is multiplied by this value, allowing costs to be shown\nin a local currency. Defaults to `1.0` (no conversion).", | |
| "$ref": "#/$defs/double", | |
| "default": 1.0 | |
| }, | |
| "currency_symbol": { | |
| "description": "Currency symbol displayed in the shell rprompt next to the session cost\n(e.g. `\"$\"`, `\"€\"`, `\"₹\"`). Defaults to `\"$\"`.", | |
| "type": "string", | |
| "default": "$" | |
| }, | |
Spotted by Graphite
Is this helpful? React 👍 or 👎 to let us know.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.