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

🔐 feat: Toggle Access to Prompts via librechat.yaml #3735

Merged
merged 5 commits into from
Aug 21, 2024

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented Aug 21, 2024

Summary

I implemented a feature to toggle role access to prompts through the librechat.yaml configuration file. This change enhances the flexibility of the application's interface configuration and improves role-based access control.

  • Added a new prompts property to the interface configuration in the librechat.yaml file
    • Updated the configSchema in config.ts to include the new prompts property
  • Implemented updatePromptsAccess function in Role.js to update the USER role's prompt access based on the configuration
  • Modified loadDefaultInterface in interface.js to handle the new prompts property and call updatePromptsAccess asynchronously

Other Changes

  • Incremented the CONFIG_VERSION to '1.1.6' to reflect the changes in the configuration structure
  • Updated the package version of librechat-data-provider to 0.7.415

Testing

  • Created new test files AppService.interface.spec.js and interface.spec.js to ensure proper functionality of the new feature

To test this feature:

  1. Set the prompts property in the interface section of your librechat.yaml file to true or false
  2. Start the application and verify that the USER role's access to prompts is updated accordingly
  3. Run the new test files to ensure the functionality works as expected

Test Configuration:

  • Use a test librechat.yaml file with various prompts configurations to verify the behavior

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • I have written tests demonstrating that my changes are effective or that my feature works
  • Local unit tests pass with my changes

@danny-avila danny-avila changed the title 🔐 feat: Toggle Access to prompts via librechat.yaml 🔐 feat: Toggle Access to Prompts via librechat.yaml Aug 21, 2024
@danny-avila danny-avila merged commit 596ecc6 into main Aug 21, 2024
4 checks passed
@danny-avila danny-avila deleted the feat/disable-prompts branch August 21, 2024 23:57
kenshinsamue pushed a commit to intelequia/LibreChat that referenced this pull request Sep 17, 2024
* chore: update CONFIG_VERSION to '1.1.6'

* chore: update package version to 0.7.415

* feat: toggle USER role access to prompts via librechat.yaml

* refactor: set prompts to true when loadDefaultInterface returns true

* ci(AppService): mock updatePromptsAccess
BertKiv pushed a commit to BertKiv/LibreChat that referenced this pull request Dec 10, 2024
* chore: update CONFIG_VERSION to '1.1.6'

* chore: update package version to 0.7.415

* feat: toggle USER role access to prompts via librechat.yaml

* refactor: set prompts to true when loadDefaultInterface returns true

* ci(AppService): mock updatePromptsAccess
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