feat(web): read host stats and the bare models endpoint on the status page
The metrics tiles now prefer the daemon's own sample (`resources.system`, then `info.cpu/mem/disk`) over the old RSS-over-physical-memory guess, and each tile gained the detail that makes the number actionable: cores and 1-minute load, used/total bytes, the filesystem the disk figure describes. The models card stops asking for a workspace it does not have. It calls the bare endpoint (no spawn), polls every 1.5 s while the plugin's cache is still filling (bounded to 12 rounds), and tells the three empty states apart instead of showing one generic "no models": still fetching, no live instance, no live session. With no workspace to key on, `fetchModels` also tolerates a legacy daemon that requires the parameter, retrying with the first visible workspace. Smaller fixes that fell out of the same read: `formatBytes` printed "4.00 GiB" for a whole number of GiB, and the workspaces query now polls every 5 s only while the socket is down, so a dropped connection still refreshes the page.
This commit is contained in:
1 parent
b577e15f6d
commit
604fec5ea0
10 files changed
+560
-105
No files matched your search
@@ -563,6 +563,8 @@
|
||||
"status.bindAddress": "绑定地址",
|
||||
"status.connected": "已连接",
|
||||
"status.connection": "连接信息",
|
||||
"status.cores": "核心",
|
||||
"status.load": "负载",
|
||||
"status.created": "创建",
|
||||
"status.deviceCount": "{n} 台",
|
||||
"status.devices": "已配对设备",
|
||||
@@ -593,6 +595,10 @@
|
||||
"status.modelSearchPlaceholder": "搜索模型或 provider…",
|
||||
"status.models": "模型与 Provider",
|
||||
"status.modelsError": "加载模型列表失败",
|
||||
"status.modelsPendingTitle": "正在加载模型",
|
||||
"status.modelsPendingText": "正在从运行中的 Neovim 获取模型目录…",
|
||||
"status.modelsNoInstanceTitle": "没有运行中的 Neovim 实例",
|
||||
"status.modelsNoInstanceText": "在任意工作区打开一个会话后重试,即可加载模型目录。",
|
||||
"status.network": "Network",
|
||||
"status.networkAddress": "Network 地址",
|
||||
"status.noDevicesText": "在手机端扫码配对后,设备会显示在这里。",
|
||||
|
||||
Reference in new issue
Block a user