Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Show RAM usage in the VS Code status bar

未关闭
#1,027 3 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
3/5
预计耗时
1-2 天
新手友好度
68/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
冷清
技术栈
typescript, vscode

调研方向

从 src/remote/remote.ts 开始,这里 agent 元数据状态栏项使用第一个元数据事件作为状态文本。检查 coder stat mem 和默认 Kubernetes 模板中的元数据是如何表示的,然后跟踪工具提示的行为。完成标准是:活动工作区可以显示已使用内存、总内存和百分比,明确标示高使用率,保留元数据详细信息,并处理缺失或无法解析的 RAM 数据,而不会暗示存在有效的读数。

由索引模型根据 Issue 内容生成。

描述

Feature vs-code

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.ts currently creates the agent metadata status bar item and uses the first metadata event as the status text.
  • coder/coder already provides coder stat mem, and default Kubernetes template metadata includes RAM Usage, so this may be possible as a display-priority improvement without requiring new workspace telemetry.
主要语言
TypeScript
星标
131
派生
48
平均合并
4 天 15 小时
30 天内合并 PR
17

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

coder/vscode-coder 的其他 Issue

查看 coder/vscode-coder 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。