Show RAM usage in the VS Code status bar
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 68/100
- Issue 类型
- 功能
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- typescript, vscode
调研方向
从 src/remote/remote.ts 开始,这里 agent 元数据状态栏项使用第一个元数据事件作为状态文本。检查 coder stat mem 和默认 Kubernetes 模板中的元数据是如何表示的,然后跟踪工具提示的行为。完成标准是:活动工作区可以显示已使用内存、总内存和百分比,明确标示高使用率,保留元数据详细信息,并处理缺失或无法解析的 RAM 数据,而不会暗示存在有效的读数。
由索引模型根据 Issue 内容生成。
描述
Feature request
Please add a way for the Coder Remote VS Code extension to show workspace RAM usage directly in the VS Code status bar, alongside or instead of the current first agent metadata value.
Today, Coder workspace templates commonly expose both CPU and RAM through agent metadata, for example:
metadata {
display_name = "CPU Usage"
key = "0_cpu_usage"
script = "coder stat cpu"
interval = 10
timeout = 1
}
metadata {
display_name = "RAM Usage"
key = "1_ram_usage"
script = "coder stat mem"
interval = 10
timeout = 1
}
The VS Code extension appears to render the first metadata value in the status bar and place the full metadata list in the tooltip. In practice this means CPU is often visible in the status bar, while RAM requires opening the Coder sidebar or hovering the status item.
Why RAM should be more visible
In Kubernetes-backed workspaces, CPU and RAM pressure have very different failure modes:
- When CPU maxes out, Kubernetes throttles the container and work usually just takes longer.
- When RAM maxes out, Kubernetes can OOM-kill the pod and restart the workspace.
That makes RAM usage much more important to watch continuously. A status-bar RAM indicator would give users time to stop processes, reduce workload, or resize the workspace before the pod is killed.
Suggested UX
Show RAM usage directly in the VS Code status bar when RAM metadata is available, for example:
RAM 54.1/64 GiB (85%)
or a compact variant:
54.1/64 GiB RAM (85%)
Possible behavior:
- Prefer metadata whose display name/key clearly represents RAM or memory usage.
- Keep CPU and other metadata available in the tooltip.
- Show a warning state when memory usage is high, such as above 80% or 90%.
- If RAM data is unavailable, do not show a misleading value; keep current behavior or explicitly indicate that memory usage is unavailable.
Acceptance criteria
- The VS Code status bar can show RAM usage for the active Coder workspace.
- The visible status text includes used memory, memory limit/total, and percentage when available.
- High-memory states are visually noticeable.
- Existing agent metadata tooltip behavior is preserved or improved.
- Missing/unparseable RAM metadata is handled explicitly and does not look like a successful live reading.
Relevant code paths
src/remote/remote.tscurrently creates the agent metadata status bar item and uses the first metadata event as the status text.coder/coderalready providescoder stat mem, and default Kubernetes template metadata includesRAM Usage, so this may be possible as a display-priority improvement without requiring new workspace telemetry.
- 主要语言
- TypeScript
- 星标
- 131
- 派生
- 48
- 平均合并
- 4 天 15 小时
- 30 天内合并 PR
- 17
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
coder/vscode-coder 的其他 Issue
-
coder/vscode-coder#1125 · 1 条评论 · 已指派 1 人 ·
-
tech-debt
coder/vscode-coder#1119 · 1 条评论 · 已指派 1 人 ·
-
enhancement tech-debt
难度 3/5 1-2 天 新手友好度 74/100
coder/vscode-coder#1118 · 1 条评论 ·
-
coder/vscode-coder#1113 · 3 条评论 · 已指派 1 人 ·
-
enhancement tech-debt
难度 5/5 一周以上 新手友好度 45/100
coder/vscode-coder#1112 · 1 条评论 ·
查看 coder/vscode-coder 的全部 Issue
相似的 Issue
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs 未关闭
难度 2/5 1-3 小时 新手友好度 70/100
-
Crush 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
catppuccin/catppuccin#3125 ·
-
难度 1/5 1 小时以内 新手友好度 90/100
ElementsProject/cln-application#167 · 1 条评论 · 1 个 reaction ·
-
难度 2/5 1-3 小时 新手友好度 75/100
Quantco/pnpm-licenses#17 ·
-
难度 2/5 1-3 小时 新手友好度 75/100