hermes-agent/apps/desktop/src/app/gateway/hooks
Brooklyn Nicholson bfc8e3b00d fix(desktop): give ⌘T session tabs a live gateway so slash completions load
`useGatewayRequest` only exposed the gateway through a ref that its own
subscription effect fills in, so a component reading it during render saw
null on mount. Session tiles — what ⌘T and the tab-strip "+" open — did
exactly that and passed `gateway={null}` down to ChatBar. The slash
adapter is disabled without a gateway, so a new tab had no completions at
all while ⌘N, which resolves its gateway through a state-driven memo,
worked fine. Nothing re-rendered the tile afterwards unless the connection
state happened to flip, so it never recovered.

Return the `$gateway` atom as a reactive value alongside the ref and use
it wherever the gateway is needed as a render-time value. The ref stays
for `requestGateway`, which wants a stable identity. The model picker,
model visibility, and settings overlays read the same ref during render,
so they're moved over too.
2026-07-25 20:30:55 -05:00
..
gateway-hmr-survivor.test.ts fix(desktop): keep gateway session alive across Vite HMR 2026-07-23 02:15:25 -05:00
gateway-hmr-survivor.ts fix(desktop): gate HMR session-survival entirely out of prod builds 2026-07-23 02:15:25 -05:00
use-gateway-boot.test.tsx fmt(js): `npm run fix` on merge (#70291) 2026-07-23 20:23:02 +00:00
use-gateway-boot.ts fix(desktop): gate HMR session-survival entirely out of prod builds 2026-07-23 02:15:25 -05:00
use-gateway-request.test.ts fix(desktop): give ⌘T session tabs a live gateway so slash completions load 2026-07-25 20:30:55 -05:00
use-gateway-request.ts fix(desktop): give ⌘T session tabs a live gateway so slash completions load 2026-07-25 20:30:55 -05:00