Ensure that the Chat pane is disabled for read-only link collaborators (#23785)

GitOrigin-RevId: 56e1b1d6b08ec7537386cab0b251e325d681e117
This commit is contained in:
Alf Eaton
2025-02-21 13:18:29 +00:00
committed by Copybot
parent f22cf244f4
commit e81c1bd06c

View File

@@ -14,9 +14,11 @@ import { useChatPane } from '@/features/ide-react/hooks/use-chat-pane'
import { EditorAndPdf } from '@/features/ide-react/components/editor-and-pdf'
import HistoryContainer from '@/features/ide-react/components/history-container'
import getMeta from '@/utils/meta'
import { useEditorContext } from '@/shared/context/editor-context'
export const MainLayout: FC = () => {
const { view } = useLayoutContext()
const { isRestrictedTokenMember } = useEditorContext()
const {
isOpen: sidebarIsOpen,
@@ -39,7 +41,7 @@ export const MainLayout: FC = () => {
handlePaneExpand: handleChatExpand,
} = useChatPane()
const chatEnabled = getMeta('ol-chatEnabled')
const chatEnabled = getMeta('ol-chatEnabled') && !isRestrictedTokenMember
const { t } = useTranslation()