新增图片批量处理

This commit is contained in:
yinsx
2026-01-15 10:24:02 +08:00
parent 1de2ac8491
commit 943bf4bbd4
18 changed files with 1208 additions and 123 deletions

View File

@ -14,13 +14,19 @@ export function initKeypress() {
process.stdin.removeAllListeners("keypress");
currentHandler = null;
// 确保raw mode关闭再重新开启
ensureRawMode(false);
// 初始化readline只需一次
if (!initialized) {
readline.emitKeypressEvents(process.stdin);
initialized = true;
}
ensureRawMode(true);
// 短暂延迟后再开启raw mode
setImmediate(() => {
ensureRawMode(true);
});
}
export function onKey(handler) {