Using subcommands instead of arguments #2

Merged
ok merged 17 commits from subcommands into main 2023-08-12 21:37:06 +02:00
Owner

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:

  1. 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, and print, each having their own set of options.

  2. Refactoring of function names and moving some functions for better organization. For instance, display_models has been renamed to print_models, and handle_question has been refactored as ask_cmd.

  3. The global options now only include the -c, --config: Config file name (defaults to .config.yaml)

  4. Addition of new command-specific options for better control over the application's behavior. For example, the ask command 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.

  5. Improved handling and validation of the configuration file, with more precise error messages.

  6. Changes to the example usage in the README.md file to reflect the new command-based argument structure.

  7. 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.

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: 1. 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`, and `print`, each having their own set of options. 2. Refactoring of function names and moving some functions for better organization. For instance, `display_models` has been renamed to `print_models`, and `handle_question` has been refactored as `ask_cmd`. 3. The global options now only include the `-c`, `--config`: Config file name (defaults to `.config.yaml`) 4. Addition of new command-specific options for better control over the application's behavior. For example, the `ask` command 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. 5. Improved handling and validation of the configuration file, with more precise error messages. 6. Changes to the example usage in the `README.md` file to reflect the new command-based argument structure. 7. 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.
ok added 7 commits 2023-08-12 11:29:29 +02:00
ok added 1 commit 2023-08-12 12:21:01 +02:00
ok added 1 commit 2023-08-12 12:30:21 +02:00
ok added 1 commit 2023-08-12 12:44:20 +02:00
ok added 1 commit 2023-08-12 13:17:18 +02:00
juk0de added 1 commit 2023-08-12 13:56:20 +02:00
ok added 1 commit 2023-08-12 13:58:21 +02:00
juk0de added 3 commits 2023-08-12 14:16:57 +02:00
juk0de added 1 commit 2023-08-12 18:34:54 +02:00
ok merged commit e8eba0b755 into main 2023-08-12 21:37:06 +02:00
ok deleted branch subcommands 2023-08-12 21:37:06 +02:00
Sign in to join this conversation.
No Reviewers
2 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kaizenkodo/ChatMastermind#2