5
5
6
6
import { URI } from '../../../../../../base/common/uri.js' ;
7
7
import { IFileService , IFileStatWithMetadata , IResolveMetadataFileOptions } from '../../../../../../platform/files/common/files.js' ;
8
- import { TerminalCompletionService , TerminalResourceRequestConfig } from '../../browser/terminalCompletionService.js' ;
8
+ import { TerminalCompletionService , TerminalResourceRequestConfig , type ITerminalCompletionProvider } from '../../browser/terminalCompletionService.js' ;
9
9
import { ensureNoDisposablesAreLeakedInTestSuite } from '../../../../../../base/test/common/utils.js' ;
10
10
import assert , { fail } from 'assert' ;
11
11
import { isWindows , type IProcessEnvironment } from '../../../../../../base/common/platform.js' ;
@@ -21,6 +21,7 @@ import { count } from '../../../../../../base/common/strings.js';
21
21
import { WindowsShellType } from '../../../../../../platform/terminal/common/terminal.js' ;
22
22
import { gitBashToWindowsPath , windowsToGitBashPath } from '../../browser/terminalGitBashHelpers.js' ;
23
23
import { ILogService , NullLogService } from '../../../../../../platform/log/common/log.js' ;
24
+ import { TerminalSuggestSettingId } from '../../common/terminalSuggestConfiguration.js' ;
24
25
25
26
const pathSeparator = isWindows ? '\\' : '/' ;
26
27
@@ -774,7 +775,7 @@ suite('TerminalCompletionService', () => {
774
775
suite ( 'Provider Configuration' , ( ) => {
775
776
// Test class that extends TerminalCompletionService to access protected methods
776
777
class TestTerminalCompletionService extends TerminalCompletionService {
777
- public _getEnabledProviders ( providers : ITerminalCompletionProvider [ ] ) : ITerminalCompletionProvider [ ] {
778
+ public getEnabledProviders ( providers : ITerminalCompletionProvider [ ] ) : ITerminalCompletionProvider [ ] {
778
779
return super . _getEnabledProviders ( providers ) ;
779
780
}
780
781
}
@@ -793,7 +794,8 @@ suite('TerminalCompletionService', () => {
793
794
label : `completion-from-${ id } ` ,
794
795
kind : TerminalCompletionItemKind . Method ,
795
796
replacementIndex : 0 ,
796
- replacementLength : 0
797
+ replacementLength : 0 ,
798
+ provider : id
797
799
} ]
798
800
} ;
799
801
}
@@ -806,7 +808,7 @@ suite('TerminalCompletionService', () => {
806
808
// Set empty configuration (no provider keys)
807
809
configurationService . setUserConfiguration ( TerminalSuggestSettingId . Providers , { } ) ;
808
810
809
- const result = testTerminalCompletionService . _getEnabledProviders ( providers ) ;
811
+ const result = testTerminalCompletionService . getEnabledProviders ( providers ) ;
810
812
811
813
// Both providers should be enabled since they're not explicitly disabled
812
814
assert . strictEqual ( result . length , 2 , 'Should enable both providers by default' ) ;
@@ -824,7 +826,7 @@ suite('TerminalCompletionService', () => {
824
826
'provider1' : false
825
827
} ) ;
826
828
827
- const result = testTerminalCompletionService . _getEnabledProviders ( providers ) ;
829
+ const result = testTerminalCompletionService . getEnabledProviders ( providers ) ;
828
830
829
831
// Only provider2 should be enabled
830
832
assert . strictEqual ( result . length , 1 , 'Should enable only one provider' ) ;
@@ -842,7 +844,7 @@ suite('TerminalCompletionService', () => {
842
844
'provider1' : true
843
845
} ) ;
844
846
845
- const result = testTerminalCompletionService . _getEnabledProviders ( providers ) ;
847
+ const result = testTerminalCompletionService . getEnabledProviders ( providers ) ;
846
848
847
849
// Both providers should be enabled
848
850
assert . strictEqual ( result . length , 2 , 'Should enable both providers' ) ;
@@ -862,7 +864,7 @@ suite('TerminalCompletionService', () => {
862
864
'provider2' : false
863
865
} ) ;
864
866
865
- const result = testTerminalCompletionService . _getEnabledProviders ( providers ) ;
867
+ const result = testTerminalCompletionService . getEnabledProviders ( providers ) ;
866
868
867
869
// provider1 and provider3 should be enabled, provider2 should be disabled
868
870
assert . strictEqual ( result . length , 2 , 'Should enable two providers' ) ;
0 commit comments