Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
fromNEXT_PUBLIC_SPEECH_ENABLED
toPUBLIC_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 contextGlobalConfigContext
and a hookuseGlobalConfigContext
to provide a way to access global configuration options likespeechEnabled
throughout the app.src/app/layout.tsx
: Added theGlobalConfigProvider
as a parent component to theProviders
component, with theconfig
prop passed to it includingspeechEnabled
set to the value of the environment variablePUBLIC_SPEECH_ENABLED
.src/features/chat/chat-ui/chat-input/chat-input.tsx
: Updatedchat-input.tsx
to use theuseGlobalConfigContext
hook to assign the value ofspeechEnabled
, replacing the use of the environment variableNEXT_PUBLIC_SPEECH_ENABLED
. [1] [2]src/type.ts
: Added a new environment variablePUBLIC_PUBLIC_SPEECH_ENABLED
tosrc/type.ts
.Configuration improvements:
src/app/change-log/update.md
: Changed the environment variable nameNEXT_PUBLIC_SPEECH_ENABLED
toPUBLIC_SPEECH_ENABLED
in the update log for the Azure Chat Solution accelerator.docs/7-environment-variables.md
: Changed the environment variable nameNEXT_PUBLIC_SPEECH_ENABLED
toPUBLIC_SPEECH_ENABLED
.src/.env.example
: RenamedNEXT_PUBLIC_SPEECH_ENABLED
toPUBLIC_SPEECH_ENABLED
.docs/3-run-locally.md
: Changed the environment variable nameNEXT_PUBLIC_SPEECH_ENABLED
toPUBLIC_SPEECH_ENABLED
.