Skip to content

Commit 2538cc4

Browse files
authored
Merge pull request microsoft#184508 from microsoft/aiday/renamingIEtoIC
Renaming Ineractive Editor to Inline Chat inside of the InlineChat contribution folder
2 parents 3ccf16e + c529638 commit 2538cc4

19 files changed

+391
-391
lines changed

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

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -312,15 +312,15 @@
312312
"--vscode-inputValidation-warningBackground",
313313
"--vscode-inputValidation-warningBorder",
314314
"--vscode-inputValidation-warningForeground",
315-
"--vscode-interactiveEditor-border",
316-
"--vscode-interactiveEditor-regionHighlight",
317-
"--vscode-interactiveEditor-shadow",
318-
"--vscode-interactiveEditorDiff-inserted",
319-
"--vscode-interactiveEditorDiff-removed",
320-
"--vscode-interactiveEditorInput-background",
321-
"--vscode-interactiveEditorInput-border",
322-
"--vscode-interactiveEditorInput-focusBorder",
323-
"--vscode-interactiveEditorInput-placeholderForeground",
315+
"--vscode-inlineChat-border",
316+
"--vscode-inlineChat-regionHighlight",
317+
"--vscode-inlineChat-shadow",
318+
"--vscode-inlineChatDiff-inserted",
319+
"--vscode-inlineChatDiff-removed",
320+
"--vscode-inlineChatInput-background",
321+
"--vscode-inlineChatInput-border",
322+
"--vscode-inlineChatInput-focusBorder",
323+
"--vscode-inlineChatInput-placeholderForeground",
324324
"--vscode-keybindingLabel-background",
325325
"--vscode-keybindingLabel-border",
326326
"--vscode-keybindingLabel-bottomBorder",

src/vs/workbench/api/browser/mainThreadInteractiveEditor.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
*--------------------------------------------------------------------------------------------*/
55

66
import { DisposableMap } from 'vs/base/common/lifecycle';
7-
import { IInteractiveEditorBulkEditResponse, IInteractiveEditorResponse, IInteractiveEditorService } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
7+
import { IInlineChatBulkEditResponse, IInlineChatResponse, IInlineChatService } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
88
import { IUriIdentityService } from 'vs/platform/uriIdentity/common/uriIdentity';
99
import { reviveWorkspaceEditDto } from 'vs/workbench/api/browser/mainThreadBulkEdits';
1010
import { ExtHostContext, ExtHostInteractiveEditorShape, MainContext, MainThreadInteractiveEditorShape } from 'vs/workbench/api/common/extHost.protocol';
@@ -18,7 +18,7 @@ export class MainThreadInteractiveEditor implements MainThreadInteractiveEditorS
1818

1919
constructor(
2020
extHostContext: IExtHostContext,
21-
@IInteractiveEditorService private readonly _interactiveEditorService: IInteractiveEditorService,
21+
@IInlineChatService private readonly _inlineChatService: IInlineChatService,
2222
@IUriIdentityService private readonly _uriIdentService: IUriIdentityService,
2323
) {
2424
this._proxy = extHostContext.getProxy(ExtHostContext.ExtHostInteractiveEditor);
@@ -29,9 +29,9 @@ export class MainThreadInteractiveEditor implements MainThreadInteractiveEditorS
2929
}
3030

