Using subcommands instead of arguments #2
Reference in New Issue
Block a user
Delete Branch "subcommands"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
This pull request contains significant changes to the argument input structure of the application. The modifications aim to organize the arguments under relevant commands for better clarity and usability.
The primary changes include:
Removal of mutually exclusive arguments and replacing them with command-specific arguments. Instead of mutually exclusive global arguments, now there are commands like
ask,hist,tag,config, andprint, each having their own set of options.Refactoring of function names and moving some functions for better organization. For instance,
display_modelshas been renamed toprint_models, andhandle_questionhas been refactored asask_cmd.The global options now only include the
-c,--config: Config file name (defaults to.config.yaml)Addition of new command-specific options for better control over the application's behavior. For example, the
askcommand includes options like-s,--source: Add content of a file to the query, and-S,--only-source-code: Add pure source code to the chat history.Improved handling and validation of the configuration file, with more precise error messages.
Changes to the example usage in the
README.mdfile to reflect the new command-based argument structure.The tests have been updated to reflect these changes, ensuring the new structure is thoroughly verified.
Overall, the pull request focuses on enhancing the usability and understandability of the application by structuring the arguments according to their belonging commands.