minecodex 2.0.10 → 2.0.11

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.
@@ -34,7 +34,10 @@ function reconcile() {
34
34
  }, { signal });
35
35
  // 作为原生按钮组的独立子项,继承组内 gap,不放进铃铛的 Tooltip 包装层。
36
36
  let anchor = bell;
37
- while (anchor.parentElement && getComputedStyle(anchor.parentElement).display !== "flex") {
37
+ while (anchor.parentElement && anchor.parentElement !== sidebar) {
38
+ const layout = getComputedStyle(anchor.parentElement);
39
+ // 跳过零间距的通知包装层,接入真正带原生 gap 的按钮组。
40
+ if (["flex", "inline-flex"].includes(layout.display) && Number.parseFloat(layout.columnGap) > 0) break;
38
41
  anchor = anchor.parentElement;
39
42
  }
40
43
  anchor.after(button);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "minecodex",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
4
4
  "description": "Lightweight, local-first plugins for the Codex desktop app.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -8,8 +8,9 @@ export function installComposerMenu(signal, ui) {
8
8
  ui.layer(node, "floating");
9
9
  const rect = body.getBoundingClientRect();
10
10
  const root = anchor.closest("[data-codex-composer-root], [data-chatgpt-composer]");
11
- // 首页 Add 向下展开;已有会话保留向上的输入框菜单。
12
- const below = root?.getAttribute("data-composer-placement") === "home";
11
+ const nativeSide = anchor.closest("[data-dropdown-overlay-side]")?.getAttribute("data-dropdown-overlay-side");
12
+ // 新会话跟随原生 Add 方向,不能仅凭 home 将 Codex 模式改为向下。
13
+ const below = root?.getAttribute("data-composer-placement") === "home" && nativeSide === "bottom";
13
14
  const zoom = Number.parseFloat(getComputedStyle(node).zoom) || 1;
14
15
  node.style.left = `${rect.left / zoom}px`;
15
16
  node.style.top = `${(below ? rect.bottom + gap : rect.top - gap) / zoom}px`;