mocode-ai 0.2.0 → 0.2.1

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
@@ -626,6 +626,7 @@ function handleMouseEvent(e) {
626
626
  const absLine = screenRowToAbsLine(rowInContent);
627
627
  selection = { anchorLine: absLine, anchorCol: col, endLine: absLine, endCol: col, dragged: false };
628
628
  repaintViewport();
629
+ repaint(); // 补一次输入区重画:INPUT 态 repaintViewport 把真光标留在内容区续写位,须靠 repaint 把它带回输入框(否则点内容区会现假闪烁光标,见 issue)
629
630
  return;
630
631
  }
631
632
  if (e.type === 'drag') {
@@ -643,6 +644,7 @@ function handleMouseEvent(e) {
643
644
  selection.endLine = absLine;
644
645
  selection.endCol = col;
645
646
  repaintViewport();
647
+ repaint(); // 同上:把真光标带回输入框,防拖动选区期间光标停留内容区闪烁
646
648
  return;
647
649
  }
648
650
  // release(左键)
@@ -653,9 +655,11 @@ function handleMouseEvent(e) {
653
655
  // 内容区纯点击(未拖动):只清选区,不复制(复制交给右键)。
654
656
  selection = null;
655
657
  repaintViewport();
658
+ repaint(); // 同上:把真光标带回输入框
656
659
  return;
657
660
  }
658
661
  // 拖动过:保留高亮选区供右键复制(不在此处复制,复制交给右键释放分支)。
662
+ repaint(); // 同上:把真光标带回输入框
659
663
  }
660
664
  /** 回尾(offset=0);仅当原本滚动过才重画(避免每轮 enterRunningMode 闪烁)。 */
661
665
  export function resetScroll() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mocode-ai",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "终端编码 agent:LLM + tool-call 循环 + 流式输出(含思考)+ 16 个工具,接任意 OpenAI 兼容后端。",
5
5
  "type": "module",
6
6
  "bin": {