Skip to content

The agent that grows with you

fmt(js): `npm run fix` on merge (#83132)

hermes-seaeye[bot]c08b086013f0
diff --git a/apps/desktop/electron/hud-snap-shortcut.ts b/apps/desktop/electron/hud-snap-shortcut.ts
index 5da8bb1cb87..1bc94f44ddf 100644
--- a/apps/desktop/electron/hud-snap-shortcut.ts
+++ b/apps/desktop/electron/hud-snap-shortcut.ts
@@ -18,7 +18,10 @@ export interface HudSnapShortcutController {
dispose(): void
}
-export function createHudSnapShortcut(globalShortcut: GlobalShortcutLike, onSnap: () => void): HudSnapShortcutController {
+export function createHudSnapShortcut(
+ globalShortcut: GlobalShortcutLike,
+ onSnap: () => void
+): HudSnapShortcutController {
let active: null | string = null
const release = () => {
diff --git a/apps/desktop/electron/hud-snap.ts b/apps/desktop/electron/hud-snap.ts
index 56bdac13d40..947fac1980f 100644
--- a/apps/desktop/electron/hud-snap.ts
+++ b/apps/desktop/electron/hud-snap.ts
@@ -22,11 +22,7 @@ interface Rect {
* Window top-left in screen space (DIP) that places `anchor` — a point in the
* window's CSS pixels — under `cursor` (screen DIP).
*/
-export function windowOriginForCursorAnchor(
- cursor: Point,
- anchor: Point,
- zoomFactor: number
-): Point {
+export function windowOriginForCursorAnchor(cursor: Point, anchor: Point, zoomFactor: number): Point {
const scale = Number.isFinite(zoomFactor) && zoomFactor > 0 ? zoomFactor : 1
return {
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.ts
index d743b1f065b..46710822855 100644
--- a/apps/desktop/electron/main.ts
+++ b/apps/desktop/electron/main.ts
@@ -9226,6 +9226,7 @@ function applyHudSnapToPointer() {
const display = screen.getDisplayNearestPoint(cursor)
const workArea = display?.workArea ?? bounds
const anchor = { x: Math.round(bounds.width / 2), y: HUD_SNAP_ANCHOR_Y }
+
const origin = snapHudBounds(
cursor,
anchor,