add secondary inline chat menu and render response commands there (#226621)

fixes https://github.com/microsoft/vscode-copilot/issues/7368
fixes https://github.com/microsoft/vscode-copilot/issues/6650
This commit is contained in:
Johannes Rieken
2024-08-26 16:06:26 +02:00
committed by GitHub
parent c0592918e9
commit eb2f7c1a35
10 changed files with 108 additions and 79 deletions

View File

@@ -14,7 +14,7 @@ import { ZoneWidget } from 'vs/editor/contrib/zoneWidget/browser/zoneWidget';
import { localize } from 'vs/nls';
import { IContextKey, IContextKeyService } from 'vs/platform/contextkey/common/contextkey';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
import { ACTION_REGENERATE_RESPONSE, ACTION_REPORT_ISSUE, ACTION_TOGGLE_DIFF, CTX_INLINE_CHAT_OUTER_CURSOR_POSITION, EditMode, InlineChatConfigKeys, MENU_INLINE_CHAT_WIDGET_STATUS } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
import { ACTION_REGENERATE_RESPONSE, ACTION_REPORT_ISSUE, ACTION_TOGGLE_DIFF, CTX_INLINE_CHAT_OUTER_CURSOR_POSITION, EditMode, InlineChatConfigKeys, MENU_INLINE_CHAT_WIDGET_SECONDARY, MENU_INLINE_CHAT_WIDGET_STATUS } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
import { EditorBasedInlineChatWidget } from './inlineChatWidget';
import { isEqual } from 'vs/base/common/resources';
import { StableEditorBottomScrollState } from 'vs/editor/browser/stableEditorScroll';
@@ -62,6 +62,7 @@ export class InlineChatZoneWidget extends ZoneWidget {
}
}
},
secondaryMenuId: MENU_INLINE_CHAT_WIDGET_SECONDARY,
chatWidgetViewOptions: {
menus: {
executeToolbar: MenuId.ChatExecute,