Skip to content

fix(config): persist cost_currency setting across sessions#956

Closed
namezzb wants to merge 1 commit intoHmbown:mainfrom
namezzb:fix/cost-currency-persist
Closed

fix(config): persist cost_currency setting across sessions#956
namezzb wants to merge 1 commit intoHmbown:mainfrom
namezzb:fix/cost-currency-persist

Conversation

@namezzb
Copy link
Copy Markdown

@namezzb namezzb commented May 7, 2026

Summary

  • Support --save flag in /config <key> <value> so settings can be persisted to settings.toml (e.g. /config cost_currency cny --save)
  • Add cost_currency to show_single_setting() so /config cost_currency displays the current value
  • Add CostCurrencyValue enum and wire it into the interactive /config TUI editor so users can change it visually

Closes #932

Test plan

  • All 2368 existing tests pass with zero failures
  • cost_currency-specific tests pass (pricing, settings, UI footer)
  • cargo check compiles cleanly with no warnings

Support --save flag in `/config <key> <value>` so settings can be
persisted to settings.toml. Add cost_currency to the interactive
/config UI editor and to the show-value query path.

Closes Hmbown#932
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@Hmbown
Copy link
Copy Markdown
Owner

Hmbown commented May 7, 2026

Thanks for jumping on the cost_currency persistence bug. I replayed the fix on current main, added regression tests for and the config UI currency field, and opened #997 as the maintainer replacement. Closing this PR in favor of #997.

@Hmbown Hmbown closed this May 7, 2026
@Hmbown
Copy link
Copy Markdown
Owner

Hmbown commented May 7, 2026

Clean note after closing: #997 is the maintainer replacement. It replays the useful fix on current main and adds regression coverage for /config cost_currency cny --save plus the config UI currency field.

Hmbown added a commit that referenced this pull request May 7, 2026
Summary:
- Let /config cost_currency cny --save persist the setting.
- Show the live cost currency via /config cost_currency.
- Add cost currency to the interactive config document and apply path.
- Add regression tests for command persistence and config UI currency round-tripping.

Test plan:
- cargo test -p deepseek-tui config_command_cost_currency_save_persists_value --locked
- cargo test -p deepseek-tui build_document_reflects_cost_currency_from_settings --locked
- cargo test -p deepseek-tui session_only_apply_keeps_runtime_overrides_and_skips_reload --locked
- cargo fmt --all -- --check
- git diff --check

Supersedes #956. Fixes #932.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

费用显示支持用CNY(¥)显示

2 participants