Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor confirm prompt and enable LLM result caching #678

Merged
merged 4 commits into from
Aug 30, 2024
Merged

Conversation

pelikhan
Copy link
Member

@pelikhan pelikhan commented Aug 30, 2024

This pull request includes a refactoring of the confirm prompt and removes the usage instructions for the npx command from the auto-git-commit-message guide. Additionally, it enables LLM result caching and updates the CLI options to reflect this change.

  • Indentation Change 📏: The first change is to auto-git-commit-message.mdx. The indentation of a section of javascript has been reduced to be in line with good style practices for a consistent and clean codebase. 🧼

  • Removing Unneeded Info 🗑️: The next change also to auto-git-commit-message.mdx removes unneeded information regarding how to use npx which cleans up the documentation. 📝

  • Option Switch 🔁: In several .md and .ts files, the --no-cache option has been changed to --cache. This alters the default behavior of cache settings, effectively enabling cache by default, which can enhance the performance of command-line interactions executed by users, thus speeding up overall execution. 🚀

  • Cache Settings Applied ✔️: The updated cache option has been applied to several commands in various .ts files. This includes adding --cache option in conditions where it was previously omitted if cache was disabled.

Please note that, although these changes seem to be relatively minor, they are important for the overall efficiency, speed, and cleanliness of the codebase. This all can lead to a superior user experience. 👩‍💻👨‍💻

generated by pr-describe

Copy link

The changes in the pull request are relatively straightforward. The developer has changed the functionality of the --cache and --no-cache flags in two files, cli.ts and test.ts.

Previously, the --no-cache option was used to disable the LLM result cache. Now, the --cache option is used to enable the LLM result cache. This change might introduce some confusion among users who are accustomed to the previous functionality.

If the change was intended, it appears to be implemented consistently across the affected files. However, this change should be clearly communicated to users to avoid confusion.

The code changes seem to be fine and do not introduce any obvious functional issues. Overall, it's a LGTM 🚀 from a functional standpoint.

generated by pr-review

packages/cli/src/cli.ts Outdated Show resolved Hide resolved
```bash
npx -p @inquirer/prompts -p genaiscript -- genaiscript run gcm
```

This command will run the script, and guide you through the process of generating and committing a Git message using AI, making your commits more informative and consistent.

You can wrap this command in a `gcm.sh` file or in your package `script` section in `package.json`:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A section about using npx has been removed. Ensure this information is not necessary or is included elsewhere in the documentation.

generated by pr-docs-review-commit removed_section

@@ -44,6 +44,7 @@ Options:
-se, --seed <number> seed for the run
-em, --embeddings-model <string> embeddings model for the run
--no-cache disable LLM result cache
--cache enable LLM result cache

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A new option '--cache' has been added to enable LLM result cache. Make sure this is properly explained in the documentation.

generated by pr-docs-review-commit new_option

@pelikhan pelikhan merged commit 44faa44 into main Aug 30, 2024
11 checks passed
@pelikhan pelikhan deleted the cache-flag branch August 30, 2024 02:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant