feat: update application icons and improve app start to automatically open a new session draft

This commit is contained in:
Bohdan Triapitsyn
2025-12-22 01:16:22 +02:00
parent 4ab4616dea
commit f0d4421325
22 changed files with 60 additions and 293 deletions
@@ -11,6 +11,7 @@ import { useChatScrollManager } from '@/hooks/useChatScrollManager';
import { useDeviceInfo } from '@/lib/device';
import { Button } from '@/components/ui/button';
import { OverlayScrollbar } from '@/components/ui/OverlayScrollbar';
import { isVSCodeRuntime } from '@/lib/desktop';
export const ChatContainer: React.FC = () => {
const {
@@ -23,6 +24,7 @@ export const ChatContainer: React.FC = () => {
loadMoreMessages,
updateViewportAnchor,
sessionMemoryState,
openNewSessionDraft,
isSyncing,
messageStreamStates,
trimToViewportWindow,
@@ -38,6 +40,16 @@ export const ChatContainer: React.FC = () => {
const { isMobile } = useDeviceInfo();
const draftOpen = Boolean(newSessionDraft?.open);
React.useEffect(() => {
if (isMobile || isVSCodeRuntime()) {
return;
}
if (!currentSessionId && !draftOpen) {
openNewSessionDraft();
}
}, [currentSessionId, draftOpen, isMobile, openNewSessionDraft]);
const sessionMessages = React.useMemo(() => {
return currentSessionId ? messages.get(currentSessionId) || [] : [];