Skip to content

Commit

Permalink
Enhance file validation in sidekick command
Browse files Browse the repository at this point in the history
Modified the 'sidekick' command in 'cli.py' to include file validation. Now, the 'files' argument checks if the provided path exists and is readable. This should prevent errors caused by invalid file paths and enhance overall robustness of the command. 📁🔍
  • Loading branch information
TechNickAI committed Jul 28, 2023
1 parent 799e55f commit 65bd60a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion aicodebot/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def review(commit, verbose, output_format, response_token_size, files):
@click.option("-n", "--no-files", is_flag=True, help="Don't automatically load any files for context")
@click.option("-m", "--max-file-tokens", type=int, default=10_000, help="Don't load files larger than this")
@click.option("-v", "--verbose", count=True)
@click.argument("files", nargs=-1)
@click.argument("files", nargs=-1, type=click.Path(exists=True, readable=True))
def sidekick(request, verbose, no_files, max_file_tokens, files): # noqa: PLR0915
"""
Coding help from your AI sidekick
Expand Down

0 comments on commit 65bd60a

Please sign in to comment.