bolt.diy/app/components/header/HeaderActionButtons.client.tsx
KevIsDev cd37599f3b feat(design): add design scheme support and UI improvements
- Implement design scheme system with palette, typography, and feature customization
- Add color scheme dialog for user customization
- Update chat UI components to use design scheme values
- Improve header actions with consolidated deploy and export buttons
- Adjust layout spacing and styling across multiple components (chat, workbench etc...)
- Add model and provider info to chat messages
- Refactor workbench and sidebar components for better responsiveness
2025-05-28 23:49:51 +01:00

29 lines
1.0 KiB
TypeScript

import { useStore } from '@nanostores/react';
import { workbenchStore } from '~/lib/stores/workbench';
import { useState } from 'react';
import { streamingState } from '~/lib/stores/streaming';
import { ExportChatButton } from '~/components/chat/chatExportAndImport/ExportChatButton';
import { useChatHistory } from '~/lib/persistence';
import { DeployButton } from '~/components/deploy/DeployButton';
interface HeaderActionButtonsProps {
chatStarted: boolean;
}
export function HeaderActionButtons({ chatStarted }: HeaderActionButtonsProps) {
const [activePreviewIndex] = useState(0);
const previews = useStore(workbenchStore.previews);
const activePreview = previews[activePreviewIndex];
const isStreaming = useStore(streamingState);
const { exportChat } = useChatHistory();
const shouldShowButtons = !isStreaming && activePreview;
return (
<div className="flex items-center">
{chatStarted && shouldShowButtons && <ExportChatButton exportChat={exportChat} />}
{shouldShowButtons && <DeployButton />}
</div>
);
}