Skip to content

Commit 4277a9a

Browse files
committed
Merge remote-tracking branch 'origin/main' into roblou/metropolitan-bear
2 parents 1d9355b + 3c40961 commit 4277a9a

File tree

20 files changed

+39
-38
lines changed

20 files changed

+39
-38
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -495,7 +495,7 @@ export class ExtHostChatAgents2 extends Disposable implements ExtHostChatAgentsS
495495

496496
// in-place converting for location-data
497497
let location: vscode.ChatRequestEditorData | vscode.ChatRequestNotebookData | undefined;
498-
if (request.locationData?.type === ChatAgentLocation.TextEditor) {
498+
if (request.locationData?.type === ChatAgentLocation.EditorInline) {
499499
// editor data
500500
const document = this._documents.getDocument(request.locationData.document);
501501
location = new extHostTypes.ChatRequestEditorData(document, typeConvert.Selection.to(request.locationData.selection), typeConvert.Range.to(request.locationData.wholeRange));

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3167,7 +3167,7 @@ export namespace ChatLocation {
31673167
case ChatAgentLocation.Notebook: return types.ChatLocation.Notebook;
31683168
case ChatAgentLocation.Terminal: return types.ChatLocation.Terminal;
31693169
case ChatAgentLocation.Chat: return types.ChatLocation.Panel;
3170-
case ChatAgentLocation.TextEditor: return types.ChatLocation.Editor;
3170+
case ChatAgentLocation.EditorInline: return types.ChatLocation.Editor;
31713171
}
31723172
}
31733173

@@ -3176,7 +3176,7 @@ export namespace ChatLocation {
31763176
case types.ChatLocation.Notebook: return ChatAgentLocation.Notebook;
31773177
case types.ChatLocation.Terminal: return ChatAgentLocation.Terminal;
31783178
case types.ChatLocation.Panel: return ChatAgentLocation.Chat;
3179-
case types.ChatLocation.Editor: return ChatAgentLocation.TextEditor;
3179+
case types.ChatLocation.Editor: return ChatAgentLocation.EditorInline;
31803180
}
31813181
}
31823182
}

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,7 @@ class OpenModelPickerAction extends Action2 {
339339
ChatContextKeys.languageModelsAreUserSelectable,
340340
ContextKeyExpr.or(
341341
ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Chat),
342-
ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.TextEditor),
342+
ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.EditorInline),
343343
ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Notebook),
344344
ContextKeyExpr.equals(ChatContextKeys.location.key, ChatAgentLocation.Terminal))
345345
)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -523,7 +523,7 @@ export class ChatEditingSession extends Disposable implements IChatEditingSessio
523523
get feature(): string {
524524
if (responseModel.session.initialLocation === ChatAgentLocation.Chat) {
525525
return 'sideBarChat';
526-
} else if (responseModel.session.initialLocation === ChatAgentLocation.TextEditor) {
526+
} else if (responseModel.session.initialLocation === ChatAgentLocation.EditorInline) {
527527
return 'inlineChat';
528528
}
529529
return responseModel.session.initialLocation;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1237,7 +1237,7 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
12371237
hoverDelegate,
12381238
hiddenItemStrategy: HiddenItemStrategy.Ignore, // keep it lean when hiding items and avoid a "..." overflow menu
12391239
actionViewItemProvider: (action, options) => {
1240-
if (this.location === ChatAgentLocation.Chat || this.location === ChatAgentLocation.TextEditor) {
1240+
if (this.location === ChatAgentLocation.Chat || this.location === ChatAgentLocation.EditorInline) {
12411241
if ((action.id === ChatSubmitAction.ID || action.id === CancelAction.ID || action.id === ChatEditingSessionSubmitAction.ID) && action instanceof MenuItemAction) {
12421242
const dropdownAction = this.instantiationService.createInstance(MenuItemAction, { id: 'chat.moreExecuteActions', title: localize('notebook.moreExecuteActionsLabel', "More..."), icon: Codicon.chevronDown }, undefined, undefined, undefined, undefined);
12431243
return this.instantiationService.createInstance(ChatSubmitDropdownActionItem, action, dropdownAction, { ...options, menuAsChild: false });

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ class SetupAgent extends Disposable implements IChatAgentImplementation {
126126
case ChatAgentLocation.Terminal:
127127
id = 'setup.terminal';
128128
break;
129-
case ChatAgentLocation.TextEditor:
129+
case ChatAgentLocation.EditorInline:
130130
id = 'setup.editor';
131131
break;
132132
case ChatAgentLocation.Notebook:
@@ -876,7 +876,7 @@ export class ChatSetupContribution extends Disposable implements IWorkbenchContr
876876
// Inline Agents
877877
disposables.add(SetupAgent.registerDefaultAgents(this.instantiationService, ChatAgentLocation.Terminal, undefined, context, controller).disposable);
878878
disposables.add(SetupAgent.registerDefaultAgents(this.instantiationService, ChatAgentLocation.Notebook, undefined, context, controller).disposable);
879-
disposables.add(SetupAgent.registerDefaultAgents(this.instantiationService, ChatAgentLocation.TextEditor, undefined, context, controller).disposable);
879+
disposables.add(SetupAgent.registerDefaultAgents(this.instantiationService, ChatAgentLocation.EditorInline, undefined, context, controller).disposable);
880880
}
881881

882882
// Built-In Agent + Tool (unless installed, signed-in and enabled)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ export class ChatImplicitContextContribution extends Disposable implements IWork
221221

222222
const isPromptFile = languageId && getPromptsTypeForLanguageId(languageId) !== undefined;
223223

224-
const widgets = updateWidget ? [updateWidget] : [...this.chatWidgetService.getWidgetsByLocations(ChatAgentLocation.Chat), ...this.chatWidgetService.getWidgetsByLocations(ChatAgentLocation.TextEditor)];
224+
const widgets = updateWidget ? [updateWidget] : [...this.chatWidgetService.getWidgetsByLocations(ChatAgentLocation.Chat), ...this.chatWidgetService.getWidgetsByLocations(ChatAgentLocation.EditorInline)];
225225
for (const widget of widgets) {
226226
if (!widget.input.implicitContext) {
227227
continue;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -805,7 +805,7 @@ class BuiltinDynamicCompletions extends Disposable {
805805
return;
806806
}
807807

808-
if (widget.location === ChatAgentLocation.TextEditor) {
808+
if (widget.location === ChatAgentLocation.EditorInline) {
809809
return;
810810
}
811811

src/vs/workbench/contrib/chat/common/chatService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -622,7 +622,7 @@ export interface IChatSendRequestData extends IChatSendRequestResponseState {
622622
}
623623

624624
export interface IChatEditorLocationData {
625-
type: ChatAgentLocation.TextEditor;
625+
type: ChatAgentLocation.EditorInline;
626626
document: URI;
627627
selection: ISelection;
628628
wholeRange: IRange;

src/vs/workbench/contrib/chat/common/chatServiceImpl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export class ChatService extends Disposable implements IChatService {
167167
private saveState(): void {
168168
const liveChats = Array.from(this._sessionModels.values())
169169
.filter(session =>
170-
this.shouldSaveToHistory(session.sessionId) && (session.initialLocation === ChatAgentLocation.Chat || session.initialLocation === ChatAgentLocation.TextEditor));
170+
this.shouldSaveToHistory(session.sessionId) && (session.initialLocation === ChatAgentLocation.Chat || session.initialLocation === ChatAgentLocation.EditorInline));
171171

172172
this._chatSessionStore.storeSessions(liveChats);
173173
}
@@ -1076,7 +1076,7 @@ export class ChatService extends Disposable implements IChatService {
10761076
throw new Error(`Unknown session: ${sessionId}`);
10771077
}
10781078

1079-
if (shouldSaveToHistory && (model.initialLocation === ChatAgentLocation.Chat || model.initialLocation === ChatAgentLocation.TextEditor)) {
1079+
if (shouldSaveToHistory && (model.initialLocation === ChatAgentLocation.Chat || model.initialLocation === ChatAgentLocation.EditorInline)) {
10801080
// Always preserve sessions that have custom titles, even if empty
10811081
if (model.getRequests().length === 0 && !model.customTitle) {
10821082
await this._chatSessionStore.deleteSession(sessionId);

0 commit comments

Comments
 (0)