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.
Add child mode. Resolves #153
This pull request introduces role-based feature restrictions, enhances audio handling with a new context-based architecture, and makes UI adjustments for child-friendly functionality. The key changes are grouped and summarized below.
Role-Based Feature Restrictions
getFilteredItemsfunction inapp/NavMenuItems.tsxto filter navigation items based on user roles, specifically hiding most items for children (roleId 4).roleThresholdproperty to restrict access to specific menu items for children. [1] [2]app/chat/[[...id]]/page.tsxandcomponents/conversation/Message/Message.tsxto hide certain actions and features (e.g., conversation actions and message actions) from children. (app/chat/[[...id]]/page.tsxL292-R296, [1] [2]Audio Handling Enhancements
AudioPlayercomponent with a new context-basedAudioContextarchitecture to manage audio playback and autoplay permissions more effectively. [1] [2]AudioProviderinto the app layout to ensure audio context is available globally. [1] [2] [3]Child-Friendly UI Adjustments
ChildFriendlyVoiceRecordercomponent with a larger, visually appealing microphone button for children incomponents/conversation/input/chat-input.tsx.tts) by default for children incomponents/conversation/conversation.tsx.Markdown Media Handling
MarkdownLinkto support audio file playback by embedding the newAudioPlayerfor audio links. [1] [2]These changes improve user experience by tailoring features and interfaces to specific user roles while modernizing audio playback capabilities.