@@ -418,7 +418,7 @@ export class ChatListItemRenderer extends Disposable implements ITreeRenderer<Ch
418
418
} ) ) ;
419
419
420
420
if ( isResponseVM ( element ) ) {
421
- const info = {
421
+ const info : IChatCodeBlockInfo = {
422
422
codeBlockIndex : data . codeBlockIndex ,
423
423
element,
424
424
focus ( ) {
@@ -584,8 +584,8 @@ class CodeBlockPart extends Disposable implements IChatResultCodeBlockPart {
584
584
@IContextKeyService contextKeyService : IContextKeyService ,
585
585
@ILanguageService private readonly languageService : ILanguageService ,
586
586
@IModelService private readonly modelService : IModelService ,
587
- @IConfigurationService private readonly _configurationService : IConfigurationService ,
588
- @IAccessibilityService private readonly _accessibilityService : IAccessibilityService
587
+ @IConfigurationService private readonly configurationService : IConfigurationService ,
588
+ @IAccessibilityService private readonly accessibilityService : IAccessibilityService
589
589
) {
590
590
super ( ) ;
591
591
this . element = $ ( '.interactive-result-editor-wrapper' ) ;
@@ -598,8 +598,8 @@ class CodeBlockPart extends Disposable implements IChatResultCodeBlockPart {
598
598
} ) ) ;
599
599
600
600
this . _configureForScreenReader ( ) ;
601
- this . _register ( this . _accessibilityService . onDidChangeScreenReaderOptimized ( ( ) => this . _configureForScreenReader ( ) ) ) ;
602
- this . _register ( this . _configurationService . onDidChangeConfiguration ( ( e ) => {
601
+ this . _register ( this . accessibilityService . onDidChangeScreenReaderOptimized ( ( ) => this . _configureForScreenReader ( ) ) ) ;
602
+ this . _register ( this . configurationService . onDidChangeConfiguration ( ( e ) => {
603
603
if ( e . affectedKeys . has ( AccessibilityVerbositySettingId . Chat ) ) {
604
604
this . _configureForScreenReader ( ) ;
605
605
}
@@ -648,9 +648,11 @@ class CodeBlockPart extends Disposable implements IChatResultCodeBlockPart {
648
648
}
649
649
} ) ) ;
650
650
this . _register ( this . editor . onDidBlurEditorWidget ( ( ) => {
651
+ this . element . classList . remove ( 'focused' ) ;
651
652
WordHighlighterContribution . get ( this . editor ) ?. stopHighlighting ( ) ;
652
653
} ) ) ;
653
654
this . _register ( this . editor . onDidFocusEditorWidget ( ( ) => {
655
+ this . element . classList . add ( 'focused' ) ;
654
656
WordHighlighterContribution . get ( this . editor ) ?. restoreViewState ( true ) ;
655
657
} ) ) ;
656
658
@@ -675,9 +677,9 @@ class CodeBlockPart extends Disposable implements IChatResultCodeBlockPart {
675
677
676
678
private _configureForScreenReader ( ) : void {
677
679
const toolbarElt = this . toolbar . getElement ( ) ;
678
- if ( this . _accessibilityService . isScreenReaderOptimized ( ) ) {
680
+ if ( this . accessibilityService . isScreenReaderOptimized ( ) ) {
679
681
toolbarElt . style . display = 'block' ;
680
- toolbarElt . ariaLabel = this . _configurationService . getValue ( AccessibilityVerbositySettingId . Chat ) ? localize ( 'chat.codeBlock.toolbarVerbose' , 'Toolbar for code block which can be reached via tab' ) : localize ( 'chat.codeBlock.toolbar' , 'Code block toolbar' ) ;
682
+ toolbarElt . ariaLabel = this . configurationService . getValue ( AccessibilityVerbositySettingId . Chat ) ? localize ( 'chat.codeBlock.toolbarVerbose' , 'Toolbar for code block which can be reached via tab' ) : localize ( 'chat.codeBlock.toolbar' , 'Code block toolbar' ) ;
681
683
} else {
682
684
toolbarElt . style . display = '' ;
683
685
}
0 commit comments