-
-
Notifications
You must be signed in to change notification settings - Fork 19
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
New feature and code refactor #77
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Refactored PulsoidModule and related classes to improve modularity and maintainability. Centralized settings in PulsoidModuleSettings and simplified methods by delegating responsibilities to appropriate classes and methods. - DataController.cs: Removed Pulsoid-related settings, added OptionsTabState settings. - OSCController.cs: Simplified AddHeartRate method. - PulsoidModule.cs: Introduced new observable properties, refactored methods to use new settings. - PulsoidTrendSymbolSet: Removed redundant public keyword. - MainWindow.xaml: Updated data bindings to use HeartRateConnector properties. - ViewModel.cs: Removed heart rate-related properties, encapsulated them in HeartRateConnector.
- OSCController.cs: Add checks for IntgrHeartRate and null heart rate string. - AfkModule.cs: Change FormatDuration access modifier to public. - PulsoidModule.cs: Add pulsoidStatsEnabled property, adjust heart rate stats, refactor display text with StringBuilder, and add HeartRateMonitoringLoopAsync method. - MainWindow.xaml: Add UI elements for configuring and displaying Pulsoid statistics.
The version number of the project has been updated from 0.9.021 to 0.9.025.
Added `hideCurrentHeartRate` property with default `false`. Changed default values of `showCalories` and `showDuration` to `false`. Removed `showMinHeartRate` property. Modified `RefreshTrendSymbols` to include `PulsoidTrendSymbolSet` with "↑" and "↓". Updated display text logic to respect `hideCurrentHeartRate`. Corrected order of max/min heart rate stats. Standardized default trend symbols to "↑" and "↓".
The OAuth2 authorization request scope has been expanded from "data:heart_rate:read" to include "profile:read" and "data:statistics:read". This change allows the application to request additional permissions for reading the user's profile and statistics data, enhancing the range of accessible data from the Pulsoid service. This was a bug, people couldn't do manual OAuth2 because the scopes where not correct...
- Updated LibreHardwareMonitorLib to 0.9.4-pre350 in MagicChatbox.csproj. - Adjusted margins for better spacing and alignment in MainWindow.xaml. - Corrected typo in TextBlock from "peroid" to "period". - Repositioned and updated margins for several CheckBox elements. - Added new CheckBox for hiding current heart rate when showing stats. - Introduced new TextBlock for HeartRateTitleStackMethod_checkbox.
Introduced a new private field `_SoundpadModule` and its public property `SoundpadModule` in the `ViewModel` class, including instantiation with a parameter `1000` and property change notification handling. Reorganized and removed unnecessary `using` directives for better code organization.
- Update progress message in App.xaml.cs from 96% to 98%. - Remove Soundpad Module initialization from App.xaml.cs. - Remove public static SoundpadModule from DataController.cs. - Add private static readonly dictionary SuperscriptMapping to DataController.cs. - Replace DataController.soundpadModule with ViewModel.Instance.SoundpadModule in OSCController.cs.
Refactored the SoundpadModule class to use the ObservableObject pattern from the CommunityToolkit.Mvvm.ComponentModel library, replacing the previous INotifyPropertyChanged implementation. Added new observable properties such as Error, ErrorString, EnablePanel, IsSoundpadRunning, Stopped, CurrentSoundpadState, PlayingNow, and PlayingSong. Converted several methods from static to instance methods, including InitializeSoundpadModuleAsync, UpdateSoundpadState, InitializeAndStartModuleIfNeeded, StartModule, StopModule, ShouldStartMonitoring, ExecuteSoundpadCommand, PlayNextSound, PlayPreviousSound, TogglePause, StopSound, PlaySound, PlaySoundFromCategory, and PlaySoundByIndex. Added new methods PlayRandomSound and PlaySoundByIndex. Improved error handling and updated the soundpadState enum to include a new state Unknown. Removed the PropertyChanged event and handler, as ObservableObject now handles property change notifications. Enhanced the overall structure and maintainability of the code.
Updated MainWindow.xaml to improve Soundpad UI with new layout, buttons, and styling. Added event handlers in MainWindow.xaml.cs for play, pause, previous, next, stop, and random sound controls.
A new style named `GlowyButtonSoundpadWithText` has been added for `Button` elements, featuring custom property setters for background, foreground, font size, height, opacity, cursor, and font family. The style includes a `ControlTemplate` with a `Grid`, `Border`, and `ContentPresenter`, and defines triggers for `MouseOver`, `IsPressed`, and `IsEnabled` states. The previous `DropShadowEffect` setter has been removed.
- Added `gpt4omini` and `gpt4_turbo` to `IntelliGPTModel` enum. - Modified `Settings.PerformModerationCheckModel` logic. - Updated initial system message in sentence rewriting. - Removed logic for handling selected languages. - Reduced `maxTokens` in `GetCompletionAsync` from 120 to 60.
Improved translation handling by using `Settings.SelectedTranslateLanguage` for `intelliChatLanguage` and adding system messages for accurate translation and supported languages. Reformatted `ChatRequest` instantiation for readability. Introduced `PerformSpellingAndGrammarCheckAsync` method to check spelling and grammar, ensuring `Settings.IntelliChatUILabel` is set correctly based on response status.
- Ensure early return if moderation check fails. - Update settings for IntelliChat UI label and text. - Introduce `intelliChatWritingStyle` variable. - Modify message construction for better clarity. - Refactor language consideration code. - Update OpenAI API request: reduce `maxTokens` to 60, add `temperature` of 0.3. - Maintain existing error handling. - Add `RejectIntelliChatSuggestion` method to clear text and update status.
Refactored code to improve handling and processing of OpenAI API responses. Introduced `SanitizeShortenedText` method to sanitize and trim response text to 140 characters or fewer. Updated prompt for clearer instructions. Enhanced message construction for role clarity and language selection. Adjusted retry logic for text shortening to allow two retries. Simplified `ProcessResponse` method by removing redundant checks. Ensured `SanitizeShortenedText` removes leading/trailing quotation marks and trims text. Utilized `RemoveQuotationMarkAroundResponse` within `SanitizeShortenedText`.
- Refined prompt for generating creative conversation starters - Added role clarity in message construction - Included language consideration when auto-selection is off - Adjusted model parameters: maxTokens=20, temperature=0.7 - Dynamically retrieve model name using GetModelDescription - Removed old prompt and outdated API call method
The version number of the project has been updated from 0.9.025 to 0.9.030.
The version number of the project has been updated from 0.9.030 to 0.9.032.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Classification
New feature and code refactor.
PR Summary
This pull request introduces new features for SoundPad control and refactors heart rate settings and display.
GlowyButtonSoundpadWithText
style and updated button templates.ObservableObject
and added new observable properties.SoundpadModule
and removed heart rate-related properties.