chore: snapshot working tree - pty_exited notifications + in-flight inference WIP
feat(booterm): structured pty_exited WS notifications. Plan-validated, impl-validated, code-reviewed green (contracts build clean, contracts test 29/29, booterm + web typecheck clean). wip: in-progress inference/provider refactor (agents.ts, provider.ts, new llama-providers.ts, removed llama-args-validator), plus arena, dispatcher, compaction, schema changes. openspec: pty-exit-notifications complete; x-agent-flags planned (not yet implemented).
This commit is contained in:
51
apps/web/src/components/control/FleetTab.tsx
Normal file
51
apps/web/src/components/control/FleetTab.tsx
Normal file
@@ -0,0 +1,51 @@
|
||||
import { useState } from 'react';
|
||||
import { AnimatePresence } from 'framer-motion';
|
||||
import { Settings2 } from 'lucide-react';
|
||||
import { ControlFleetHost } from '@/hooks/useControlStream';
|
||||
import { HostCard } from './HostCard';
|
||||
import { HostConfigEditor } from './HostConfigEditor';
|
||||
|
||||
export interface GpuData {
|
||||
vram_used: number;
|
||||
vram_total: number;
|
||||
temperature: number;
|
||||
power: number;
|
||||
}
|
||||
|
||||
interface FleetTabProps {
|
||||
hosts: ControlFleetHost[];
|
||||
gpuMap: Map<string, GpuData>;
|
||||
}
|
||||
|
||||
export function FleetTab({ hosts, gpuMap }: FleetTabProps) {
|
||||
const [editing, setEditing] = useState<string | null>(null);
|
||||
|
||||
if (hosts.length === 0) {
|
||||
return (
|
||||
<div className="flex items-center justify-center h-full">
|
||||
<p className="text-sm text-muted-foreground">No hosts connected</p>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="flex-1 overflow-y-auto p-4 space-y-4">
|
||||
<AnimatePresence mode="popLayout">
|
||||
{hosts.map((host) => (
|
||||
<div key={host.providerId} className="relative">
|
||||
<button
|
||||
type="button"
|
||||
onClick={() => setEditing(host.providerId)}
|
||||
title="SSH config editor"
|
||||
className="absolute top-2 right-2 z-10 p-1.5 rounded-md text-muted-foreground hover:text-foreground hover:bg-muted/40"
|
||||
>
|
||||
<Settings2 className="size-4" />
|
||||
</button>
|
||||
<HostCard host={host} gpuData={gpuMap.get(host.providerId) ?? null} />
|
||||
</div>
|
||||
))}
|
||||
</AnimatePresence>
|
||||
{editing && <HostConfigEditor providerId={editing} onClose={() => setEditing(null)} />}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user