diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index f06292d915..1d9687ac30 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -1,7 +1,7 @@ --- -name: _Bug report +name: Report about: Create a report to help us improve Jan -title: 'bug: [DESCRIPTION]' +title: 'bug: ' labels: 'type: bug' assignees: '' diff --git a/core/src/types/events/resource.event.ts b/core/src/types/events/resource.event.ts index 54cc9a4691..6bb5aa7970 100644 --- a/core/src/types/events/resource.event.ts +++ b/core/src/types/events/resource.event.ts @@ -7,9 +7,15 @@ export interface ResourceStatus { cpu: { usage: number } + gpus: GpuInfo[] } export interface UsedMemInfo { total: number used: number } + +export interface GpuInfo { + name: string | undefined + vram: UsedMemInfo +} diff --git a/electron/package.json b/electron/package.json index c003b1406e..6e32a2bdbb 100644 --- a/electron/package.json +++ b/electron/package.json @@ -123,7 +123,7 @@ "request": "^2.88.2", "request-progress": "^3.0.0", "@kirillvakalov/nut-tree__nut-js": "4.2.1-2", - "cortexso": "v0.5.0-40" + "cortexso": "v0.5.0-43" }, "devDependencies": { "@types/js-yaml": "4.0.9", diff --git a/web/containers/Layout/BottomPanel/SystemMonitor/index.tsx b/web/containers/Layout/BottomPanel/SystemMonitor/index.tsx index d056862857..54c7bf7659 100644 --- a/web/containers/Layout/BottomPanel/SystemMonitor/index.tsx +++ b/web/containers/Layout/BottomPanel/SystemMonitor/index.tsx @@ -35,7 +35,7 @@ const SystemMonitor: React.FC = () => { const [usedRam, setUsedRam] = useAtom(usedRamAtom) const [totalRam, setTotalRam] = useAtom(totalRamAtom) const [cpuUsage, setCpuUsage] = useAtom(cpuUsageAtom) - const gpus = useAtomValue(gpusAtom) + const [gpus, setGpus] = useAtom(gpusAtom) const [showFullScreen, setShowFullScreen] = useState(false) const [showSystemMonitorPanel, setShowSystemMonitorPanel] = useAtom( @@ -63,13 +63,18 @@ const SystemMonitor: React.FC = () => { setUsedRam(resourceEvent.mem.used) setTotalRam(resourceEvent.mem.total) setCpuUsage(resourceEvent.cpu.usage) + setGpus( + resourceEvent.gpus?.filter( + (gpu) => gpu.name && gpu.vram.used && gpu.vram.total + ) ?? [] + ) } catch (err) { console.error(err) } }, signal: abortControllerRef.current.signal, }) - }, [host, setTotalRam, setUsedRam, setCpuUsage]) + }, [host, setTotalRam, setUsedRam, setCpuUsage, setGpus]) const unregister = useCallback(() => { if (!abortControllerRef.current) return @@ -195,8 +200,7 @@ const SystemMonitor: React.FC = () => {