Skip to content

Commit 634f834

Browse files
authored
Merge pull request microsoft#209046 from microsoft/merogge/chat-input
ensure chat location is panel for `ctrlCmd+upArrow` to focus chat response list
2 parents 82f8d08 + 6e9ba23 commit 634f834

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat';
2525
import { IChatEditorOptions } from 'vs/workbench/contrib/chat/browser/chatEditor';
2626
import { ChatEditorInput } from 'vs/workbench/contrib/chat/browser/chatEditorInput';
2727
import { ChatViewPane } from 'vs/workbench/contrib/chat/browser/chatViewPane';
28-
import { IChatAgentService } from 'vs/workbench/contrib/chat/common/chatAgents';
29-
import { CONTEXT_CHAT_INPUT_CURSOR_AT_TOP, CONTEXT_CHAT_INPUT_HAS_AGENT, CONTEXT_CHAT_INPUT_HAS_TEXT, CONTEXT_CHAT_REQUEST_IN_PROGRESS, CONTEXT_IN_CHAT_INPUT, CONTEXT_IN_CHAT_SESSION, CONTEXT_PROVIDER_EXISTS, CONTEXT_REQUEST, CONTEXT_RESPONSE } from 'vs/workbench/contrib/chat/common/chatContextKeys';
28+
import { ChatAgentLocation, IChatAgentService } from 'vs/workbench/contrib/chat/common/chatAgents';
29+
import { CONTEXT_CHAT_INPUT_CURSOR_AT_TOP, CONTEXT_CHAT_INPUT_HAS_AGENT, CONTEXT_CHAT_INPUT_HAS_TEXT, CONTEXT_CHAT_LOCATION, CONTEXT_CHAT_REQUEST_IN_PROGRESS, CONTEXT_IN_CHAT_INPUT, CONTEXT_IN_CHAT_SESSION, CONTEXT_PROVIDER_EXISTS, CONTEXT_REQUEST, CONTEXT_RESPONSE } from 'vs/workbench/contrib/chat/common/chatContextKeys';
3030
import { IChatContributionService } from 'vs/workbench/contrib/chat/common/chatContributionService';
3131
import { chatAgentLeader } from 'vs/workbench/contrib/chat/common/chatParserTypes';
3232
import { IChatDetail, IChatService } from 'vs/workbench/contrib/chat/common/chatService';
@@ -211,7 +211,7 @@ export function registerChatActions() {
211211
super({
212212
id: 'chat.action.focus',
213213
title: localize2('actions.interactiveSession.focus', 'Focus Chat List'),
214-
precondition: CONTEXT_IN_CHAT_INPUT,
214+
precondition: ContextKeyExpr.and(CONTEXT_IN_CHAT_INPUT, CONTEXT_CHAT_LOCATION.isEqualTo(ChatAgentLocation.Panel)),
215215
category: CHAT_CATEGORY,
216216
keybinding: [
217217
// On mac, require that the cursor is at the top of the input, to avoid stealing cmd+up to move the cursor to the top

0 commit comments

Comments
 (0)