@noobdemon/noob-cli 1.13.4 → 1.13.5
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/CHANGELOG.md +6 -0
- package/package.json +1 -1
- package/src/repl.js +5 -2
- package/src/tui.js +4 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
Tất cả thay đổi đáng kể của `@noobdemon/noob-cli` được ghi vào file này.
|
|
4
4
|
|
|
5
|
+
## [1.13.5] - 2026-06-30
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Backspace / Ctrl+Backspace đảo đúng chiều** (`src/tui.js`): Backspace xoá 1 ký tự, Ctrl+Backspace/Ctrl+W xoá nguyên từ (trước đây bị ngược).
|
|
9
|
+
- **`/usage` hiện `undefined`** (`src/repl.js` + `worker/migration-key-status-fields.sql`): `printUsage` thay null bằng `?`; SQL refresh `key_status()` deployed để trả `remaining`/`limit`/`window_count`.
|
|
10
|
+
|
|
5
11
|
## [1.13.4] - 2026-06-29
|
|
6
12
|
|
|
7
13
|
### Added
|
package/package.json
CHANGED
package/src/repl.js
CHANGED
|
@@ -2316,10 +2316,13 @@ function printUsage(u) {
|
|
|
2316
2316
|
if (u.plan === 'admin') lines.push(` ${t.remaining}: ${c.ok(t.unlimited)}`);
|
|
2317
2317
|
else if (u.plan === 'trial')
|
|
2318
2318
|
lines.push(` ${t.remaining}: ${c.accent(t.trialLeft(u.remaining ?? 0))}`);
|
|
2319
|
-
else
|
|
2319
|
+
else {
|
|
2320
|
+
const rem = u.remaining ?? '?';
|
|
2321
|
+
const lim = u.limit ?? '?';
|
|
2320
2322
|
lines.push(
|
|
2321
|
-
` ${t.remaining}: ${c.accent(String(
|
|
2323
|
+
` ${t.remaining}: ${c.accent(String(rem))} / ${lim} (${t.windowInfo(u.window_count ?? 0, lim)})`
|
|
2322
2324
|
);
|
|
2325
|
+
}
|
|
2323
2326
|
if (u.reset_at) lines.push(c.dim(` ${t.resetAt}: ${fmtTime(u.reset_at)}`));
|
|
2324
2327
|
if (u.total_used != null) lines.push(c.dim(` ${t.used} (tổng): ${u.total_used}`));
|
|
2325
2328
|
console.log(box(lines.join('\n'), t.usageTitle, '#a78bfa'));
|
package/src/tui.js
CHANGED
|
@@ -935,15 +935,16 @@ export function createTui({ onLine, onInterrupt, onEOF, onShiftTab, onCtrlT, com
|
|
|
935
935
|
i++;
|
|
936
936
|
continue;
|
|
937
937
|
}
|
|
938
|
-
if (ch === '\
|
|
939
|
-
// Ctrl+Backspace (
|
|
938
|
+
if (ch === '\x17' || ch === '\x08') {
|
|
939
|
+
// Ctrl+W và Ctrl+Backspace (terminal này gửi \x08): xoá nguyên từ.
|
|
940
940
|
deleteWordLeft();
|
|
941
941
|
refreshMenu();
|
|
942
942
|
draw();
|
|
943
943
|
i++;
|
|
944
944
|
continue;
|
|
945
|
-
} // Ctrl+
|
|
945
|
+
} // Ctrl+W / Ctrl+Backspace
|
|
946
946
|
if (ch === '\x7f') {
|
|
947
|
+
// Backspace thường: xoá 1 ký tự.
|
|
947
948
|
backspace();
|
|
948
949
|
refreshMenu();
|
|
949
950
|
draw();
|