-
Notifications
You must be signed in to change notification settings - Fork 82
fix: improve support for running agentapi under a subpath #40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 6 commits
227ef9b
ace9c6a
60b542f
9f6efb4
7de9a8b
b1a1904
07eee10
01d97da
1a5500f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -57,7 +57,8 @@ export function ChatProvider({ children }: PropsWithChildren) { | |
const [serverStatus, setServerStatus] = useState<ServerStatus>("unknown"); | ||
const eventSourceRef = useRef<EventSource | null>(null); | ||
const searchParams = useSearchParams(); | ||
const agentAPIUrl = searchParams.get("url") || window.location.origin; | ||
const defaultAgentAPIURL = new URL("../../", window.location.href).toString(); | ||
|
||
const agentAPIUrl = searchParams.get("url") || defaultAgentAPIURL; | ||
|
||
// Set up SSE connection to the events endpoint | ||
useEffect(() => { | ||
|
Uh oh!
There was an error while loading. Please reload this page.