fix: gate AI chat with isEEFeatureBlocked instead of blockAiChat

This commit is contained in:
DarkPhoenix2704
2026-03-16 16:03:11 +00:00
parent 91003a1c87
commit 9e9c33f32d
2 changed files with 6 additions and 6 deletions

View File

@@ -45,7 +45,7 @@ const {
toggleChatPanel,
} = useChatPanel()
const { blockAiChat, showEEFeatures } = useEeConfig()
const { blockAiChat, isEEFeatureBlocked, showEEFeatures } = useEeConfig()
const handleChatToggle = () => {
toggleChatPanel()
@@ -254,7 +254,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
// Cmd/Ctrl + Shift + A — toggle AI chat
useEventListener(document, 'keydown', (e: KeyboardEvent) => {
if (!isEeUI || blockAiChat.value || !hasChatBaseContext.value) return
if (!isEeUI || isEEFeatureBlocked.value || !hasChatBaseContext.value) return
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey
if (
cmdOrCtrl &&
@@ -313,7 +313,7 @@ useEventListener(document, 'keydown', (e: KeyboardEvent) => {
<!-- AI Chat -->
<DashboardMiniSidebarV2DockItem
v-if="isEeUI && !blockAiChat && hasChatWorkspaceContext && hasChatBaseContext && !isMobileMode"
v-if="isEeUI && !isEEFeatureBlocked && hasChatWorkspaceContext && hasChatBaseContext && !isMobileMode"
:ref="(el: any) => setItemRef('chat', el)"
v-e="['c:chat:toggle']"
label="Chat"

View File

@@ -45,7 +45,7 @@ const {
toggleChatPanel,
} = useChatPanel()
const { blockAiChat, showEEFeatures } = useEeConfig()
const { blockAiChat, isEEFeatureBlocked, showEEFeatures } = useEeConfig()
const handleChatToggle = () => {
toggleChatPanel()
@@ -140,7 +140,7 @@ useEventListener(document, 'keydown', async (e: KeyboardEvent) => {
// Cmd/Ctrl + Shift + A — toggle AI chat
useEventListener(document, 'keydown', (e: KeyboardEvent) => {
if (!isEeUI || blockAiChat.value) return
if (!isEeUI || isEEFeatureBlocked.value) return
const cmdOrCtrl = isMac() ? e.metaKey : e.ctrlKey
if (
cmdOrCtrl &&
@@ -236,7 +236,7 @@ const mainItems = computed<NavItem[]>(() => [
<!-- AI Chat -->
<DashboardMiniSidebarV2RailItem
v-if="isEeUI && !blockAiChat && hasChatWorkspaceContext && hasChatBaseContext && !isMobileMode"
v-if="isEeUI && !isEEFeatureBlocked && hasChatWorkspaceContext && hasChatBaseContext && !isMobileMode"
v-e="['c:chat:toggle']"
label="Chat"
panel-key="chat"