mirror of
https://github.com/sortedcord/omnia.git
synced 2026-07-22 12:02:49 +05:30
fix(core): misc fixes
This commit is contained in:
@@ -42,7 +42,7 @@ export function DashboardView() {
|
||||
|
||||
const [savedSessions, setSavedSessions] = useState<SimSnapshot[]>([]);
|
||||
const [scenarios, setScenarios] = useState<{ path: string; name: string; description: string }[]>([]);
|
||||
const [providerInstances, setProviderInstances] = useState<ModelProviderInstance[]>([]);
|
||||
const [, setProviderInstances] = useState<ModelProviderInstance[]>([]);
|
||||
|
||||
// Modal State
|
||||
const [scenarioForModal, setScenarioForModal] = useState<{ path: string; name: string } | null>(null);
|
||||
@@ -57,7 +57,7 @@ export function DashboardView() {
|
||||
setSavedSessions(res.sessions);
|
||||
}
|
||||
} catch {
|
||||
// ignore
|
||||
// sessions load failed, ignore
|
||||
}
|
||||
}, []);
|
||||
|
||||
@@ -70,21 +70,27 @@ export function DashboardView() {
|
||||
if (active && sessionsRes.ok) {
|
||||
setSavedSessions(sessionsRes.sessions);
|
||||
}
|
||||
} catch {}
|
||||
} catch {
|
||||
// session load failed, ignore
|
||||
}
|
||||
|
||||
try {
|
||||
const configStatus = await getConfigStatus();
|
||||
if (active) {
|
||||
setScenarios(configStatus.availableScenarios);
|
||||
}
|
||||
} catch {}
|
||||
} catch {
|
||||
// scenarios load failed, ignore
|
||||
}
|
||||
|
||||
try {
|
||||
const providersList = await listProviderInstances();
|
||||
if (active) {
|
||||
setProviderInstances(providersList);
|
||||
}
|
||||
} catch {}
|
||||
} catch {
|
||||
// providers load failed, ignore
|
||||
}
|
||||
|
||||
if (active) {
|
||||
setLoadingData(false);
|
||||
|
||||
@@ -202,8 +202,6 @@ export function PromptModal({ entry, onClose }: PromptModalProps) {
|
||||
onTabChange={setActiveTab}
|
||||
hasActor={!!entry.rawPrompt}
|
||||
hasDecoder={!!entry.decoderPrompt}
|
||||
showActorStats={!!entry.usage}
|
||||
showDecoderStats={!!entry.decoderUsage}
|
||||
/>
|
||||
|
||||
<div className="overflow-y-auto flex-1 p-5">
|
||||
|
||||
@@ -5,8 +5,6 @@ interface PromptSwitcherProps {
|
||||
onTabChange: (tab: "actor" | "decoder") => void;
|
||||
hasActor: boolean;
|
||||
hasDecoder: boolean;
|
||||
showActorStats: boolean;
|
||||
showDecoderStats: boolean;
|
||||
}
|
||||
|
||||
export function PromptSwitcher({
|
||||
@@ -14,8 +12,6 @@ export function PromptSwitcher({
|
||||
onTabChange,
|
||||
hasActor,
|
||||
hasDecoder,
|
||||
showActorStats,
|
||||
showDecoderStats,
|
||||
}: PromptSwitcherProps) {
|
||||
return (
|
||||
<div className="flex items-center justify-center gap-4 border-b bg-muted/50 px-5 py-4">
|
||||
|
||||
Reference in New Issue
Block a user