Skip to content

Commit a6de129

Browse files
committed
work around cyclic dependency
1 parent 6421e91 commit a6de129

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/vs/workbench/contrib/chat/browser/actions/chatAccessibilityHelp.ts

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat';
1212
import { AccessibleViewType, IAccessibleViewService } from 'vs/workbench/contrib/accessibility/browser/accessibleView';
1313
import { AccessibilityVerbositySettingId, AccessibleViewProviderId } from 'vs/workbench/contrib/accessibility/browser/accessibilityConfiguration';
1414
import { AccessibleDiffViewerNext } from 'vs/editor/browser/widget/diffEditor/commands';
15+
import { INLINE_CHAT_ID } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
1516

1617
export function getAccessibilityHelpText(accessor: ServicesAccessor, type: 'panelChat' | 'inlineChat'): string {
1718
const keybindingService = accessor.get(IKeybindingService);
@@ -80,11 +81,12 @@ export async function runAccessibilityHelpAction(accessor: ServicesAccessor, edi
8081
if (type === 'panelChat' && cachedPosition) {
8182
inputEditor.setPosition(cachedPosition);
8283
inputEditor.focus();
84+
8385
} else if (type === 'inlineChat') {
84-
if (editor) {
85-
// TODO@jrieken
86-
// InlineChatController.get(editor)?.focus();
87-
}
86+
// TODO@jrieken find a better way for this
87+
const ctrl = <{ focus(): void } | undefined>editor?.getContribution(INLINE_CHAT_ID);
88+
ctrl?.focus();
89+
8890
}
8991
},
9092
options: { type: AccessibleViewType.Help }

0 commit comments

Comments
 (0)