fix: add AIDER_CHAT_MODE env var for --chat-mode alias (issue #5367)#5368
Open
chrislazar25 wants to merge 1 commit into
Open
fix: add AIDER_CHAT_MODE env var for --chat-mode alias (issue #5367)#5368chrislazar25 wants to merge 1 commit into
chrislazar25 wants to merge 1 commit into
Conversation
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: Add
AIDER_CHAT_MODEenv var support for the--chat-mode/--edit-formatargument. Previously onlyAIDER_EDIT_FORMATwas recognized (auto-derived from--edit-format), but the--chat-modealias was missing its own env var.Technical Details:
configargparse.auto_env_var_prefixderives env var names from the first option string only. For--edit-format/--chat-mode, onlyAIDER_EDIT_FORMATis auto-generated;AIDER_CHAT_MODEis not.action.env_var = "AIDER_CHAT_MODE"on the argument after parser creation. For backward compatibility, also injectAIDER_CHAT_MODEfromAIDER_EDIT_FORMATif only the latter is set. Priority: CLI >AIDER_CHAT_MODE>AIDER_EDIT_FORMAT> config file > default.Verification: Confirmed adherence to CONTRIBUTING.md. Ran
python -m pytest tests/. 455 passed, 1 pre-existing env failure (test_voice requires audio hardware). Pre-commit hooks (isort, black, flake8, codespell) all green. Manual E2E:AIDER_CHAT_MODE=ask→edit_format=askAIDER_EDIT_FORMAT=architect→edit_format=architect(backward compat)--chat-mode ask+ env var → CLI winsBlast Radius:
AIDER_EDIT_FORMATusage continues to work.AIDER_CHAT_MODEandAIDER_EDIT_FORMATare set,AIDER_CHAT_MODEtakes priority.Fixes #5367