Skip to content

feat(config): add currency symbol and conversion rate to rprompt#2887

Merged
tusharmath merged 5 commits intomainfrom
currency-support
Apr 8, 2026
Merged

feat(config): add currency symbol and conversion rate to rprompt#2887
tusharmath merged 5 commits intomainfrom
currency-support

Conversation

@tusharmath
Copy link
Copy Markdown
Collaborator

No description provided.

@github-actions github-actions bot added the type: feature Brand new functionality, features, pages, workflows, endpoints, etc. label Apr 8, 2026
@tusharmath tusharmath merged commit 464c2c2 into main Apr 8, 2026
9 checks passed
@tusharmath tusharmath deleted the currency-support branch April 8, 2026 09:47
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": ""
},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Fix in Graphite


Is this helpful? React 👍 or 👎 to let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: feature Brand new functionality, features, pages, workflows, endpoints, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants