Merge remote-tracking branch 'origin/feat/linked-opencode-servers' into feat/remote-server-automation

# Conflicts:
#	frontend/src/lib/navigation.test.ts
This commit is contained in:
Chris Scott committed 2026-10-19 11:37:57 -04:00
commit 24745597f2
21 files changed
+1033 -84

No files matched your search

+14
View File
@@ -2,3 +2,17 @@
export function trimUrlTrailingSlashes(url: string): string {
return url.trim().replace(/\/+$/, '')
}
/** Reports whether two URLs share the same origin; false when either URL is invalid. */
export function haveSameUrlOrigin(first: string, second: string): boolean {
const origin = readUrlOrigin(first)
return origin !== null && origin === readUrlOrigin(second)
}
function readUrlOrigin(value: string): string | null {
try {
return new URL(value).origin
} catch {
return null
}
}