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

Package upgrade #258

Merged
merged 2 commits into from
Nov 15, 2023
Merged

Package upgrade #258

merged 2 commits into from
Nov 15, 2023

Conversation

thivy
Copy link
Contributor

@thivy thivy commented Nov 15, 2023

This pull request adds a new context and hook to provide a way to access global configuration options throughout the app. It also changes the environment variable name for speechEnabled from NEXT_PUBLIC_SPEECH_ENABLED to PUBLIC_SPEECH_ENABLED and updates all relevant files to use the new name.

Main interface changes:

  • src/features/global-config/global-client-config-context.tsx: Added a new context GlobalConfigContext and a hook useGlobalConfigContext to provide a way to access global configuration options like speechEnabled throughout the app.
  • src/app/layout.tsx: Added the GlobalConfigProvider as a parent component to the Providers component, with the config prop passed to it including speechEnabled set to the value of the environment variable PUBLIC_SPEECH_ENABLED.
  • src/features/chat/chat-ui/chat-input/chat-input.tsx: Updated chat-input.tsx to use the useGlobalConfigContext hook to assign the value of speechEnabled, replacing the use of the environment variable NEXT_PUBLIC_SPEECH_ENABLED. [1] [2]
  • src/type.ts: Added a new environment variable PUBLIC_PUBLIC_SPEECH_ENABLED to src/type.ts.

Configuration improvements:

  • src/app/change-log/update.md: Changed the environment variable name NEXT_PUBLIC_SPEECH_ENABLED to PUBLIC_SPEECH_ENABLED in the update log for the Azure Chat Solution accelerator.
  • docs/7-environment-variables.md: Changed the environment variable name NEXT_PUBLIC_SPEECH_ENABLED to PUBLIC_SPEECH_ENABLED.
  • src/.env.example: Renamed NEXT_PUBLIC_SPEECH_ENABLED to PUBLIC_SPEECH_ENABLED.
  • docs/3-run-locally.md: Changed the environment variable name NEXT_PUBLIC_SPEECH_ENABLED to PUBLIC_SPEECH_ENABLED.

@thivy thivy merged commit 601086b into main Nov 15, 2023
2 checks passed
Sandeep-FED pushed a commit to Sandeep-FED/azurechat that referenced this pull request Jun 14, 2024
Sandeep-FED pushed a commit to Sandeep-FED/azurechat that referenced this pull request Jun 14, 2024
jnxjent pushed a commit to jnxjent/azurechat that referenced this pull request Aug 26, 2024
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