mocode-ai 0.5.7 → 0.5.8

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 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);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mocode-ai",
3
- "version": "0.5.7",
3
+ "version": "0.5.8",
4
4
  "description": "终端编码 agent:LLM + tool-call 循环 + 流式输出(含思考)+ 16 个工具,接任意 OpenAI 兼容后端。",
5
5
  "type": "module",
6
6
  "bin": {