agent-loft 0.2.77 → 0.2.79

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.
@@ -1,4 +1,4 @@
1
- import { fill, h, icon, isTouch, toast } from "../lib/dom.js";
1
+ import { fill, h, icon, toast } from "../lib/dom.js";
2
2
  import { remoteTabs, S, ui } from "../state.js";
3
3
  import { WS } from "../lib/ws.js";
4
4
  import { closeSide, renderSidebar } from "./sidebar.js";
@@ -106,30 +106,6 @@ export function leaveRemote() {
106
106
  WS.presence();
107
107
  }
108
108
 
109
- // iOS 弹出软键盘时页面不会变矮(不认 interactive-widget),键盘会盖住下面那排快捷键:
110
- // 量出被盖住的高度,远程控制页和对话下面的终端面板垫高这么多(css/remote.css 的 --kb-inset)
111
- // 只在触屏设备上算:电脑上双指缩放网页、出了滚动条时 visualViewport 也会变小,不是键盘
112
- const vv = window.visualViewport;
113
- if (vv && isTouch) {
114
- let last = 0;
115
- const inset = () => {
116
- const covered = Math.max(0, Math.round(window.innerHeight - vv.height - vv.offsetTop));
117
- document.documentElement.style.setProperty("--kb-inset", `${covered}px`);
118
- // 键盘弹出时 iOS 会把页面(和溢出隐藏的容器)往上推,收起后不一定推回来:
119
- // 横屏全屏时整页只剩顶上露一截按键。键盘收起时统统滚回原位
120
- if (last > 0 && covered === 0) {
121
- window.scrollTo(0, 0);
122
- for (const el of [document.scrollingElement, ...document.querySelectorAll("#app, .layout, .main, .remote-pane, .remote-body")]) {
123
- if (el && el.scrollTop) el.scrollTop = 0;
124
- }
125
- }
126
- last = covered;
127
- };
128
- vv.addEventListener("resize", inset);
129
- vv.addEventListener("scroll", inset);
130
- inset();
131
- }
132
-
133
109
  // 打开了对话、新聊天、定时任务:这一页让开,连接留着
134
110
  document.addEventListener("aim:leave-view", () => {
135
111
  hidePane();
@@ -222,6 +222,7 @@ export function convTitle(c) {
222
222
  if (!c) return "新对话";
223
223
  if (c.title) return c.title;
224
224
  if (c.channel === "feishu") return `飞书会话 ${c.key.split(":")[2]?.slice(-6) ?? ""}`;
225
+ if (c.channel === "weixin") return "微信";
225
226
  return "新对话";
226
227
  }
227
228
 
@@ -611,6 +612,14 @@ export function renderSidebar() {
611
612
  });
612
613
  }
613
614
 
615
+ // 微信:每个人一条对话,没有分组,一行就够。和项目、飞书一起排序
616
+ for (const c of visible.filter((c) => c.channel === "weixin")) {
617
+ const id = `weixin:${c.key}`;
618
+ const row = convRow(c, "", `微信 · ${agentLabel(c.agent)} · ${c.cwd}`);
619
+ row.prepend(h("span", { class: "brand-icon lead", html: ICON.weixin, "aria-hidden": "true" }));
620
+ botRows.push({ id, at: c.activeAt, rows: [h("div", { class: "proj-row", ...groupDragAttrs(id) }, row)] });
621
+ }
622
+
614
623
  // ---- Web 会话直接按工作目录分组,目录按用户排的顺序(见 orderSidebarGroups) ----
615
624
  const byDir = new Map();
616
625
  for (const c of visible.filter((c) => c.channel === "web")) {