diff --git a/packages/frontend/core/src/components/pure/ai-island/index.tsx b/packages/frontend/core/src/components/pure/ai-island/index.tsx index bd5092e859169..f4859c6347825 100644 --- a/packages/frontend/core/src/components/pure/ai-island/index.tsx +++ b/packages/frontend/core/src/components/pure/ai-island/index.tsx @@ -5,6 +5,7 @@ import { useLiveData, useService, } from '@toeverything/infra'; +import clsx from 'clsx'; import { useEffect, useState } from 'react'; import { ToolContainer } from '../../workspace'; @@ -14,6 +15,7 @@ import { aiIslandBtn, aiIslandWrapper, gradient, + toolStyle, } from './styles.css'; const RIGHT_SIDEBAR_AI_HAS_EVER_OPENED_KEY = @@ -49,7 +51,7 @@ export const AIIsland = () => { }, [activeTab, haveChatTab, sidebarOpen]); return ( - +
{ - const workbench = useService(WorkbenchService).workbench; - const isSidePanelOpen = useLiveData(workbench.sidebarOpen$); - const activeView = useLiveData(workbench.activeView$); - const inChatPanel = useLiveData( - activeView.activeSidebarTab$.map(t => t?.id === 'chat') - ); +export const ToolContainer = ( + props: PropsWithChildren<{ className?: string }> +): ReactElement => { const docId = useLiveData( useService(GlobalContextService).globalContext.docId.$ ); @@ -86,12 +81,7 @@ export const ToolContainer = (props: PropsWithChildren): ReactElement => { const doc = useLiveData(docId ? docRecordList.doc$(docId) : undefined); const inTrash = useLiveData(doc?.meta$)?.trash; return ( -
+
{props.children}
);