@@ -11,10 +11,14 @@ namespace PwshSpectreConsole.TextMate.Cmdlets;
1111/// Provides detailed diagnostic information for troubleshooting rendering issues.
1212/// </summary>
1313[ Cmdlet ( VerbsDiagnostic . Debug , "TextMate" , DefaultParameterSetName = "String" ) ]
14+ [ OutputType ( typeof ( Test . TextMateDebug ) ) ]
1415public sealed class DebugTextMateCmdlet : PSCmdlet
1516{
1617 private readonly List < string > _inputObjectBuffer = new ( ) ;
1718
19+ /// <summary>
20+ /// String content to debug.
21+ /// </summary>
1822 [ Parameter (
1923 Mandatory = true ,
2024 ValueFromPipeline = true ,
@@ -23,6 +27,9 @@ public sealed class DebugTextMateCmdlet : PSCmdlet
2327 [ AllowEmptyString ]
2428 public string InputObject { get ; set ; } = null ! ;
2529
30+ /// <summary>
31+ /// Path to file to debug.
32+ /// </summary>
2633 [ Parameter (
2734 Mandatory = true ,
2835 ValueFromPipelineByPropertyName = true ,
@@ -33,15 +40,24 @@ public sealed class DebugTextMateCmdlet : PSCmdlet
3340 [ Alias ( "FullName" ) ]
3441 public string Path { get ; set ; } = null ! ;
3542
43+ /// <summary>
44+ /// TextMate language ID (default: 'powershell').
45+ /// </summary>
3646 [ Parameter (
3747 ParameterSetName = "String"
3848 ) ]
3949 [ ValidateSet ( typeof ( TextMateLanguages ) ) ]
4050 public string Language { get ; set ; } = "powershell" ;
4151
52+ /// <summary>
53+ /// Color theme for debug output (default: Dark).
54+ /// </summary>
4255 [ Parameter ( ) ]
4356 public ThemeName Theme { get ; set ; } = ThemeName . Dark ;
4457
58+ /// <summary>
59+ /// Override file extension for language detection.
60+ /// </summary>
4561 [ Parameter (
4662 ParameterSetName = "Path"
4763 ) ]
@@ -50,6 +66,9 @@ public sealed class DebugTextMateCmdlet : PSCmdlet
5066 [ Alias ( "As" ) ]
5167 public string ExtensionOverride { get ; set ; } = null ! ;
5268
69+ /// <summary>
70+ /// Processes each input record from the pipeline.
71+ /// </summary>
5372 protected override void ProcessRecord ( )
5473 {
5574 if ( ParameterSetName == "String" && InputObject is not null )
@@ -58,6 +77,9 @@ protected override void ProcessRecord()
5877 }
5978 }
6079
80+ /// <summary>
81+ /// Finalizes processing and outputs debug information.
82+ /// </summary>
6183 protected override void EndProcessing ( )
6284 {
6385 try
@@ -98,33 +120,52 @@ protected override void EndProcessing()
98120/// Cmdlet for debugging individual TextMate tokens and their properties.
99121/// Provides low-level token analysis for detailed syntax highlighting inspection.
100122/// </summary>
123+ [ OutputType ( typeof ( Core . TokenDebugInfo ) ) ]
101124[ Cmdlet ( VerbsDiagnostic . Debug , "TextMateTokens" , DefaultParameterSetName = "String" ) ]
102125public sealed class DebugTextMateTokensCmdlet : PSCmdlet
103126{
104127 private readonly List < string > _inputObjectBuffer = new ( ) ;
105128
129+ /// <summary>
130+ /// String content to analyze tokens from.
131+ /// </summary>
106132 [ Parameter ( Mandatory = true , ValueFromPipeline = true , ParameterSetName = "String" ) ]
107133 [ AllowEmptyString ]
108134 public string InputObject { get ; set ; } = null ! ;
109135
136+ /// <summary>
137+ /// Path to file to analyze tokens from.
138+ /// </summary>
110139 [ Parameter ( Mandatory = true , ValueFromPipelineByPropertyName = true , ParameterSetName = "Path" , Position = 0 ) ]
111140 [ ValidateNotNullOrEmpty ]
112141 [ Alias ( "FullName" ) ]
113142 public string Path { get ; set ; } = null ! ;
114143
144+ /// <summary>
145+ /// TextMate language ID (default: 'powershell').
146+ /// </summary>
115147 [ Parameter ( ParameterSetName = "String" ) ]
116148 [ ValidateSet ( typeof ( TextMateLanguages ) ) ]
117149 public string Language { get ; set ; } = "powershell" ;
118150
151+ /// <summary>
152+ /// Color theme for token analysis (default: DarkPlus).
153+ /// </summary>
119154 [ Parameter ( ) ]
120155 public ThemeName Theme { get ; set ; } = ThemeName . DarkPlus ;
121156
157+ /// <summary>
158+ /// Override file extension for language detection.
159+ /// </summary>
122160 [ Parameter ( ParameterSetName = "Path" ) ]
123161 [ TextMateExtensionTransform ( ) ]
124162 [ ValidateSet ( typeof ( TextMateExtensions ) ) ]
125163 [ Alias ( "As" ) ]
126164 public string ExtensionOverride { get ; set ; } = null ! ;
127165
166+ /// <summary>
167+ /// Processes each input record from the pipeline.
168+ /// </summary>
128169 protected override void ProcessRecord ( )
129170 {
130171 if ( ParameterSetName == "String" && InputObject is not null )
@@ -133,6 +174,9 @@ protected override void ProcessRecord()
133174 }
134175 }
135176
177+ /// <summary>
178+ /// Finalizes processing and outputs token debug information.
179+ /// </summary>
136180 protected override void EndProcessing ( )
137181 {
138182 try
@@ -176,6 +220,9 @@ protected override void EndProcessing()
176220[ Cmdlet ( VerbsDiagnostic . Debug , "SixelSupport" ) ]
177221public sealed class DebugSixelSupportCmdlet : PSCmdlet
178222{
223+ /// <summary>
224+ /// Processes the cmdlet and outputs Sixel support diagnostic information.
225+ /// </summary>
179226 protected override void ProcessRecord ( )
180227 {
181228 try
@@ -214,12 +261,21 @@ protected override void ProcessRecord()
214261[ Cmdlet ( VerbsDiagnostic . Test , "ImageRendering" ) ]
215262public sealed class TestImageRenderingCmdlet : PSCmdlet
216263{
264+ /// <summary>
265+ /// URL or path to image for rendering test.
266+ /// </summary>
217267 [ Parameter ( Mandatory = true , Position = 0 ) ]
218268 public string ImageUrl { get ; set ; } = null ! ;
219269
220- [ Parameter ( ) ]
270+ /// <summary>
271+ /// Alternative text for the image.
272+ /// </summary>
273+ [ Parameter ( Position = 1 ) ]
221274 public string AltText { get ; set ; } = "Test Image" ;
222275
276+ /// <summary>
277+ /// Processes the cmdlet and tests image rendering.
278+ /// </summary>
223279 protected override void ProcessRecord ( )
224280 {
225281 try
0 commit comments