Skip to content

[ACTV-276] new deck config#1253

Draft
augdiebold wants to merge 1 commit intomainfrom
ACTV-276-change-recommended-deck-limits
Draft

[ACTV-276] new deck config#1253
augdiebold wants to merge 1 commit intomainfrom
ACTV-276-change-recommended-deck-limits

Conversation

@augdiebold
Copy link
Collaborator

Related issues

  • Closes #

Proposed changes

Describe the big picture of your changes here to communicate to the reviewers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.

How to reproduce

Explain like if someone who doesn't know this project is reviewing your changes and how they can replicate this.

Screenshots and videos

Paste here any screenshots or videos related to your changes, if applicable.

Further comments

If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request enhances the deck configuration system by introducing more flexible and maintainable ways to define and apply deck settings. It allows for specific overrides based on the deck preset, such as for the 'AnKing' preset, ensuring that different deck types can have tailored configurations without extensive conditional logic spread throughout the codebase. This change improves the modularity and extensibility of the deck configuration management.

Highlights

  • New Deck Configuration Constants: Introduced ANKING_PRESET_NAME, ANKING_OVERRIDES, and DEFAULT_OVERRIDES constants to centralize and manage specific configuration settings for different deck presets.
  • Dynamic Deck Configuration Retrieval: Added a new function get_effective_deck_config which dynamically applies preset-specific overrides (like ANKING_OVERRIDES or DEFAULT_OVERRIDES) to the base DECK_CONFIG.
  • Updated Preset Creation Logic: Modified create_or_reset_deck_preset to utilize the new get_effective_deck_config function, ensuring that the correct configuration, including any overrides, is applied when creating or resetting deck presets.
  • Improved AnKing Preset Handling: Updated set_ankihub_config_for_deck to use the ANKING_PRESET_NAME constant when setting the AnKing preset, replacing a hardcoded string for better maintainability.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • ankihub/main/deck_options.py
    • Added new constants for AnKing preset name and override configurations.
    • Implemented get_effective_deck_config function to merge base configuration with preset-specific overrides.
    • Modified create_or_reset_deck_preset to use the new effective configuration retrieval logic.
    • Updated set_ankihub_config_for_deck to reference the ANKING_PRESET_NAME constant.
Activity
  • No specific activity (comments, reviews, etc.) was recorded for this pull request beyond its creation.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

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