mirror of
https://github.com/stackblitz-labs/bolt.diy
synced 2025-06-26 02:06:36 +00:00
- 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
29 lines
1.0 KiB
TypeScript
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>
|
|
);
|
|
}
|