Skip to content

Commit 7d04d4d

Browse files
authored
only have one report bug command (microsoft#210802)
1 parent 75c9920 commit 7d04d4d

File tree

3 files changed

+1
-39
lines changed

3 files changed

+1
-39
lines changed

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ registerAction2(InlineChatActions.FocusInlineChat);
4848
registerAction2(InlineChatActions.ViewInChatAction);
4949

5050
registerAction2(InlineChatActions.ToggleDiffForChange);
51-
registerAction2(InlineChatActions.ReportIssueForBugCommand);
5251
registerAction2(InlineChatActions.AcceptChanges);
5352

5453
registerAction2(InlineChatActions.CopyRecordings);

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

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { EmbeddedDiffEditorWidget } from 'vs/editor/browser/widget/diffEditor/em
1111
import { EmbeddedCodeEditorWidget } from 'vs/editor/browser/widget/codeEditor/embeddedCodeEditorWidget';
1212
import { EditorContextKeys } from 'vs/editor/common/editorContextKeys';
1313
import { InlineChatController, InlineChatRunOptions } from 'vs/workbench/contrib/inlineChat/browser/inlineChatController';
14-
import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_HAS_PROVIDER, CTX_INLINE_CHAT_INNER_CURSOR_FIRST, CTX_INLINE_CHAT_INNER_CURSOR_LAST, CTX_INLINE_CHAT_OUTER_CURSOR_POSITION, CTX_INLINE_CHAT_VISIBLE, MENU_INLINE_CHAT_WIDGET_DISCARD, MENU_INLINE_CHAT_WIDGET_STATUS, CTX_INLINE_CHAT_EDIT_MODE, EditMode, CTX_INLINE_CHAT_DOCUMENT_CHANGED, CTX_INLINE_CHAT_DID_EDIT, CTX_INLINE_CHAT_HAS_STASHED_SESSION, ACTION_ACCEPT_CHANGES, CTX_INLINE_CHAT_RESPONSE_TYPES, InlineChatResponseTypes, ACTION_VIEW_IN_CHAT, CTX_INLINE_CHAT_USER_DID_EDIT, CTX_INLINE_CHAT_RESPONSE_FOCUSED, CTX_INLINE_CHAT_CHANGE_SHOWS_DIFF, CTX_INLINE_CHAT_CHANGE_HAS_DIFF, MENU_INLINE_CHAT_WIDGET, ACTION_TOGGLE_DIFF, CTX_INLINE_CHAT_SUPPORT_ISSUE_REPORTING } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
14+
import { CTX_INLINE_CHAT_FOCUSED, CTX_INLINE_CHAT_HAS_PROVIDER, CTX_INLINE_CHAT_INNER_CURSOR_FIRST, CTX_INLINE_CHAT_INNER_CURSOR_LAST, CTX_INLINE_CHAT_OUTER_CURSOR_POSITION, CTX_INLINE_CHAT_VISIBLE, MENU_INLINE_CHAT_WIDGET_DISCARD, MENU_INLINE_CHAT_WIDGET_STATUS, CTX_INLINE_CHAT_EDIT_MODE, EditMode, CTX_INLINE_CHAT_DOCUMENT_CHANGED, CTX_INLINE_CHAT_DID_EDIT, CTX_INLINE_CHAT_HAS_STASHED_SESSION, ACTION_ACCEPT_CHANGES, CTX_INLINE_CHAT_RESPONSE_TYPES, InlineChatResponseTypes, ACTION_VIEW_IN_CHAT, CTX_INLINE_CHAT_USER_DID_EDIT, CTX_INLINE_CHAT_RESPONSE_FOCUSED, CTX_INLINE_CHAT_CHANGE_SHOWS_DIFF, CTX_INLINE_CHAT_CHANGE_HAS_DIFF, MENU_INLINE_CHAT_WIDGET, ACTION_TOGGLE_DIFF } from 'vs/workbench/contrib/inlineChat/common/inlineChat';
1515
import { localize, localize2 } from 'vs/nls';
1616
import { Action2, IAction2Options, MenuRegistry } from 'vs/platform/actions/common/actions';
1717
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
@@ -370,29 +370,6 @@ export class ToggleDiffForChange extends AbstractInlineChatAction {
370370
}
371371
}
372372

373-
374-
export class ReportIssueForBugCommand extends AbstractInlineChatAction {
375-
constructor() {
376-
super({
377-
id: 'inlineChat.reportIssueForBug',
378-
title: localize('feedback.reportIssueForBug', 'Report Issue'),
379-
icon: Codicon.report,
380-
precondition: ContextKeyExpr.and(CTX_INLINE_CHAT_VISIBLE, CTX_INLINE_CHAT_RESPONSE_TYPES.notEqualsTo(InlineChatResponseTypes.Empty)),
381-
menu: [{
382-
id: MENU_INLINE_CHAT_WIDGET,
383-
when: ContextKeyExpr.and(CTX_INLINE_CHAT_SUPPORT_ISSUE_REPORTING, CTX_INLINE_CHAT_RESPONSE_TYPES.notEqualsTo(InlineChatResponseTypes.Empty)),
384-
group: 'navigation',
385-
order: 2
386-
}]
387-
});
388-
}
389-
390-
override runInlineChatCommand(_accessor: ServicesAccessor, ctrl: InlineChatController): void {
391-
ctrl.reportBug();
392-
}
393-
}
394-
395-
396373
export class AcceptChanges extends AbstractInlineChatAction {
397374

398375
constructor() {

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1109,20 +1109,6 @@ export class InlineChatController implements IEditorContribution {
11091109
this._strategy?.toggleDiff?.();
11101110
}
11111111

1112-
reportBug() {
1113-
if (this._session?.lastExchange?.response instanceof ReplyResponse && this._session?.lastExchange?.response.chatResponse) {
1114-
const response = this._session.lastExchange.response.chatResponse;
1115-
this._chatService.notifyUserAction({
1116-
sessionId: response.session.sessionId,
1117-
requestId: response.requestId,
1118-
agentId: response.agent?.id,
1119-
result: response.result,
1120-
action: { kind: 'bug' }
1121-
});
1122-
this._zone.value.widget.updateStatus('Thank you for your feedback!', { resetAfter: 1250 });
1123-
}
1124-
}
1125-
11261112
createSnapshot(): void {
11271113
if (this._session && !this._session.textModel0.equalsTextBuffer(this._session.textModelN.getTextBuffer())) {
11281114
this._session.createSnapshot();

0 commit comments

Comments
 (0)