Skip to content

Commit d052d31

Browse files
authored
More "chat" renames (microsoft#182990)
* More "chat" renames * More renames
1 parent 953275f commit d052d31

27 files changed

+217
-216
lines changed

build/lib/stylelint/vscode-known-variables.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636
"--vscode-charts-purple",
3737
"--vscode-charts-red",
3838
"--vscode-charts-yellow",
39+
"--vscode-chat-requestBackground",
40+
"--vscode-chat-requestBorder",
3941
"--vscode-checkbox-background",
4042
"--vscode-checkbox-border",
4143
"--vscode-checkbox-foreground",
@@ -304,8 +306,6 @@
304306
"--vscode-inputValidation-warningBackground",
305307
"--vscode-inputValidation-warningBorder",
306308
"--vscode-inputValidation-warningForeground",
307-
"--vscode-interactive-requestBackground",
308-
"--vscode-interactive-requestBorder",
309309
"--vscode-interactiveEditor-border",
310310
"--vscode-interactiveEditor-regionHighlight",
311311
"--vscode-interactiveEditor-shadow",

src/vs/base/common/network.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export namespace Schemas {
6969

7070
export const vscodeTerminal = 'vscode-terminal';
7171

72-
export const vscodeInteractiveSesssion = 'vscode-chat-editor';
72+
export const vscodeChatSesssion = 'vscode-chat-editor';
7373

7474
/**
7575
* Scheme used internally for webviews that aren't linked to a resource (i.e. not custom editors)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ export function getAccessibilityHelpText(accessor: ServicesAccessor, type: 'chat
2121
const content = [];
2222
content.push(localize('interactiveSession.helpMenuExit', "Exit this menu and return to the input via the Escape key."));
2323
if (type === 'chat') {
24-
content.push(descriptionForCommand('chat.action.focus', localize('workbench.action.chat.focus', 'The Focus Chat command ({0}) focuses the chat request/response list, which can be navigated with UpArrow/DownArrow.',), localize('workbench.action.chat.focusNoKb', 'The Focus Interactive Session command focuses the chat request/response list, which can be navigated with UpArrow/DownArrow and is currently not triggerable by a keybinding.'), keybindingService));
25-
content.push(descriptionForCommand('workbench.action.chat.focusInput', localize('workbench.action.chat.focusInput', 'The Focus Chat Input command ({0}) focuses the input box for chat requests.'), localize('workbench.action.interactiveSession.focusInputNoKb', 'Focus Interactive Session Input command focuses the input box for chat requests and is currently not triggerable by a keybinding.'), keybindingService));
24+
content.push(descriptionForCommand('chat.action.focus', localize('workbench.action.chat.focus', 'The Focus Chat command ({0}) focuses the chat request/response list, which can be navigated with UpArrow/DownArrow.',), localize('workbench.action.chat.focusNoKb', 'The Focus Chat List command focuses the chat request/response list, which can be navigated with UpArrow/DownArrow and is currently not triggerable by a keybinding.'), keybindingService));
25+
content.push(descriptionForCommand('workbench.action.chat.focusInput', localize('workbench.action.chat.focusInput', 'The Focus Chat Input command ({0}) focuses the input box for chat requests.'), localize('workbench.action.interactiveSession.focusInputNoKb', 'Focus Chat Input command focuses the input box for chat requests and is currently not triggerable by a keybinding.'), keybindingService));
2626
} else {
2727
content.push(localize('interactiveSession.makeRequest', "Tab once to reach the make request button, which will re-run the request."));
2828
const regex = /^(\/fix|\/explain)/;

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

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import { Codicon } from 'vs/base/common/codicons';
77
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
88
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
9-
import { EditorAction, ServicesAccessor, registerEditorAction } from 'vs/editor/browser/editorExtensions';
9+
import { EditorAction, EditorAction2, ServicesAccessor, registerEditorAction } from 'vs/editor/browser/editorExtensions';
1010
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
1111
import { localize } from 'vs/nls';
1212
import { Action2, IAction2Options, MenuId, registerAction2 } from 'vs/platform/actions/common/actions';
@@ -21,7 +21,7 @@ import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat';
2121
import { IChatEditorOptions } from 'vs/workbench/contrib/chat/browser/chatEditor';
2222
import { ChatEditorInput } from 'vs/workbench/contrib/chat/browser/chatEditorInput';
2323
import { ChatViewPane } from 'vs/workbench/contrib/chat/browser/chatViewPane';
24-
import { CONTEXT_IN_INTERACTIVE_INPUT, CONTEXT_IN_INTERACTIVE_SESSION } from 'vs/workbench/contrib/chat/common/chatContextKeys';
24+
import { CONTEXT_IN_CHAT_INPUT, CONTEXT_IN_CHAT_SESSION } from 'vs/workbench/contrib/chat/common/chatContextKeys';
2525
import { IChatDetail, IChatService } from 'vs/workbench/contrib/chat/common/chatService';
2626
import { IChatWidgetHistoryService } from 'vs/workbench/contrib/chat/common/chatWidgetHistoryService';
2727
import { IEditorService } from 'vs/workbench/services/editor/common/editorService';
@@ -35,7 +35,7 @@ export function registerChatActions() {
3535
id: 'chat.action.acceptInput',
3636
label: localize({ key: 'actions.chat.acceptInput', comment: ['Apply input from the chat input box'] }, "Accept Chat Input"),
3737
alias: 'Accept Chat Input',
38-
precondition: CONTEXT_IN_INTERACTIVE_INPUT,
38+
precondition: CONTEXT_IN_CHAT_INPUT,
3939
kbOpts: {
4040
kbExpr: EditorContextKeys.textInputFocus,
4141
primary: KeyCode.Enter,
@@ -101,22 +101,22 @@ export function registerChatActions() {
101101
}
102102
});
103103

104-
registerEditorAction(class FocusChatAction extends EditorAction {
104+
registerAction2(class FocusChatAction extends EditorAction2 {
105105
constructor() {
106106
super({
107107
id: 'chat.action.focus',
108-
label: localize('actions.interactiveSession.focus', "Focus Interactive Session"),
109-
alias: 'Focus Interactive Session',
110-
precondition: CONTEXT_IN_INTERACTIVE_INPUT,
111-
kbOpts: {
112-
kbExpr: EditorContextKeys.textInputFocus,
108+
title: { value: localize('actions.interactiveSession.focus', "Focus Chat List"), original: 'Focus Chat List' },
109+
precondition: CONTEXT_IN_CHAT_INPUT,
110+
category: CHAT_CATEGORY,
111+
keybinding: {
112+
when: EditorContextKeys.textInputFocus,
113113
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
114114
weight: KeybindingWeight.EditorContrib
115115
}
116116
});
117117
}
118118

119-
run(accessor: ServicesAccessor, editor: ICodeEditor): void | Promise<void> {
119+
runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor): void | Promise<void> {
120120
const editorUri = editor.getModel()?.uri;
121121
if (editorUri) {
122122
const widgetService = accessor.get(IChatWidgetService);
@@ -131,7 +131,7 @@ export function registerChatActions() {
131131
id: 'chat.action.accessibilityHelp',
132132
label: localize('chat.action.accessibiltyHelp', "Chat View Accessibility Help"),
133133
alias: 'Chat View Accessibility Help',
134-
precondition: CONTEXT_IN_INTERACTIVE_INPUT,
134+
precondition: CONTEXT_IN_CHAT_INPUT,
135135
kbOpts: {
136136
primary: KeyMod.Alt | KeyCode.F1,
137137
weight: KeybindingWeight.EditorContrib + 10
@@ -148,14 +148,14 @@ export function registerChatActions() {
148148
super({
149149
id: 'workbench.action.chat.focusInput',
150150
title: {
151-
value: localize('interactiveSession.focusInput.label', "Focus Input"),
152-
original: 'Focus Input'
151+
value: localize('interactiveSession.focusInput.label', "Focus Chat Input"),
152+
original: 'Focus Chat Input'
153153
},
154154
f1: false,
155155
keybinding: {
156156
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
157157
weight: KeybindingWeight.WorkbenchContrib,
158-
when: ContextKeyExpr.and(CONTEXT_IN_INTERACTIVE_SESSION, ContextKeyExpr.not(EditorContextKeys.focus.key))
158+
when: ContextKeyExpr.and(CONTEXT_IN_CHAT_SESSION, ContextKeyExpr.not(EditorContextKeys.focus.key))
159159
}
160160
});
161161
}
@@ -179,7 +179,7 @@ export function registerChatActions() {
179179
keybinding: {
180180
weight: KeybindingWeight.WorkbenchContrib,
181181
primary: KeyMod.WinCtrl | KeyCode.KeyL,
182-
when: CONTEXT_IN_INTERACTIVE_SESSION,
182+
when: CONTEXT_IN_CHAT_SESSION,
183183
mac: {
184184
primary: KeyMod.WinCtrl | KeyCode.KeyL,
185185
secondary: [KeyMod.CtrlCmd | KeyCode.KeyK]

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ import { TerminalLocation } from 'vs/platform/terminal/common/terminal';
2121
import { IUntitledTextResourceEditorInput } from 'vs/workbench/common/editor';
2222
import { CHAT_CATEGORY } from 'vs/workbench/contrib/chat/browser/actions/chatActions';
2323
import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat';
24-
import { CONTEXT_IN_INTERACTIVE_SESSION } from 'vs/workbench/contrib/chat/common/chatContextKeys';
24+
import { CONTEXT_IN_CHAT_SESSION } from 'vs/workbench/contrib/chat/common/chatContextKeys';
2525
import { IChatCopyAction, IChatService, IChatUserActionEvent, InteractiveSessionCopyKind } from 'vs/workbench/contrib/chat/common/chatService';
26-
import { IInteractiveResponseViewModel, isResponseVM } from 'vs/workbench/contrib/chat/common/chatViewModel';
26+
import { IChatResponseViewModel, isResponseVM } from 'vs/workbench/contrib/chat/common/chatViewModel';
2727
import { insertCell } from 'vs/workbench/contrib/notebook/browser/controller/cellOperations';
2828
import { INotebookEditor } from 'vs/workbench/contrib/notebook/browser/notebookBrowser';
2929
import { CellKind, NOTEBOOK_EDITOR_ID } from 'vs/workbench/contrib/notebook/common/notebookCommon';
@@ -35,7 +35,7 @@ export interface IChatCodeBlockActionContext {
3535
code: string;
3636
languageId: string;
3737
codeBlockIndex: number;
38-
element: IInteractiveResponseViewModel;
38+
element: IChatResponseViewModel;
3939
}
4040

4141
export function isCodeBlockActionContext(thing: unknown): thing is IChatCodeBlockActionContext {
@@ -374,7 +374,7 @@ export function registerChatCodeBlockActions() {
374374

375375
const focusResponse = curCodeBlockInfo ?
376376
curCodeBlockInfo.element :
377-
widget.viewModel?.getItems().reverse().find((item): item is IInteractiveResponseViewModel => isResponseVM(item));
377+
widget.viewModel?.getItems().reverse().find((item): item is IChatResponseViewModel => isResponseVM(item));
378378
if (!focusResponse) {
379379
return;
380380
}
@@ -398,7 +398,7 @@ export function registerChatCodeBlockActions() {
398398
keybinding: {
399399
primary: KeyCode.F9,
400400
weight: KeybindingWeight.WorkbenchContrib,
401-
when: CONTEXT_IN_INTERACTIVE_SESSION,
401+
when: CONTEXT_IN_CHAT_SESSION,
402402
},
403403
f1: true,
404404
category: CHAT_CATEGORY,
@@ -421,7 +421,7 @@ export function registerChatCodeBlockActions() {
421421
keybinding: {
422422
primary: KeyMod.Shift | KeyCode.F9,
423423
weight: KeybindingWeight.WorkbenchContrib,
424-
when: CONTEXT_IN_INTERACTIVE_SESSION,
424+
when: CONTEXT_IN_CHAT_SESSION,
425425
},
426426
f1: true,
427427
category: CHAT_CATEGORY,

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { Action2, MenuId, registerAction2 } from 'vs/platform/actions/common/act
99
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
1010
import { CHAT_CATEGORY } from 'vs/workbench/contrib/chat/browser/actions/chatActions';
1111
import { IChatWidgetService } from 'vs/workbench/contrib/chat/browser/chat';
12-
import { IInteractiveRequestViewModel, IInteractiveResponseViewModel, isRequestVM, isResponseVM } from 'vs/workbench/contrib/chat/common/chatViewModel';
12+
import { IChatRequestViewModel, IChatResponseViewModel, isRequestVM, isResponseVM } from 'vs/workbench/contrib/chat/common/chatViewModel';
1313

1414
export function registerChatCopyActions() {
1515
registerAction2(class CopyAllAction extends Action2 {
@@ -30,12 +30,12 @@ export function registerChatCopyActions() {
3030

3131
run(accessor: ServicesAccessor, ...args: any[]) {
3232
const clipboardService = accessor.get(IClipboardService);
33-
const interactiveWidgetService = accessor.get(IChatWidgetService);
34-
const widget = interactiveWidgetService.lastFocusedWidget;
33+
const chatWidgetService = accessor.get(IChatWidgetService);
34+
const widget = chatWidgetService.lastFocusedWidget;
3535
if (widget) {
3636
const viewModel = widget.viewModel;
3737
const sessionAsText = viewModel?.getItems()
38-
.filter((item): item is (IInteractiveRequestViewModel | IInteractiveResponseViewModel) => isRequestVM(item) || isResponseVM(item))
38+
.filter((item): item is (IChatRequestViewModel | IChatResponseViewModel) => isRequestVM(item) || isResponseVM(item))
3939
.map(stringifyItem)
4040
.join('\n\n');
4141
if (sessionAsText) {
@@ -74,7 +74,7 @@ export function registerChatCopyActions() {
7474
});
7575
}
7676

77-
function stringifyItem(item: IInteractiveRequestViewModel | IInteractiveResponseViewModel): string {
77+
function stringifyItem(item: IChatRequestViewModel | IChatResponseViewModel): string {
7878
return isRequestVM(item) ?
7979
`${item.username}: ${item.messageText}` : `${item.username}: ${item.response.value}`;
8080
}

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { localize } from 'vs/nls';
99
import { Action2, MenuId, registerAction2 } from 'vs/platform/actions/common/actions';
1010
import { CHAT_CATEGORY } from 'vs/workbench/contrib/chat/browser/actions/chatActions';
1111
import { IChatWidget } from 'vs/workbench/contrib/chat/browser/chat';
12-
import { CONTEXT_INTERACTIVE_INPUT_HAS_TEXT, CONTEXT_INTERACTIVE_REQUEST_IN_PROGRESS } from 'vs/workbench/contrib/chat/common/chatContextKeys';
12+
import { CONTEXT_CHAT_INPUT_HAS_TEXT, CONTEXT_CHAT_REQUEST_IN_PROGRESS } from 'vs/workbench/contrib/chat/common/chatContextKeys';
1313
import { IChatService } from 'vs/workbench/contrib/chat/common/chatService';
1414

1515
export interface IChatExecuteActionContext {
@@ -32,10 +32,10 @@ export function registerChatExecuteActions() {
3232
f1: false,
3333
category: CHAT_CATEGORY,
3434
icon: Codicon.send,
35-
precondition: CONTEXT_INTERACTIVE_INPUT_HAS_TEXT,
35+
precondition: CONTEXT_CHAT_INPUT_HAS_TEXT,
3636
menu: {
3737
id: MenuId.ChatExecute,
38-
when: CONTEXT_INTERACTIVE_REQUEST_IN_PROGRESS.negate(),
38+
when: CONTEXT_CHAT_REQUEST_IN_PROGRESS.negate(),
3939
group: 'navigation',
4040
}
4141
});
@@ -64,7 +64,7 @@ export function registerChatExecuteActions() {
6464
icon: Codicon.debugStop,
6565
menu: {
6666
id: MenuId.ChatExecute,
67-
when: CONTEXT_INTERACTIVE_REQUEST_IN_PROGRESS,
67+
when: CONTEXT_CHAT_REQUEST_IN_PROGRESS,
6868
group: 'navigation',
6969
}
7070
});

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
1717
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
1818
import { IQuickInputService, IQuickPick, IQuickPickItem } from 'vs/platform/quickinput/common/quickInput';
1919
import { asCssVariable, editorBackground, foreground, inputActiveOptionBackground, inputActiveOptionBorder, inputActiveOptionForeground } from 'vs/platform/theme/common/colorRegistry';
20-
import { InteractiveListItemRenderer } from 'vs/workbench/contrib/chat/browser/chatListRenderer';
20+
import { ChatListItemRenderer } from 'vs/workbench/contrib/chat/browser/chatListRenderer';
2121
import { ChatEditorOptions } from 'vs/workbench/contrib/chat/browser/chatOptions';
2222
import { ChatModel } from 'vs/workbench/contrib/chat/common/chatModel';
2323
import { IChatReplyFollowup, IChatService } from 'vs/workbench/contrib/chat/common/chatService';
@@ -184,7 +184,7 @@ class InteractiveQuickPickSession extends Disposable {
184184
this._listDisposable = new DisposableStore();
185185
const options = this._listDisposable.add(this._instantiationService.createInstance(ChatEditorOptions, 'quickpick-interactive', foreground, editorBackground, editorBackground));
186186
const list = this._listDisposable.add(this._instantiationService.createInstance(
187-
InteractiveListItemRenderer,
187+
ChatListItemRenderer,
188188
options,
189189
{
190190
getListLength: () => {

src/vs/workbench/contrib/chat/browser/chat.contribution.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,28 +45,28 @@ configurationRegistry.registerConfiguration({
4545
properties: {
4646
'chat.editor.fontSize': {
4747
type: 'number',
48-
description: nls.localize('interactiveSession.editor.fontSize', "Controls the font size in pixels in Interactive Sessions."),
48+
description: nls.localize('interactiveSession.editor.fontSize', "Controls the font size in pixels in chat codeblocks."),
4949
default: isMacintosh ? 12 : 14,
5050
},
5151
'chat.editor.fontFamily': {
5252
type: 'string',
53-
description: nls.localize('interactiveSession.editor.fontFamily', "Controls the font family in Interactive Sessions."),
53+
description: nls.localize('interactiveSession.editor.fontFamily', "Controls the font family in chat codeblocks."),
5454
default: 'default'
5555
},
5656
'chat.editor.fontWeight': {
5757
type: 'string',
58-
description: nls.localize('interactiveSession.editor.fontWeight', "Controls the font weight in Interactive Sessions."),
58+
description: nls.localize('interactiveSession.editor.fontWeight', "Controls the font weight in chat codeblocks."),
5959
default: 'default'
6060
},
6161
'chat.editor.wordWrap': {
6262
type: 'string',
63-
description: nls.localize('interactiveSession.editor.wordWrap', "Controls whether lines should wrap in Interactive Sessions."),
63+
description: nls.localize('interactiveSession.editor.wordWrap', "Controls whether lines should wrap in chat codeblocks."),
6464
default: 'off',
6565
enum: ['on', 'off']
6666
},
6767
'chat.editor.lineHeight': {
6868
type: 'number',
69-
description: nls.localize('interactiveSession.editor.lineHeight', "Controls the line height in pixels in Interactive Sessions. Use 0 to compute the line height from the font size."),
69+
description: nls.localize('interactiveSession.editor.lineHeight', "Controls the line height in pixels in chat codeblocks. Use 0 to compute the line height from the font size."),
7070
default: 0
7171
},
7272
'chat.experimental.quickQuestion.enable': {
@@ -98,15 +98,15 @@ class ChatResolverContribution extends Disposable {
9898
super();
9999

100100
this._register(editorResolverService.registerEditor(
101-
`${Schemas.vscodeInteractiveSesssion}:**/**`,
101+
`${Schemas.vscodeChatSesssion}:**/**`,
102102
{
103103
id: ChatEditorInput.EditorID,
104104
label: nls.localize('chat', "Chat"),
105105
priority: RegisteredEditorPriority.builtin
106106
},
107107
{
108108
singlePerResource: true,
109-
canSupportResource: resource => resource.scheme === Schemas.vscodeInteractiveSesssion
109+
canSupportResource: resource => resource.scheme === Schemas.vscodeChatSesssion
110110
},
111111
{
112112
createEditorInput: ({ resource, options }) => {

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { ICodeEditor } from 'vs/editor/browser/editorBrowser';
77
import { ISlashCommand } from 'vs/workbench/contrib/chat/common/chatService';
8-
import { IInteractiveResponseViewModel, IChatViewModel } from 'vs/workbench/contrib/chat/common/chatViewModel';
8+
import { IChatResponseViewModel, IChatViewModel } from 'vs/workbench/contrib/chat/common/chatViewModel';
99
import { Event } from 'vs/base/common/event';
1010
import { URI } from 'vs/base/common/uri';
1111
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
@@ -31,7 +31,7 @@ export interface IChatWidgetService {
3131

3232
export interface IChatCodeBlockInfo {
3333
codeBlockIndex: number;
34-
element: IInteractiveResponseViewModel;
34+
element: IChatResponseViewModel;
3535
focus(): void;
3636
}
3737

@@ -49,7 +49,7 @@ export interface IChatWidget {
4949
focusInput(): void;
5050
getSlashCommands(): Promise<ISlashCommand[] | undefined>;
5151
getCodeBlockInfoForEditor(uri: URI): IChatCodeBlockInfo | undefined;
52-
getCodeBlockInfosForResponse(response: IInteractiveResponseViewModel): IChatCodeBlockInfo[];
52+
getCodeBlockInfosForResponse(response: IChatResponseViewModel): IChatCodeBlockInfo[];
5353
}
5454

5555
export interface IChatViewPane {

0 commit comments

Comments
 (0)