mirror of
https://github.com/jarrodwatts/claude-hud.git
synced 2026-05-21 15:52:37 +00:00
build: compile dist/ [auto]
This commit is contained in:
11
dist/render/lines/memory.js
vendored
11
dist/render/lines/memory.js
vendored
@@ -1,10 +1,11 @@
|
||||
import { formatBytes } from '../../memory.js';
|
||||
import { label, getQuotaColor, quotaBar, RESET } from '../colors.js';
|
||||
import { getAdaptiveBarWidth } from '../../utils/terminal.js';
|
||||
import { formatBytes } from "../../memory.js";
|
||||
import { label, getQuotaColor, quotaBar, RESET } from "../colors.js";
|
||||
import { getAdaptiveBarWidth } from "../../utils/terminal.js";
|
||||
import { t } from "../../i18n/index.js";
|
||||
export function renderMemoryLine(ctx) {
|
||||
const display = ctx.config?.display;
|
||||
const colors = ctx.config?.colors;
|
||||
if (ctx.config?.lineLayout !== 'expanded') {
|
||||
if (ctx.config?.lineLayout !== "expanded") {
|
||||
return null;
|
||||
}
|
||||
if (display?.showMemoryUsage !== true) {
|
||||
@@ -13,7 +14,7 @@ export function renderMemoryLine(ctx) {
|
||||
if (!ctx.memoryUsage) {
|
||||
return null;
|
||||
}
|
||||
const memoryLabel = label('Approx RAM', colors);
|
||||
const memoryLabel = label(t("label.approxRam"), colors);
|
||||
const percentColor = getQuotaColor(ctx.memoryUsage.usedPercent, colors);
|
||||
const percent = `${percentColor}${ctx.memoryUsage.usedPercent}%${RESET}`;
|
||||
const bar = quotaBar(ctx.memoryUsage.usedPercent, getAdaptiveBarWidth(), colors);
|
||||
|
||||
Reference in New Issue
Block a user