3131
async $registerInteractiveEditorProvider(handle: number, debugName: string, supportsFeedback: boolean): Promise<void> {
32-
const unreg = this._interactiveEditorService.addProvider({
32+
const unreg = this._inlineChatService.addProvider({
3333
debugName,
34-
prepareInteractiveEditorSession: async (model, range, token) => {
34+
prepareInlineChatSession: async (model, range, token) => {
3535
const session = await this._proxy.$prepareInteractiveSession(handle, model.uri, range, token);
3636
if (!session) {
3737
return undefined;
@@ -46,11 +46,11 @@ export class MainThreadInteractiveEditor implements MainThreadInteractiveEditorS
4646
provideResponse: async (item, request, token) => {
4747
const result = await this._proxy.$provideResponse(handle, item, request, token);
4848
if (result?.type === 'bulkEdit') {
49-
(<IInteractiveEditorBulkEditResponse>result).edits = reviveWorkspaceEditDto(result.edits, this._uriIdentService);
49+
(<IInlineChatBulkEditResponse>result).edits = reviveWorkspaceEditDto(result.edits, this._uriIdentService);
5050
}
51-
return <IInteractiveEditorResponse | undefined>result;
51+
return <IInlineChatResponse | undefined>result;
5252
},
53-
handleInteractiveEditorResponseFeedback: !supportsFeedback ? undefined : async (session, response, kind) => {
53+
handleInlineChatResponseFeedback: !supportsFeedback ? undefined : async (session, response, kind) => {
5454
this._proxy.$handleFeedback(handle, session.id, response.id, kind);
5555
}
5656
});

src/vs/workbench/api/common/extHost.protocol.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ import * as languages from 'vs/editor/common/languages';
2626
import { CharacterPair, CommentRule, EnterAction } from 'vs/editor/common/languages/languageConfiguration';
2727
import { EndOfLineSequence } from 'vs/editor/common/model';
2828
import { IModelChangedEvent } from 'vs/editor/common/model/mirrorTextModel';
29-
import { IInteractiveEditorRequest, IInteractiveEditorResponse, IInteractiveEditorSession, InteractiveEditorResponseFeedbackKind } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
29+
import { IInlineChatRequest, IInlineChatResponse, IInlineChatSession, InlineChatResponseFeedbackKind } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
3030
import { IAccessibilityInformation } from 'vs/platform/accessibility/common/accessibility';
3131
import { ConfigurationTarget, IConfigurationChange, IConfigurationData, IConfigurationOverrides } from 'vs/platform/configuration/common/configuration';
3232
import { ConfigurationScope } from 'vs/platform/configuration/common/configurationRegistry';
@@ -1120,12 +1120,12 @@ export interface MainThreadInteractiveEditorShape extends IDisposable {
11201120
$unregisterInteractiveEditorProvider(handle: number): Promise<void>;
11211121
}
11221122

1123-
export type IInteractiveEditorResponseDto = Dto<IInteractiveEditorResponse>;
1123+
export type IInteractiveEditorResponseDto = Dto<IInlineChatResponse>;
11241124

11251125
export interface ExtHostInteractiveEditorShape {
1126-
$prepareInteractiveSession(handle: number, uri: UriComponents, range: ISelection, token: CancellationToken): Promise<IInteractiveEditorSession | undefined>;
1127-
$provideResponse(handle: number, session: IInteractiveEditorSession, request: IInteractiveEditorRequest, token: CancellationToken): Promise<IInteractiveEditorResponseDto | undefined>;
1128-
$handleFeedback(handle: number, sessionId: number, responseId: number, kind: InteractiveEditorResponseFeedbackKind): void;
1126+
$prepareInteractiveSession(handle: number, uri: UriComponents, range: ISelection, token: CancellationToken): Promise<IInlineChatSession | undefined>;
1127+
$provideResponse(handle: number, session: IInlineChatSession, request: IInlineChatRequest, token: CancellationToken): Promise<IInteractiveEditorResponseDto | undefined>;
1128+
$handleFeedback(handle: number, sessionId: number, responseId: number, kind: InlineChatResponseFeedbackKind): void;
11291129
$releaseSession(handle: number, sessionId: number): void;
11301130
}
11311131

src/vs/workbench/api/common/extHostInteractiveEditor.ts

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { CancellationToken } from 'vs/base/common/cancellation';
77
import { toDisposable } from 'vs/base/common/lifecycle';
88
import { URI, UriComponents } from 'vs/base/common/uri';
99
import { ISelection } from 'vs/editor/common/core/selection';
10-
import { IInteractiveEditorSession, IInteractiveEditorRequest, InteractiveEditorResponseFeedbackKind, InteractiveEditorResponseType } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
10+
import { IInlineChatSession, IInlineChatRequest, InlineChatResponseFeedbackKind, InlineChatResponseType } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
1111
import { IRelaxedExtensionDescription } from 'vs/platform/extensions/common/extensions';
1212
import { ILogService } from 'vs/platform/log/common/log';
1313
import { ExtHostInteractiveEditorShape, IInteractiveEditorResponseDto, IMainContext, MainContext, MainThreadInteractiveEditorShape } from 'vs/workbench/api/common/extHost.protocol';
@@ -95,7 +95,7 @@ export class ExtHostInteractiveEditor implements ExtHostInteractiveEditorShape {
9595
});
9696
}
9797

98-
async $prepareInteractiveSession(handle: number, uri: UriComponents, range: ISelection, token: CancellationToken): Promise<IInteractiveEditorSession | undefined> {
98+
async $prepareInteractiveSession(handle: number, uri: UriComponents, range: ISelection, token: CancellationToken): Promise<IInlineChatSession | undefined> {
9999
const entry = this._inputProvider.get(handle);
100100
if (!entry) {
101101
this._logService.warn('CANNOT prepare session because the PROVIDER IS GONE');
@@ -125,7 +125,7 @@ export class ExtHostInteractiveEditor implements ExtHostInteractiveEditorShape {
125125
};
126126
}
127127

128-
async $provideResponse(handle: number, item: IInteractiveEditorSession, request: IInteractiveEditorRequest, token: CancellationToken): Promise<IInteractiveEditorResponseDto | undefined> {
128+
async $provideResponse(handle: number, item: IInlineChatSession, request: IInlineChatRequest, token: CancellationToken): Promise<IInteractiveEditorResponseDto | undefined> {
129129
const entry = this._inputProvider.get(handle);
130130
if (!entry) {
131131
return undefined;
@@ -156,7 +156,7 @@ export class ExtHostInteractiveEditor implements ExtHostInteractiveEditorShape {
156156
return {
157157
...stub,
158158
id,
159-
type: InteractiveEditorResponseType.Message,
159+
type: InlineChatResponseType.Message,
160160
message: typeConvert.MarkdownString.from(res.contents),
161161
};
162162
}
@@ -166,15 +166,15 @@ export class ExtHostInteractiveEditor implements ExtHostInteractiveEditorShape {
166166
return {
167167
...stub,
168168
id,
169-
type: InteractiveEditorResponseType.BulkEdit,
169+
type: InlineChatResponseType.BulkEdit,
170170
edits: typeConvert.WorkspaceEdit.from(edits),
171171
};
172172

173173
} else if (Array.isArray(edits)) {
174174
return {
175175
...stub,
176176
id,
177-
type: InteractiveEditorResponseType.EditorEdit,
177+
type: InlineChatResponseType.EditorEdit,
178178
edits: edits.map(typeConvert.TextEdit.from),
179179
};
180180
}
@@ -183,7 +183,7 @@ export class ExtHostInteractiveEditor implements ExtHostInteractiveEditorShape {
183183
return undefined;
184184
}
185185

186-
$handleFeedback(handle: number, sessionId: number, responseId: number, kind: InteractiveEditorResponseFeedbackKind): void {
186+
$handleFeedback(handle: number, sessionId: number, responseId: number, kind: InlineChatResponseFeedbackKind): void {
187187
const entry = this._inputProvider.get(handle);
188188
const sessionData = this._inputSessions.get(sessionId);
189189
const response = sessionData?.responses[responseId];
@@ -192,13 +192,13 @@ export class ExtHostInteractiveEditor implements ExtHostInteractiveEditorShape {
192192
// todo@jrieken move to type converter
193193
let apiKind: extHostTypes.InteractiveEditorResponseFeedbackKind;
194194
switch (kind) {
195-
case InteractiveEditorResponseFeedbackKind.Helpful:
195+
case InlineChatResponseFeedbackKind.Helpful:
196196
apiKind = extHostTypes.InteractiveEditorResponseFeedbackKind.Helpful;
197197
break;
198-
case InteractiveEditorResponseFeedbackKind.Unhelpful:
198+
case InlineChatResponseFeedbackKind.Unhelpful:
199199
apiKind = extHostTypes.InteractiveEditorResponseFeedbackKind.Unhelpful;
200200
break;
201-
case InteractiveEditorResponseFeedbackKind.Undone:
201+
case InlineChatResponseFeedbackKind.Undone:
202202
apiKind = extHostTypes.InteractiveEditorResponseFeedbackKind.Undone;
203203
break;
204204
}

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

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

66
import { registerAction2 } from 'vs/platform/actions/common/actions';
77
import { EditorContributionInstantiation, registerEditorContribution } from 'vs/editor/browser/editorExtensions';
8-
import { InteractiveEditorController } from 'vs/workbench/contrib/inlineChat/browser/inlineChatController';
9-
import * as interactiveEditorActions from 'vs/workbench/contrib/inlineChat/browser/inlineChatActions';
10-
import { IInteractiveEditorService, INTERACTIVE_EDITOR_ID } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
8+
import { InlineChatController } from 'vs/workbench/contrib/inlineChat/browser/inlineChatController';
9+
import * as InlineChatActions from 'vs/workbench/contrib/inlineChat/browser/inlineChatActions';
10+
import { IInlineChatService, INLINE_CHAT_ID } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
1111
import { InstantiationType, registerSingleton } from 'vs/platform/instantiation/common/extensions';
12-
import { InteractiveEditorServiceImpl } from 'vs/workbench/contrib/inlineChat/common/inlineChatServiceImpl';
13-
import { IInteractiveEditorSessionService, InteractiveEditorSessionService } from 'vs/workbench/contrib/inlineChat/browser/inlineChatSession';
12+
import { InlineChatServiceImpl } from 'vs/workbench/contrib/inlineChat/common/inlineChatServiceImpl';
13+
import { IInlineChatSessionService, InlineChatSessionService } from 'vs/workbench/contrib/inlineChat/browser/inlineChatSession';
1414
import { Registry } from 'vs/platform/registry/common/platform';
1515
import { IWorkbenchContributionsRegistry, Extensions } from 'vs/workbench/common/contributions';
1616
import { LifecyclePhase } from 'vs/workbench/services/lifecycle/common/lifecycle';
17-
import { InteractiveEditorNotebookContribution } from 'vs/workbench/contrib/inlineChat/browser/inlineChatNotebook';
17+
import { InlineChatNotebookContribution } from 'vs/workbench/contrib/inlineChat/browser/inlineChatNotebook';
1818

19-
registerSingleton(IInteractiveEditorService, InteractiveEditorServiceImpl, InstantiationType.Delayed);
20-
registerSingleton(IInteractiveEditorSessionService, InteractiveEditorSessionService, InstantiationType.Delayed);
19+
registerSingleton(IInlineChatService, InlineChatServiceImpl, InstantiationType.Delayed);
20+
registerSingleton(IInlineChatSessionService, InlineChatSessionService, InstantiationType.Delayed);
2121

22-
registerEditorContribution(INTERACTIVE_EDITOR_ID, InteractiveEditorController, EditorContributionInstantiation.Eager); // EAGER because of notebook dispose/create of editors
22+
registerEditorContribution(INLINE_CHAT_ID, InlineChatController, EditorContributionInstantiation.Eager); // EAGER because of notebook dispose/create of editors
2323

24-
registerAction2(interactiveEditorActions.StartSessionAction);
25-
registerAction2(interactiveEditorActions.UnstashSessionAction);
26-
registerAction2(interactiveEditorActions.MakeRequestAction);
27-
registerAction2(interactiveEditorActions.StopRequestAction);
28-
registerAction2(interactiveEditorActions.DiscardAction);
29-
registerAction2(interactiveEditorActions.DiscardToClipboardAction);
30-
registerAction2(interactiveEditorActions.DiscardUndoToNewFileAction);
31-
registerAction2(interactiveEditorActions.CancelSessionAction);
24+
registerAction2(InlineChatActions.StartSessionAction);
25+
registerAction2(InlineChatActions.UnstashSessionAction);
26+
registerAction2(InlineChatActions.MakeRequestAction);
27+
registerAction2(InlineChatActions.StopRequestAction);
28+
registerAction2(InlineChatActions.DiscardAction);
29+
registerAction2(InlineChatActions.DiscardToClipboardAction);
30+
registerAction2(InlineChatActions.DiscardUndoToNewFileAction);
31+
registerAction2(InlineChatActions.CancelSessionAction);
3232

33-
registerAction2(interactiveEditorActions.ArrowOutUpAction);
34-
registerAction2(interactiveEditorActions.ArrowOutDownAction);
35-
registerAction2(interactiveEditorActions.FocusInteractiveEditor);
36-
registerAction2(interactiveEditorActions.PreviousFromHistory);
37-
registerAction2(interactiveEditorActions.NextFromHistory);
38-
registerAction2(interactiveEditorActions.ViewInChatAction);
39-
registerAction2(interactiveEditorActions.ExpandMessageAction);
40-
registerAction2(interactiveEditorActions.ContractMessageAction);
41-
registerAction2(interactiveEditorActions.AccessibilityHelpEditorAction);
33+
registerAction2(InlineChatActions.ArrowOutUpAction);
34+
registerAction2(InlineChatActions.ArrowOutDownAction);
35+
registerAction2(InlineChatActions.FocusInlineChat);
36+
registerAction2(InlineChatActions.PreviousFromHistory);
37+
registerAction2(InlineChatActions.NextFromHistory);
38+
registerAction2(InlineChatActions.ViewInChatAction);
39+
registerAction2(InlineChatActions.ExpandMessageAction);
40+
registerAction2(InlineChatActions.ContractMessageAction);
41+
registerAction2(InlineChatActions.AccessibilityHelpEditorAction);
4242

43-
registerAction2(interactiveEditorActions.ToggleInlineDiff);
44-
registerAction2(interactiveEditorActions.FeebackHelpfulCommand);
45-
registerAction2(interactiveEditorActions.FeebackUnhelpfulCommand);
46-
registerAction2(interactiveEditorActions.ApplyPreviewEdits);
43+
registerAction2(InlineChatActions.ToggleInlineDiff);
44+
registerAction2(InlineChatActions.FeebackHelpfulCommand);
45+
registerAction2(InlineChatActions.FeebackUnhelpfulCommand);
46+
registerAction2(InlineChatActions.ApplyPreviewEdits);
4747

48-
registerAction2(interactiveEditorActions.CopyRecordings);
48+
registerAction2(InlineChatActions.CopyRecordings);
4949

5050

5151
Registry.as<IWorkbenchContributionsRegistry>(Extensions.Workbench)
52-
.registerWorkbenchContribution(InteractiveEditorNotebookContribution, LifecyclePhase.Restored);
52+
.registerWorkbenchContribution(InlineChatNotebookContribution, LifecyclePhase.Restored);

src/vs/workbench/contrib/inlineChat/browser/inlineChat.css

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
color: inherit;
1212
padding: 6px;
1313
border-radius: 6px;
14-
border: 1px solid var(--vscode-interactiveEditor-border);
15-
box-shadow: 0 4px 8px var(--vscode-interactiveEditor-shadow);
14+
border: 1px solid var(--vscode-inlineChat-border);
15+
box-shadow: 0 4px 8px var(--vscode-inlineChat-shadow);
1616
}
1717

1818
/* body */
@@ -25,30 +25,30 @@
2525
display: flex;
2626
box-sizing: border-box;
2727
border-radius: 2px;
28-
border: 1px solid var(--vscode-interactiveEditorInput-border);
28+
border: 1px solid var(--vscode-inlineChatInput-border);
2929
}
3030

3131
.monaco-editor .interactive-editor .body .content.synthetic-focus {
32-
outline: 1px solid var(--vscode-interactiveEditorInput-focusBorder);
32+
outline: 1px solid var(--vscode-inlineChatInput-focusBorder);
3333
}
3434

3535
.monaco-editor .interactive-editor .body .content .input {
3636
padding: 2px 2px 2px 4px;
3737
border-top-left-radius: 2px;
3838
border-bottom-left-radius: 2px;
39-
background-color: var(--vscode-interactiveEditorInput-background);
39+
background-color: var(--vscode-inlineChatInput-background);
4040
cursor: text;
4141
}
4242

4343
.monaco-editor .interactive-editor .body .content .input .monaco-editor-background {
44-
background-color: var(--vscode-interactiveEditorInput-background);
44+
background-color: var(--vscode-inlineChatInput-background);
4545
}
4646

4747
.monaco-editor .interactive-editor .body .content .input .editor-placeholder {
4848
position: absolute;
4949
z-index: 1;
5050
padding: 3px 0 0 0;
51-
color: var(--vscode-interactiveEditorInput-placeholderForeground);
51+
color: var(--vscode-inlineChatInput-placeholderForeground);
5252
white-space: nowrap;
5353
overflow: hidden;
5454
text-overflow: ellipsis;
@@ -68,7 +68,7 @@
6868
padding-right: 4px;
6969
border-top-right-radius: 2px;
7070
border-bottom-right-radius: 2px;
71-
background: var(--vscode-interactiveEditorInput-background);
71+
background: var(--vscode-inlineChatInput-background);
7272
}
7373

7474
.monaco-editor .interactive-editor .body .toolbar .actions-container {
@@ -215,7 +215,7 @@
215215
.monaco-editor .interactive-editor .previewDiff {
216216
display: inherit;
217217
padding: 6px;
218-
border: 1px solid var(--vscode-interactiveEditor-border);
218+
border: 1px solid var(--vscode-inlineChat-border);
219219
border-top: none;
220220
border-bottom-left-radius: 2px;
221221
border-bottom-right-radius: 2px;
@@ -229,7 +229,7 @@
229229
.monaco-editor .interactive-editor .previewCreate {
230230
display: inherit;
231231
padding: 6px;
232-
border: 1px solid var(--vscode-interactiveEditor-border);
232+
border: 1px solid var(--vscode-inlineChat-border);
233233
border-radius: 2px;
234234
margin: 0 2px 6px 2px;
235235
}
@@ -252,7 +252,7 @@
252252
}
253253

254254
.monaco-editor .interactive-editor-block-selection {
255-
background-color: var(--vscode-interactiveEditor-regionHighlight);
255+
background-color: var(--vscode-inlineChat-regionHighlight);
256256
}
257257

258258
.monaco-editor .interactive-editor-slash-command {
@@ -271,14 +271,14 @@
271271

272272
.monaco-editor .interactive-editor-diff-widget .monaco-diff-editor .monaco-editor-background,
273273
.monaco-editor .interactive-editor-diff-widget .monaco-diff-editor .monaco-editor .margin-view-overlays {
274-
background-color: var(--vscode-interactiveEditor-regionHighlight);
274+
background-color: var(--vscode-inlineChat-regionHighlight);
275275
}
276276

277277
/* create zone */
278278

279279
.monaco-editor .interactive-editor-newfile-widget {
280280
padding: 3px 0 6px 0;
281-
background-color: var(--vscode-interactiveEditor-regionHighlight);
281+
background-color: var(--vscode-inlineChat-regionHighlight);
282282
}
283283

284284
.monaco-editor .interactive-editor-newfile-widget .title {

0 commit comments

Comments
 (0)