mirror of
https://github.com/microsoft/vscode.git
synced 2026-03-01 06:06:04 +00:00
disable feedback options when setting is enabled (#244285)
* disable feedback * swap
This commit is contained in:
@@ -41,6 +41,7 @@ import { ChatViewPane } from '../chatViewPane.js';
|
||||
import { CHAT_CATEGORY } from './chatActions.js';
|
||||
|
||||
export const MarkUnhelpfulActionId = 'workbench.action.chat.markUnhelpful';
|
||||
const disableFeedbackConfig = 'config.telemetry.disableFeedback';
|
||||
|
||||
export function registerChatTitleActions() {
|
||||
registerAction2(class MarkHelpfulAction extends Action2 {
|
||||
@@ -56,12 +57,12 @@ export function registerChatTitleActions() {
|
||||
id: MenuId.ChatMessageFooter,
|
||||
group: 'navigation',
|
||||
order: 1,
|
||||
when: ContextKeyExpr.and(ChatContextKeys.isResponse, ChatContextKeys.responseHasError.negate())
|
||||
when: ContextKeyExpr.and(ChatContextKeys.isResponse, ChatContextKeys.responseHasError.negate(), ContextKeyExpr.has(disableFeedbackConfig).negate())
|
||||
}, {
|
||||
id: MENU_INLINE_CHAT_WIDGET_SECONDARY,
|
||||
group: 'navigation',
|
||||
order: 1,
|
||||
when: ContextKeyExpr.and(ChatContextKeys.isResponse, ChatContextKeys.responseHasError.negate())
|
||||
when: ContextKeyExpr.and(ChatContextKeys.isResponse, ChatContextKeys.responseHasError.negate(), ContextKeyExpr.has(disableFeedbackConfig).negate())
|
||||
}]
|
||||
});
|
||||
}
|
||||
@@ -103,12 +104,12 @@ export function registerChatTitleActions() {
|
||||
id: MenuId.ChatMessageFooter,
|
||||
group: 'navigation',
|
||||
order: 2,
|
||||
when: ContextKeyExpr.and(ChatContextKeys.isResponse)
|
||||
when: ContextKeyExpr.and(ChatContextKeys.isResponse, ContextKeyExpr.has(disableFeedbackConfig).negate())
|
||||
}, {
|
||||
id: MENU_INLINE_CHAT_WIDGET_SECONDARY,
|
||||
group: 'navigation',
|
||||
order: 2,
|
||||
when: ContextKeyExpr.and(ChatContextKeys.isResponse, ChatContextKeys.responseHasError.negate())
|
||||
when: ContextKeyExpr.and(ChatContextKeys.isResponse, ChatContextKeys.responseHasError.negate(), ContextKeyExpr.has(disableFeedbackConfig).negate())
|
||||
}]
|
||||
});
|
||||
}
|
||||
@@ -155,12 +156,12 @@ export function registerChatTitleActions() {
|
||||
id: MenuId.ChatMessageFooter,
|
||||
group: 'navigation',
|
||||
order: 3,
|
||||
when: ContextKeyExpr.and(ChatContextKeys.responseSupportsIssueReporting, ChatContextKeys.isResponse)
|
||||
when: ContextKeyExpr.and(ChatContextKeys.responseSupportsIssueReporting, ChatContextKeys.isResponse, ContextKeyExpr.has(disableFeedbackConfig).negate())
|
||||
}, {
|
||||
id: MENU_INLINE_CHAT_WIDGET_SECONDARY,
|
||||
group: 'navigation',
|
||||
order: 3,
|
||||
when: ContextKeyExpr.and(ChatContextKeys.responseSupportsIssueReporting, ChatContextKeys.isResponse)
|
||||
when: ContextKeyExpr.and(ChatContextKeys.responseSupportsIssueReporting, ChatContextKeys.isResponse, ContextKeyExpr.has(disableFeedbackConfig).negate())
|
||||
}]
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user