agent-loft 0.2.28 → 0.2.29

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/web/app.js +6 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agent-loft",
3
- "version": "0.2.28",
3
+ "version": "0.2.29",
4
4
  "type": "module",
5
5
  "description": "多个 agent 的工作台:把本机 Claude Code / Codex 放到一处统一管理,用飞书和 Web 页面随时驱动——会话、审批、模型切换都共用",
6
6
  "keywords": [
package/web/app.js CHANGED
@@ -1888,6 +1888,8 @@ function pinToTop(el) {
1888
1888
  fitSpacer();
1889
1889
  ui.smoothUntil = performance.now() + 450;
1890
1890
  ui.messages.scrollTo({ top: ui.messages.scrollHeight, behavior: "smooth" });
1891
+ // 平滑滚动期间留白可能又变了(比如输入框清空变矮),滚完再对齐一次
1892
+ setTimeout(afterLayout, 460);
1891
1893
  updateToBottomBtn();
1892
1894
  }
1893
1895
 
@@ -1911,7 +1913,10 @@ function bindScrollWatch() {
1911
1913
  if (["PageUp", "PageDown", "ArrowUp", "ArrowDown", "Home", "End", " "].includes(e.key)) userScrolled();
1912
1914
  });
1913
1915
  m.addEventListener("scroll", updateToBottomBtn, { passive: true });
1914
- addEventListener("resize", () => afterLayout());
1916
+ // 消息区变高(发送后输入框清空变矮)、内容变高都要重算留白;窗口 resize 管不到元素自己变尺寸
1917
+ const ro = new ResizeObserver(() => afterLayout());
1918
+ ro.observe(m);
1919
+ ro.observe(ui.msgInner);
1915
1920
  }
1916
1921
 
1917
1922
  /** 只有最后一条回复默认显示底部的操作栏(复制 / 分叉 / 用时…),前面的 hover 才出来 */