agentgui 1.0.967 → 1.0.968

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agentgui",
3
- "version": "1.0.967",
3
+ "version": "1.0.968",
4
4
  "description": "Multi-agent ACP client with real-time communication",
5
5
  "type": "module",
6
6
  "main": "electron/main.js",
@@ -34,7 +34,12 @@ export function getBackend() {
34
34
  const u = new URL(location.href);
35
35
  const fromQs = u.searchParams.get('backend');
36
36
  if (fromQs) { lsSet(KEY, fromQs); return fromQs; }
37
- return lsGet(KEY) || DEFAULT_BACKEND;
37
+ // Same-origin default: honour the server-injected router prefix so HTTP
38
+ // calls (/health, /v1/history/*, /api/*) stay under the proxied path
39
+ // (e.g. /gm) instead of hitting the site root, where a path-routing proxy
40
+ // (nginx Basic auth) challenges and the browser re-prompts for a password.
41
+ const bu = (typeof window !== 'undefined' && window.__BASE_URL) || '';
42
+ return lsGet(KEY) || DEFAULT_BACKEND || String(bu).replace(/\/+$/, '');
38
43
  }
39
44
 
40
45
  export function setBackend(url) { lsSet(KEY, url); }