Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
131 changes: 85 additions & 46 deletions desktop/renderer/src/ui/app/App.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import React from "react";
import { Navigate, Outlet, Route, Routes, useNavigate, useSearchParams } from "react-router-dom";
import {
Navigate,
Outlet,
Route,
Routes,
useNavigate,
useSearchParams,
} from "react-router-dom";
import { Brand, SpinningSplashLogo, PoweredBanner } from "@shared/kit";
import { useAppDispatch, useAppSelector } from "@store/hooks";
import { initGatewayState } from "@store/slices/gatewaySlice";
Expand Down Expand Up @@ -30,7 +37,10 @@ import { DesktopWarmupBanner } from "../chat/components/DesktopWarmupBanner";
import { useAppOpenedEvent } from "@analytics";
import { useAtomicDeepLink } from "../../hooks/useAtomicDeepLink";
import { useAtomicTopupPolling } from "../../hooks/useAtomicTopupPolling";
import { clearPostPaygSuccessNavigate, consumePostPaygSuccessNavigate } from "../../services/atomic-backend-api";
import {
clearPostPaygSuccessNavigate,
consumePostPaygSuccessNavigate,
} from "../../services/atomic-backend-api";
import {
atomicAuthActions,
fetchAtomicBalance,
Expand Down Expand Up @@ -59,7 +69,9 @@ function OtherTabRoute() {
return (
<>
{error && (
<div style={{ color: "#ff6b6b", fontSize: 13, padding: "8px 0" }}>{error}</div>
<div style={{ color: "#ff6b6b", fontSize: 13, padding: "8px 0" }}>
{error}
</div>
)}
<OtherTab onError={setError} />
</>
Expand All @@ -69,7 +81,14 @@ function OtherTabRoute() {
function LoadingScreen() {
return (
<div className={a.UiCentered}>
<div style={{ display: "flex", flexDirection: "column", alignItems: "center", gap: 18 }}>
<div
style={{
display: "flex",
flexDirection: "column",
alignItems: "center",
gap: 18,
}}
>
<SpinningSplashLogo />
<div className="UiLoadingTitle">Starting Atomic Hermes...</div>
<div className="UiLoadingSubtitle">Initializing backend services</div>
Expand All @@ -85,7 +104,8 @@ function ErrorScreen({ error }: { error: string }) {
<div className={a.UiCard}>
<div className={a.UiCardTitle}>Atomic Hermes failed to start</div>
<div className={a.UiCardSubtitle}>
The backend process did not become available. Check the logs for details.
The backend process did not become available. Check the logs for
details.
</div>
<pre>{error || "No details."}</pre>
</div>
Expand All @@ -110,7 +130,9 @@ function ChatRoute() {

function SidebarLayout() {
useAppOpenedEvent();
const [sidebarOpen, setSidebarOpen] = React.useState(readSidebarOpenFromStorage);
const [sidebarOpen, setSidebarOpen] = React.useState(
readSidebarOpenFromStorage,
);

React.useEffect(() => {
try {
Expand Down Expand Up @@ -150,8 +172,20 @@ export function FullscreenTopbar(props: {
className={a.UiTopbarBackButton}
onClick={() => void navigate(-1)}
>
<svg xmlns="http://www.w3.org/2000/svg" width="14" height="14" viewBox="0 0 14 14" fill="none">
<path d="M12.25 7H1.75M1.75 7L6.125 2.625M1.75 7L6.125 11.375" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round"/>
<svg
xmlns="http://www.w3.org/2000/svg"
width="14"
height="14"
viewBox="0 0 14 14"
fill="none"
>
<path
d="M12.25 7H1.75M1.75 7L6.125 2.625M1.75 7L6.125 11.375"
stroke="currentColor"
strokeWidth="1.5"
strokeLinecap="round"
strokeLinejoin="round"
/>
</svg>
<span>Back</span>
</button>
Expand All @@ -161,11 +195,7 @@ export function FullscreenTopbar(props: {
}

export function FullscreenShell(props: { children: React.ReactNode }) {
return (
<div className={a.UiAppShell}>
{props.children}
</div>
);
return <div className={a.UiAppShell}>{props.children}</div>;
}

export function App() {
Expand All @@ -175,7 +205,7 @@ export function App() {
const dispatch = useAppDispatch();
const state = useAppSelector((s) => s.gateway.state);
const onboardingLoaded = useAppSelector((s) => s.onboarding.loaded);
const onboarded = useAppSelector((s) => s.onboarding.onboarded);
const onboarded = useAppSelector((s) => false);
const navigate = useNavigate();
const didAutoNavRef = React.useRef(false);
const wasRestartingRef = React.useRef(false);
Expand Down Expand Up @@ -245,41 +275,50 @@ export function App() {
if (state?.kind === "ready") {
return (
<>
<UpdateBanner />
{onboarded ? <LowBalanceBanner /> : null}
<Routes>
<Route path="setup/*" element={<SetupPage />} />
<Route path="/" element={<SidebarLayout />}>
<Route index element={<Navigate to={routes.chat} replace />} />
<Route path="chat" element={<ChatRoute />} />
<Route path="terminal" element={<TerminalPage />} />
<Route path="files" element={<FilesPage />} />
<Route path="skills" element={<Navigate to={routes.settingsSkills} replace />} />
<Route path="skills/edit/:name" element={<SkillEditor />} />
<Route path="settings" element={<SettingsPage state={state} />}>
<Route index element={<SettingsIndexRedirect />} />
<Route path="ai-providers" element={<Navigate to={routes.settingsModels} replace />} />
<Route path="ai-models" element={<AiModelsTab />} />
<Route path="local-models" element={<Navigate to={routes.settingsModels} replace />} />
<Route path="skills" element={<SkillsSettingsTab />} />
<Route path="messengers" element={<ConnectorsTab />} />
<UpdateBanner />
{onboarded ? <LowBalanceBanner /> : null}
<Routes>
<Route path="setup/*" element={<SetupPage />} />
<Route path="/" element={<SidebarLayout />}>
<Route index element={<Navigate to={routes.chat} replace />} />
<Route path="chat" element={<ChatRoute />} />
<Route path="terminal" element={<TerminalPage />} />
<Route path="files" element={<FilesPage />} />
<Route
path="voice"
element={
<PlaceholderTab
title="Voice"
description="Speech and transcription controls are reserved for a future Hermes desktop update."
/>
}
path="skills"
element={<Navigate to={routes.settingsSkills} replace />}
/>
<Route path="mcp-servers" element={<McpServersTab />} />
<Route path="other" element={<OtherTabRoute />} />
<Route path="skills/edit/:name" element={<SkillEditor />} />
<Route path="settings" element={<SettingsPage state={state} />}>
<Route index element={<SettingsIndexRedirect />} />
<Route
path="ai-providers"
element={<Navigate to={routes.settingsModels} replace />}
/>
<Route path="ai-models" element={<AiModelsTab />} />
<Route
path="local-models"
element={<Navigate to={routes.settingsModels} replace />}
/>
<Route path="skills" element={<SkillsSettingsTab />} />
<Route path="messengers" element={<ConnectorsTab />} />
<Route
path="voice"
element={
<PlaceholderTab
title="Voice"
description="Speech and transcription controls are reserved for a future Hermes desktop update."
/>
}
/>
<Route path="mcp-servers" element={<McpServersTab />} />
<Route path="other" element={<OtherTabRoute />} />
</Route>
</Route>
</Route>
<Route path="dashboard" element={<DashboardPage />} />
<Route path="logs" element={<LogsPage />} />
<Route path="*" element={<Navigate to={routes.chat} replace />} />
</Routes>
<Route path="dashboard" element={<DashboardPage />} />
<Route path="logs" element={<LogsPage />} />
<Route path="*" element={<Navigate to={routes.chat} replace />} />
</Routes>
</>
);
}
Expand Down
31 changes: 21 additions & 10 deletions desktop/renderer/src/ui/settings/AiModelsTab.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,13 @@
}

.statusBarHorizontalMain {
display: flex;
flex-direction: row;
flex-wrap: wrap;
align-items: flex-start;
justify-content: space-between;
column-gap: 4px;
display: grid;
grid-template-columns: 160px minmax(240px, 1.2fr) 160px minmax(180px, 1fr);
column-gap: 24px;
row-gap: 4px;
align-items: start;
width: 100%;
min-width: 0;
}

.statusBarHorizontal .statusBarRunningModel {
Expand All @@ -99,7 +98,6 @@
flex-direction: column;
align-items: flex-start;
gap: 2px;
flex: 0 1 auto;
min-width: 0;
max-width: 100%;
}
Expand All @@ -110,10 +108,8 @@
}

.statusBarHorizontal .statusValue {
flex: 0 1 auto;
align-self: stretch;
width: 100%;
min-width: 0;
min-height: 24px;
}

.statusBarHorizontal .statusBarRunningModel .statusValue {
Expand All @@ -122,12 +118,27 @@
}

.statusBarHorizontal .statusValueText {
display: block;
width: 100%;
min-width: 0;
line-height: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}

@media (max-width: 1180px) {
.statusBarHorizontalMain {
grid-template-columns: minmax(140px, 1fr) minmax(180px, 1fr);
column-gap: 20px;
row-gap: 12px;
}

.statusBarHorizontal .statusBarRunningModel {
grid-column: 2;
}
}

.statusSegment {
display: flex;
flex-direction: column;
Expand Down
Loading
Loading