We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9d220b6 commit a4dc96eCopy full SHA for a4dc96e
1 file changed
src/api.ts
@@ -21,7 +21,8 @@ export function setCurrentAgent(agentId: string | null) {
21
22
// Helper to build URL with agent parameter
23
function buildUrl(endpoint: string, params?: Record<string, string>): string {
24
- const url = new URL(`${_baseUrl}${endpoint}`);
+ const base = _baseUrl || window.location.origin;
25
+ const url = new URL(`${base}${endpoint}`);
26
if (_currentAgent) {
27
url.searchParams.set("agent", _currentAgent);
28
}
0 commit comments