Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

revert pressing delete should remove a file from working set #238177

Merged
merged 1 commit into from
Jan 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -127,11 +127,6 @@ registerAction2(class RemoveFileFromWorkingSet extends WorkingSetAction {
order: 5,
group: 'navigation'
}],
keybinding: {
primary: KeyCode.Delete,
when: ContextKeyExpr.and(ChatContextKeys.location.isEqualTo(ChatAgentLocation.EditingSession), ChatContextKeys.inChatEditWorkingSet),
weight: KeybindingWeight.WorkbenchContrib,
}
});
}

Expand Down
6 changes: 0 additions & 6 deletions src/vs/workbench/contrib/chat/browser/chatInputPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,6 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
readonly onDidAcceptFollowup = this._onDidAcceptFollowup.event;

private readonly _attachmentModel: ChatAttachmentModel;
private _inChatEditWorkingSetCtx: IContextKey<boolean> | undefined;

public get attachmentModel(): ChatAttachmentModel {
return this._attachmentModel;
}
Expand Down Expand Up @@ -689,8 +687,6 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge
ChatContextKeys.inChatInput.bindTo(inputScopedContextKeyService).set(true);
const scopedInstantiationService = this._register(this.instantiationService.createChild(new ServiceCollection([IContextKeyService, inputScopedContextKeyService])));

this._inChatEditWorkingSetCtx = ChatContextKeys.inChatEditWorkingSet.bindTo(this.contextKeyService);

const { historyNavigationBackwardsEnablement, historyNavigationForwardsEnablement } = this._register(registerAndCreateHistoryNavigationContext(inputScopedContextKeyService, this));
this.historyNavigationBackwardsEnablement = historyNavigationBackwardsEnablement;
this.historyNavigationForewardsEnablement = historyNavigationForwardsEnablement;
Expand Down Expand Up @@ -1320,8 +1316,6 @@ export class ChatInputPart extends Disposable implements IHistoryNavigationWidge

// Working set
const workingSetContainer = innerContainer.querySelector('.chat-editing-session-list') as HTMLElement ?? dom.append(innerContainer, $('.chat-editing-session-list'));
this._register(addDisposableListener(workingSetContainer, 'focusin', () => this._inChatEditWorkingSetCtx?.set(true)));
this._register(addDisposableListener(workingSetContainer, 'focusout', () => this._inChatEditWorkingSetCtx?.set(false)));
if (!this._chatEditList) {
this._chatEditList = this._chatEditsListPool.get();
const list = this._chatEditList.object;
Expand Down
1 change: 0 additions & 1 deletion src/vs/workbench/contrib/chat/common/chatContextKeys.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ export namespace ChatContextKeys {
export const inputHasFocus = new RawContextKey<boolean>('chatInputHasFocus', false, { type: 'boolean', description: localize('interactiveInputHasFocus', "True when the chat input has focus.") });
export const inChatInput = new RawContextKey<boolean>('inChatInput', false, { type: 'boolean', description: localize('inInteractiveInput', "True when focus is in the chat input, false otherwise.") });
export const inChatSession = new RawContextKey<boolean>('inChat', false, { type: 'boolean', description: localize('inChat', "True when focus is in the chat widget, false otherwise.") });
export const inChatEditWorkingSet = new RawContextKey<boolean>('inChatEditWorkingSet', false, { type: 'boolean', description: localize('inChatEditWorkingSet', "True when focus is in the chat edit working set, false otherwise.") });
export const instructionsAttached = new RawContextKey<boolean>('chatInstructionsAttached', false, { type: 'boolean', description: localize('chatInstructionsAttachedContextDescription', "True when the chat has a prompt instructions attached.") });

export const supported = ContextKeyExpr.or(IsWebContext.toNegated(), RemoteNameContext.notEqualsTo('')); // supported on desktop and in web only with a remote connection
Expand Down
Loading