@simplysm/sd-claude 13.0.61 → 13.0.62
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/claude/sd-statusline.js +5 -21
- package/package.json +1 -1
package/claude/sd-statusline.js
CHANGED
|
@@ -8,8 +8,6 @@ import { stdin } from "process";
|
|
|
8
8
|
|
|
9
9
|
const STDIN_TIMEOUT_MS = 5000;
|
|
10
10
|
const FETCH_TIMEOUT_MS = 3000;
|
|
11
|
-
const PROGRESS_BAR_SIZE = 5;
|
|
12
|
-
const PROGRESS_BAR_UNIT = 100 / PROGRESS_BAR_SIZE; // 20
|
|
13
11
|
|
|
14
12
|
//#endregion
|
|
15
13
|
|
|
@@ -164,19 +162,6 @@ function formatTimeRemaining(isoDate) {
|
|
|
164
162
|
}
|
|
165
163
|
}
|
|
166
164
|
|
|
167
|
-
/**
|
|
168
|
-
* 퍼센트 값을 5칸 프로그레스 바 문자열로 변환한다.
|
|
169
|
-
* 각 칸은 20%를 나타내며, 채워진 칸은 ■, 빈 칸은 □로 표시한다.
|
|
170
|
-
* @param {number} percent - 0~100 범위의 퍼센트 값
|
|
171
|
-
* @returns {string} 5글자 프로그레스 바 문자열 (예: "■■■□□")
|
|
172
|
-
*/
|
|
173
|
-
function formatProgressBar(percent) {
|
|
174
|
-
const clamped = Math.min(Math.max(percent, 0), 100);
|
|
175
|
-
const filled = Math.round(clamped / PROGRESS_BAR_UNIT);
|
|
176
|
-
const empty = PROGRESS_BAR_SIZE - filled;
|
|
177
|
-
return "■".repeat(filled) + "□".repeat(empty);
|
|
178
|
-
}
|
|
179
|
-
|
|
180
165
|
//#endregion
|
|
181
166
|
|
|
182
167
|
//#region Main
|
|
@@ -257,12 +242,11 @@ async function main() {
|
|
|
257
242
|
const folderName = path.basename(cwd);
|
|
258
243
|
|
|
259
244
|
// 출력
|
|
260
|
-
const
|
|
261
|
-
const
|
|
262
|
-
const
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
);
|
|
245
|
+
const dailyStr = dailyResetTime ? `${dailyPercent}%(${dailyResetTime})` : `${dailyPercent}%`;
|
|
246
|
+
const weekStr = weekResetDay ? `${weekPercent}%(${weekResetDay})` : `${weekPercent}%`;
|
|
247
|
+
const parts = [folderName, modelName, `${contextPercent}%`, dailyStr, weekStr];
|
|
248
|
+
if (extraUsage) parts.push(extraUsage);
|
|
249
|
+
console.log(parts.join(" │ "));
|
|
266
250
|
}
|
|
267
251
|
|
|
268
252
|
void main();
|