Add AllTipsShownBehaviours to control tip display behavior when all tips have been shown#153
Add AllTipsShownBehaviours to control tip display behavior when all tips have been shown#153
Conversation
| Biweekly = 4, | ||
| Monthly = 5 | ||
| Monthly = 5, | ||
| NewTipsOnly = 6 |
There was a problem hiding this comment.
Instead of adding a NewTipsOnly value to this WritePowerShellTipCadence enum, please create a new WritePowerShellTipOptions enum with the values CycleThroughAllTips (default) and UnseenTipsOnly. Then add a new public WritePowerShellTipOptions AutoWritePowerShellTipOptions { get; set; } property to the Configuration class, and use that setting to determine if a tip should be automatically written or not.
There was a problem hiding this comment.
Changes implemented in commit f3dcc9f.
Created a new WritePowerShellTipOptions enum with CycleThroughAllTips (default) and UnseenTipsOnly values, and added the AutoWritePowerShellTipOptions property to the Configuration class.
Users can now combine any cadence with the option, for example:
Set-TiPSConfiguration -AutomaticallyWritePowerShellTip Daily -AutomaticallyWritePowerShellTipOption UnseenTipsOnly
|
1 similar comment
|
|
@copilot Also update the ReadMe.md to show an example of setting the AutoWritePowerShellTipOptions to OnlyShowUnseenTips. |
|
1 similar comment
|
Added in commit 3a7dbf2. Created a new subsection "Show only unseen tips" under the "🤖 Automatic tip on PowerShell startup" section with an example showing how to use the Set-TiPSConfiguration -AutomaticallyWritePowerShellTip Daily -AutomaticallyWritePowerShellTipOption OnlyWriteUnseenTipsThe section also explains the available values and behavior of the option. |
| Random = 2 | ||
| } | ||
|
|
||
| public enum WritePowerShellTipOptions |
There was a problem hiding this comment.
@copilot Rename the WritePowerShellTipOptions enum to WritePowerShellTipConditions and rename the AutoWritePowerShellTipOptions property to WritePowerShellTipCondition
There was a problem hiding this comment.
Renamed in commit 60560a1.
The names are now:
- Enum:
WritePowerShellTipConditions - Property:
WritePowerShellTipCondition
Updated all references across C# and PowerShell files, including tests.
|
1 similar comment
|
|
Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
… cadence Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
…psOnly to OnlyWriteUnseenTips Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
…AutoWritePowerShellTipOptions to WritePowerShellTipCondition Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
afb09f4 to
432df06
Compare
|
| Random = 2 | ||
| } | ||
|
|
||
| public enum WritePowerShellTipConditions |
There was a problem hiding this comment.
@copilot Rename the WritePowerShellTipConditions enum to GetPowerShellTipConditions, and rename the WritePowerShellTipCondition class property to GetPowerShellTipCondition.
There was a problem hiding this comment.
Renamed in commit daa49b7.
The names are now:
- Enum:
GetPowerShellTipConditions - Property:
GetPowerShellTipCondition
Updated all references across C# files, PowerShell files, tests, and documentation.
… WritePowerShellTipCondition to GetPowerShellTipCondition Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
| public enum GetPowerShellTipConditions | ||
| { | ||
| CycleThroughTips = 0, | ||
| OnlyWriteUnshownTips = 1 |
There was a problem hiding this comment.
@copilot Rename the value OnlyWriteUnshownTips to OnlyGetUnshownTips
There was a problem hiding this comment.
Renamed in commit 61fae99.
The enum value is now OnlyGetUnshownTips.
Updated all references across C# files, PowerShell files, tests, and documentation.
Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>
| Random = 2 | ||
| } | ||
|
|
||
| public enum GetPowerShellTipConditions |
There was a problem hiding this comment.
@copilot Rename the GetPowerShellTipConditions enum to AllTipsShownBehaviours, rename the CycleThroughTips value to ClearShownTipsList, rename the OnlyGetUnshownTips value to DoNotShowTips, and rename the GetPowerShellTipCondition class property to AllTipsShownBehaviour.
There was a problem hiding this comment.
Renamed in commit 73e2c88.
The names are now:
- Enum:
AllTipsShownBehaviours - Property:
AllTipsShownBehaviour - Enum values:
ClearShownTipsListandDoNotShowTips
Updated all references across C# files, PowerShell files, tests, and documentation.
…aviours, CycleThroughTips to ClearShownTipsList, OnlyGetUnshownTips to DoNotShowTips, GetPowerShellTipCondition to AllTipsShownBehaviour Co-authored-by: deadlydog <1187140+deadlydog@users.noreply.github.com>

Adds a new
AllTipsShownBehavioursenum that allows users to configure what happens when all tips have been shown - either clear the shown tips list and continue cycling, or stop showing tips automatically.Changes
C# Enums and Configuration
AllTipsShownBehavioursenum inConfiguration.cswith values:ClearShownTipsList = 0(default) - Clears the shown tips list and continues showing all tips in rotationDoNotShowTips = 1- Stops showing tips automatically when all tips have been shownAllTipsShownBehaviourproperty to theConfigurationclassPowerShell Logic
TestIfUnseenTipsExistfunction that compares all tip IDs againstTipIdsAlreadyShown.txtWriteAutomaticPowerShellTipIfNeededto checkAllTipsShownBehaviourafter cadence evaluationAllTipsShownBehaviourparameter toSet-TiPSConfigurationwith updated help text and examplesDocumentation
DoNotShowTipsoptionTests
DoNotShowTipsoption behavior (shows tip when unseen tips exist, skips when all shown)TestIfUnseenTipsExisthelper functionDesign
This approach separates two orthogonal concerns:
This allows users to combine any cadence with the all-tips-shown behavior for maximum flexibility.
Usage
Original prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.