mirror of
https://github.com/Aider-AI/aider.git
synced 2025-06-05 20:25:01 +00:00
refactor: move scrub_sensitive_info to format_settings.py
This commit is contained in:
parent
93c089c5ec
commit
2b2ab3994d
2 changed files with 10 additions and 13 deletions
|
@ -1,4 +1,12 @@
|
|||
from aider.utils import scrub_sensitive_info
|
||||
def scrub_sensitive_info(args, text):
|
||||
# Replace sensitive information with last 4 characters
|
||||
if text and args.openai_api_key:
|
||||
last_4 = args.openai_api_key[-4:]
|
||||
text = text.replace(args.openai_api_key, f"...{last_4}")
|
||||
if text and args.anthropic_api_key:
|
||||
last_4 = args.anthropic_api_key[-4:]
|
||||
text = text.replace(args.anthropic_api_key, f"...{last_4}")
|
||||
return text
|
||||
|
||||
|
||||
def format_settings(parser, args):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue