File tree Expand file tree Collapse file tree 2 files changed +15
-6
lines changed
Cody.VisualStudio/Services Expand file tree Collapse file tree 2 files changed +15
-6
lines changed Original file line number Diff line number Diff line change 1212
1313namespace Cody . VisualStudio . Tests
1414{
15- public class SmartApplyTests : PlaywrightTestsBase , IDisposable
15+ public class SmartApplyTests : PlaywrightTestsBase , IDisposable
1616 {
1717
1818 private readonly JoinableTaskContext _context = ThreadHelper . JoinableTaskContext ;
@@ -57,7 +57,7 @@ public async Task Apply_Suggestion_Is_Modifying_Point_Document()
5757 Assert . NotEqual ( modifiedText , originalText ) ;
5858 }
5959
60- [ VsFact ( Version = VsVersion . VS2022 ) ]
60+ [ VsFact ( Version = VsVersion . VS2022 , Skip = "Unstable" ) ]
6161 public async Task Apply_Suggestion_Is_Modifying_Manager_Document ( )
6262 {
6363 // given
@@ -88,7 +88,7 @@ private async Task ApplyLastSuggestionFor(string chatText)
8888 if ( hasHiddenClass )
8989 await apply . EvaluateAsync ( "element => element.classList.remove('tw-hidden')" ) ; // force shows "Apply" text so it will be possible to click on it
9090
91- await apply . ClickAsync ( new ( ) { Force = true } ) ;
91+ await apply . ClickAsync ( new ( ) { Force = true } ) ;
9292
9393 await EditAppliedAsync ( ) ;
9494 }
Original file line number Diff line number Diff line change 11using Cody . Core . Ide ;
22using Cody . Core . Logging ;
3- using Microsoft . VisualStudio . Settings ;
43using Microsoft . VisualStudio . Shell ;
54using System ;
65using System . Runtime . CompilerServices ;
@@ -12,6 +11,8 @@ public class VsVersionService : IVsVersionService
1211 {
1312 private readonly ILog _logger ;
1413
14+ private const string InsidersPrefix = "Insiders [" ;
15+
1516 public VsVersionService ( ILog logger )
1617 {
1718 _logger = logger ;
@@ -32,8 +33,16 @@ public VsVersionService(ILog logger)
3233
3334 private Version ParseVersion ( string version )
3435 {
35- int spaceIndex = version . IndexOf ( ' ' ) ;
36- if ( spaceIndex >= 0 ) version = version . Substring ( 0 , spaceIndex ) . Trim ( ) ;
36+ if ( version . StartsWith ( InsidersPrefix ) )
37+ {
38+ version = version . Substring ( InsidersPrefix . Length ) ;
39+ version = version . Replace ( "]" , string . Empty ) ;
40+ }
41+ else
42+ {
43+ int spaceIndex = version . IndexOf ( ' ' ) ;
44+ if ( spaceIndex >= 0 ) version = version . Substring ( 0 , spaceIndex ) . Trim ( ) ;
45+ }
3746
3847 return Version . Parse ( version ) ;
3948 }
You can’t perform that action at this time.
0 commit comments