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

chat.action.* commands are inconsistent with workbench.action.chat.* #190893

Closed
Tyriar opened this issue Aug 21, 2023 · 4 comments
Closed

chat.action.* commands are inconsistent with workbench.action.chat.* #190893

Tyriar opened this issue Aug 21, 2023 · 4 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member panel-chat

Comments

@Tyriar
Copy link
Member

Tyriar commented Aug 21, 2023

They're new so we should be consistent.

registerAction2(class FocusChatAction extends EditorAction2 {
constructor() {
super({
id: 'chat.action.focus',
title: { value: localize('actions.interactiveSession.focus', "Focus Chat List"), original: 'Focus Chat List' },
precondition: CONTEXT_IN_CHAT_INPUT,
category: CHAT_CATEGORY,
keybinding: {
when: EditorContextKeys.textInputFocus,
primary: KeyMod.CtrlCmd | KeyCode.UpArrow,
weight: KeybindingWeight.EditorContrib
}
});
}
runEditorCommand(accessor: ServicesAccessor, editor: ICodeEditor): void | Promise<void> {
const editorUri = editor.getModel()?.uri;
if (editorUri) {
const widgetService = accessor.get(IChatWidgetService);
widgetService.getWidgetByInputUri(editorUri)?.focusLastMessage();
}
}
});

registerEditorAction(class ChatAcceptInput extends EditorAction {
constructor() {
super({
id: 'chat.action.acceptInput',
label: localize({ key: 'actions.chat.acceptInput', comment: ['Apply input from the chat input box'] }, "Accept Chat Input"),
alias: 'Accept Chat Input',
precondition: CONTEXT_IN_CHAT_INPUT,
kbOpts: {
kbExpr: EditorContextKeys.textInputFocus,
primary: KeyCode.Enter,
weight: KeybindingWeight.EditorContrib
}
});
}
run(accessor: ServicesAccessor, editor: ICodeEditor): void | Promise<void> {
const editorUri = editor.getModel()?.uri;
if (editorUri) {
const widgetService = accessor.get(IChatWidgetService);
widgetService.getWidgetByInputUri(editorUri)?.acceptInput();
}
}
});

@joyceerhl joyceerhl added bug Issue identified by VS Code Team member as probable bug panel-chat confirmed Issue has been confirmed by VS Code Team member labels Dec 5, 2023
@roblourens roblourens added this to the December / January 2024 milestone Dec 12, 2023
@roblourens
Copy link
Member

roblourens commented Dec 12, 2023

Which one do you like better?

@roblourens
Copy link
Member

I guess I'll go with whatever is least likely to break keybindings or other usages

@Tyriar
Copy link
Member Author

Tyriar commented Dec 13, 2023

Our naming of commands is a bit all over the place, hard to say which is better since we didn't strictly stick to the workbench. naming scheme

@roblourens roblourens modified the milestones: December / January 2024, February 2024 Jan 24, 2024
@roblourens roblourens modified the milestones: February 2024, March 2024 Feb 21, 2024
@roblourens roblourens modified the milestones: March 2024, April 2024 Mar 26, 2024
@roblourens roblourens modified the milestones: April 2024, May 2024 Apr 24, 2024
@roblourens roblourens modified the milestones: May 2024, June 2024 May 29, 2024
@roblourens roblourens modified the milestones: June 2024, July 2024 Jun 26, 2024
@roblourens roblourens modified the milestones: July 2024, August 2024 Jul 24, 2024
@roblourens
Copy link
Member

I think they are all consistent except for chat.action.focus. And unfortunately I think I should have moved quicker on that but it's one that is likely to have customized keybindings, and I don't really want to touch the ID now.

@roblourens roblourens removed this from the August 2024 milestone Aug 1, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Sep 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug confirmed Issue has been confirmed by VS Code Team member panel-chat
Projects
None yet
Development

No branches or pull requests

3 participants