fix: restore remote OpenCode providers and startup errors
- Fix OpenChamber proxying to the correct OpenCode host for remote VPS setups - Show a clear empty-state error when OpenCode is not reachable - Harden session event routing for early or mismatched directory events
This commit is contained in:
@@ -1,16 +1,27 @@
|
||||
import React from 'react';
|
||||
import { OpenChamberLogo } from '@/components/ui/OpenChamberLogo';
|
||||
import { useThemeSystem } from '@/contexts/useThemeSystem';
|
||||
import { useGlobalSyncStore } from '@/sync/global-sync-store';
|
||||
|
||||
const ChatEmptyState: React.FC = () => {
|
||||
const { currentTheme } = useThemeSystem();
|
||||
const initError = useGlobalSyncStore((s) => s.error);
|
||||
|
||||
const textColor = currentTheme?.colors?.surface?.mutedForeground || 'var(--muted-foreground)';
|
||||
|
||||
return (
|
||||
<div className="flex flex-col items-center justify-center min-h-full w-full gap-6">
|
||||
<OpenChamberLogo width={140} height={140} className="opacity-20" />
|
||||
<span className="text-body-md" style={{ color: textColor }}>Start a new chat</span>
|
||||
{initError ? (
|
||||
<div className="flex flex-col items-center gap-2 max-w-md text-center px-4">
|
||||
<span className="text-body-md font-medium text-destructive">OpenCode is not reachable</span>
|
||||
<span className="text-body-sm" style={{ color: textColor }}>
|
||||
{initError.message}
|
||||
</span>
|
||||
</div>
|
||||
) : (
|
||||
<span className="text-body-md" style={{ color: textColor }}>Start a new chat</span>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user