fix(tui): skip project-scope config merge when workspace is home directory#1664
Closed
Lellansin wants to merge 1 commit into
Closed
fix(tui): skip project-scope config merge when workspace is home directory#1664Lellansin wants to merge 1 commit into
Lellansin wants to merge 1 commit into
Conversation
…ctory When the workspace is the user's home directory, the project-scope config file (~/.deepseek/config.toml) is also the global config file. Skip the merge to avoid redundant processing and a misleading "project-scope config key ignored" warning on every launch from ~. Fixes the home-directory false-positive in the Hmbown#417 deny-list check: the deny-list correctly refuses dangerous keys at project scope, but when cwd == $HOME the project file *is* the global file so the warning is noise.
Contributor
|
Warning You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again! |
Owner
|
This PR was opened before the v0.8.41 rebrand and is now stale. Feel free to rebase onto current |
Author
|
Rebased and force-pushed the branch to current main. GitHub refuses to reopen this PR because the branch was force-pushed/recreated, so I opened replacement PR #2055. |
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.
Summary
cwd == $HOME, the project file (~/.deepseek/config.toml) is also the global config file — merge is redundant and the warning is noisemerge_project_configviadirs::home_dir()+std::fs::canonicalizeThe #417 deny-list correctly refuses dangerous keys at project scope, but the warning fires even when the project file is the same file as the global config.
Tests
cargo fmt --all -- --checkcargo check -p deepseek-tui --lockedcargo clippy -p deepseek-tui --all-targets --all-features --locked -- -D warningscargo test -p deepseek-tui -- merge_project_config project_overlay --locked(15/15 passed)git diff --checkReproduce (main)
Verify (this branch)
Same steps produce no
project-scope config key … ignoredwarning.Environment: macOS,
~/.deepseek/config.tomlcontainsapi_key. TUI started from~.