@@ -902,6 +902,7 @@ impl TsServer {
902
902
options : GetCompletionsAtPositionOptions ,
903
903
format_code_settings : FormatCodeSettings ,
904
904
scope : Option < ModuleSpecifier > ,
905
+ token : CancellationToken ,
905
906
) -> Result < Option < CompletionInfo > , AnyError > {
906
907
let req = TscRequest :: GetCompletionsAtPosition ( Box :: new ( (
907
908
self . specifier_map . denormalize ( & specifier) ,
@@ -910,7 +911,9 @@ impl TsServer {
910
911
format_code_settings,
911
912
) ) ) ;
912
913
self
913
- . request :: < Option < CompletionInfo > > ( snapshot, req, scope)
914
+ . request_with_cancellation :: < Option < CompletionInfo > > (
915
+ snapshot, req, scope, token,
916
+ )
914
917
. await
915
918
. map ( |mut info| {
916
919
if let Some ( info) = & mut info {
@@ -3996,9 +3999,10 @@ impl CompletionEntry {
3996
3999
if let Some ( import_data) = & self . auto_import_data {
3997
4000
let import_mapper =
3998
4001
language_server. get_ts_response_import_mapper ( specifier) ;
3999
- let maybe_cached = resolution_cache
4000
- . get ( & ( import_data. normalized . clone ( ) , specifier. clone ( ) ) )
4001
- . cloned ( ) ;
4002
+ // let maybe_cached = resolution_cache
4003
+ // .get(&(import_data.normalized.clone(), specifier.clone()))
4004
+ // .cloned();
4005
+ let maybe_cached = None ;
4002
4006
if let Some ( mut new_specifier) = maybe_cached
4003
4007
. or_else ( || {
4004
4008
import_mapper. check_specifier ( & import_data. normalized , specifier)
@@ -6211,6 +6215,7 @@ mod tests {
6211
6215
} ,
6212
6216
Default :: default ( ) ,
6213
6217
Some ( temp_dir. url ( ) ) ,
6218
+ Default :: default ( ) ,
6214
6219
)
6215
6220
. await
6216
6221
. unwrap ( )
@@ -6404,6 +6409,7 @@ mod tests {
6404
6409
} ,
6405
6410
FormatCodeSettings :: from ( & fmt_options_config) ,
6406
6411
Some ( temp_dir. url ( ) ) ,
6412
+ Default :: default ( ) ,
6407
6413
)
6408
6414
. await
6409
6415
. unwrap ( )
0 commit comments