fix: Disable AI assist if the AI integration not enabled (#7876)
This commit is contained in:
@@ -3,6 +3,7 @@ import wootConstants from 'dashboard/constants/globals';
|
|||||||
|
|
||||||
import { CMD_AI_ASSIST } from './commandBarBusEvents';
|
import { CMD_AI_ASSIST } from './commandBarBusEvents';
|
||||||
import { REPLY_EDITOR_MODES } from 'dashboard/components/widgets/WootWriter/constants';
|
import { REPLY_EDITOR_MODES } from 'dashboard/components/widgets/WootWriter/constants';
|
||||||
|
import aiMixin from 'dashboard/mixins/aiMixin';
|
||||||
import {
|
import {
|
||||||
ICON_ADD_LABEL,
|
ICON_ADD_LABEL,
|
||||||
ICON_ASSIGN_AGENT,
|
ICON_ASSIGN_AGENT,
|
||||||
@@ -30,8 +31,8 @@ import {
|
|||||||
MUTE_ACTION,
|
MUTE_ACTION,
|
||||||
} from './commandBarActions';
|
} from './commandBarActions';
|
||||||
import { isAConversationRoute } from '../../../helper/routeHelpers';
|
import { isAConversationRoute } from '../../../helper/routeHelpers';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
mixins: [aiMixin],
|
||||||
watch: {
|
watch: {
|
||||||
assignableAgents() {
|
assignableAgents() {
|
||||||
this.setCommandbarData();
|
this.setCommandbarData();
|
||||||
@@ -325,15 +326,18 @@ export default {
|
|||||||
|
|
||||||
conversationHotKeys() {
|
conversationHotKeys() {
|
||||||
if (isAConversationRoute(this.$route.name)) {
|
if (isAConversationRoute(this.$route.name)) {
|
||||||
return [
|
const defaultConversationHotKeys = [
|
||||||
...this.statusActions,
|
...this.statusActions,
|
||||||
...this.conversationAdditionalActions,
|
...this.conversationAdditionalActions,
|
||||||
...this.assignAgentActions,
|
...this.assignAgentActions,
|
||||||
...this.assignTeamActions,
|
...this.assignTeamActions,
|
||||||
...this.labelActions,
|
...this.labelActions,
|
||||||
...this.assignPriorityActions,
|
...this.assignPriorityActions,
|
||||||
...this.AIAssistActions,
|
|
||||||
];
|
];
|
||||||
|
if (this.isAIIntegrationEnabled) {
|
||||||
|
return [...defaultConversationHotKeys, ...this.AIAssistActions];
|
||||||
|
}
|
||||||
|
return defaultConversationHotKeys;
|
||||||
}
|
}
|
||||||
|
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
Reference in New Issue
Block a user