mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-07-18 10:36:22 +08:00
feat(core): show ai-island and navigate to chat page if not available in sidebar (#13085)
close AI-318, AI-317 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **New Features** * Updated the AI chat button label to "AFFiNE Intelligence" and changed its icon for improved clarity. * Enhanced the AI chat button's placement in the sidebar for better accessibility. * Improved the AI chat button’s visibility and interaction logic based on current view and sidebar state. * **Style** * Adjusted button styles to disable interaction when hidden, enhancing user experience. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
@@ -18,7 +18,7 @@ import { useI18n } from '@affine/i18n';
|
||||
import { track } from '@affine/track';
|
||||
import type { Store } from '@blocksuite/affine/store';
|
||||
import {
|
||||
AiIcon,
|
||||
AiOutlineIcon,
|
||||
AllDocsIcon,
|
||||
ImportIcon,
|
||||
JournalIcon,
|
||||
@@ -97,8 +97,8 @@ const AIChatButton = () => {
|
||||
);
|
||||
|
||||
return (
|
||||
<MenuLinkItem icon={<AiIcon />} active={aiChatActive} to={'/chat'}>
|
||||
<span data-testid="ai-chat">Intelligent</span>
|
||||
<MenuLinkItem icon={<AiOutlineIcon />} active={aiChatActive} to={'/chat'}>
|
||||
<span data-testid="ai-chat">AFFiNE Intelligence</span>
|
||||
</MenuLinkItem>
|
||||
);
|
||||
};
|
||||
@@ -198,10 +198,10 @@ export const RootAppSidebar = memo((): ReactElement => {
|
||||
/>
|
||||
<AddPageButton />
|
||||
</div>
|
||||
<AIChatButton />
|
||||
<AllDocsButton />
|
||||
<AppSidebarJournalButton />
|
||||
{sessionStatus === 'authenticated' && <NotificationButton />}
|
||||
<AIChatButton />
|
||||
<MenuItem
|
||||
data-testid="slider-bar-workspace-setting-button"
|
||||
icon={<SettingsIcon />}
|
||||
|
||||
Reference in New Issue
Block a user