Skip to content

Commit ee6922b

Browse files
authored
1 parent 1a5b66a commit ee6922b

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ export class ArrowOutUpAction extends AbstractInlineChatAction {
217217
precondition: ContextKeyExpr.and(CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_FIRST, EditorContextKeys.isEmbeddedDiffEditor.negate(), CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
218218
keybinding: {
219219
weight: KeybindingWeight.EditorCore,
220-
primary: KeyCode.UpArrow
220+
primary: KeyMod.CtrlCmd | KeyCode.UpArrow
221221
}
222222
});
223223
}
@@ -235,7 +235,7 @@ export class ArrowOutDownAction extends AbstractInlineChatAction {
235235
precondition: ContextKeyExpr.and(CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_LAST, EditorContextKeys.isEmbeddedDiffEditor.negate(), CONTEXT_ACCESSIBILITY_MODE_ENABLED.negate()),
236236
keybinding: {
237237
weight: KeybindingWeight.EditorCore,
238-
primary: KeyCode.DownArrow
238+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow
239239
}
240240
});
241241
}
@@ -257,11 +257,11 @@ export class FocusInlineChat extends EditorAction2 {
257257
keybinding: [{
258258
weight: KeybindingWeight.EditorCore + 10, // win against core_command
259259
when: ContextKeyExpr.and(CTX_INLINE_CHAT_OUTER_CURSOR_POSITION.isEqualTo('above'), EditorContextKeys.isEmbeddedDiffEditor.negate()),
260-
primary: KeyCode.DownArrow,
260+
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
261261
}, {
262262
weight: KeybindingWeight.EditorCore + 10, // win against core_command
263263
when: ContextKeyExpr.and(CTX_INLINE_CHAT_OUTER_CURSOR_POSITION.isEqualTo('below'), EditorContextKeys.isEmbeddedDiffEditor.negate()),
264-
primary: KeyCode.UpArrow,
264+
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
265265
}]
266266
});
267267
}
@@ -280,7 +280,7 @@ export class PreviousFromHistory extends AbstractInlineChatAction {
280280
precondition: ContextKeyExpr.and(CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_START),
281281
keybinding: {
282282
weight: KeybindingWeight.EditorCore + 10, // win against core_command
283-
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
283+
primary: KeyCode.UpArrow,
284284
}
285285
});
286286
}
@@ -299,7 +299,7 @@ export class NextFromHistory extends AbstractInlineChatAction {
299299
precondition: ContextKeyExpr.and(CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_INNER_CURSOR_END),
300300
keybinding: {
301301
weight: KeybindingWeight.EditorCore + 10, // win against core_command
302-
primary: KeyMod.CtrlCmd | KeyCode.DownArrow,
302+
primary: KeyCode.DownArrow,
303303
}
304304
});
305305
}

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

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur
3434
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
3535
import { IDialogService } from 'vs/platform/dialogs/common/dialogs';
3636
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
37-
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
3837
import { ILogService } from 'vs/platform/log/common/log';
3938
import { Progress } from 'vs/platform/progress/common/progress';
4039
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
@@ -145,7 +144,6 @@ export class InlineChatController implements IEditorContribution {
145144
@IDialogService private readonly _dialogService: IDialogService,
146145
@IContextKeyService contextKeyService: IContextKeyService,
147146
@IAccessibilityService private readonly _accessibilityService: IAccessibilityService,
148-
@IKeybindingService private readonly _keybindingService: IKeybindingService,
149147
@IChatAccessibilityService private readonly _chatAccessibilityService: IChatAccessibilityService,
150148
@IChatAgentService private readonly _chatAgentService: IChatAgentService,
151149
@IBulkEditService private readonly _bulkEditService: IBulkEditService,
@@ -481,16 +479,7 @@ export class InlineChatController implements IEditorContribution {
481479
}
482480

483481
private _getPlaceholderText(): string {
484-
let result = this._forcedPlaceholder ?? this._activeSession?.session.placeholder ?? localize('default.placeholder', "Ask a question");
485-
if (typeof this._forcedPlaceholder === 'undefined' && InlineChatController._promptHistory.length > 0) {
486-
const kb1 = this._keybindingService.lookupKeybinding('inlineChat.previousFromHistory')?.getLabel();
487-
const kb2 = this._keybindingService.lookupKeybinding('inlineChat.nextFromHistory')?.getLabel();
488-
489-
if (kb1 && kb2) {
490-
result = localize('default.placeholder.history', "{0} ({1}, {2} for history)", result, kb1, kb2);
491-
}
492-
}
493-
return result;
482+
return this._forcedPlaceholder ?? this._activeSession?.session.placeholder ?? localize('default.placeholder', "Ask a question");
494483
}
495484

496485

0 commit comments

Comments
 (0)