mocode-ai 0.5.7 → 0.5.9
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/dist/ui/layout.js +5 -0
- package/package.json +1 -1
package/dist/ui/layout.js
CHANGED
|
@@ -470,6 +470,11 @@ export function clearContent() {
|
|
|
470
470
|
scrollLockUntil = 0;
|
|
471
471
|
mdActive = false;
|
|
472
472
|
mdBuf = '';
|
|
473
|
+
// 清内容缓冲时必须同步重置 banner 状态:否则后续 writeBanner() 会走 rewriteBanner 路径,
|
|
474
|
+
// 在已空的 content 上调 replaceHead(0, lines) → startIdx(0) >= committed(0) → 抛错 → REPL 退出。
|
|
475
|
+
// /theme、/clear、/resume 等命令 clearContent 后紧接 writeBanner 的场景均依赖此重置。
|
|
476
|
+
bannerH = 0;
|
|
477
|
+
bannerRows = [];
|
|
473
478
|
content.reset();
|
|
474
479
|
notifyContentReset(); // batch 渲染器同步重置(batch 摘要行索引全部失效)
|
|
475
480
|
stdout.write(esc.home);
|