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 &&
|
|
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
|
@@ -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
|
-
|
|
12
|
-
|
|
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`;
|