fix(opencode): improve console login transport errors (#21350)

This commit is contained in:
Kit Langton
2026-04-07 18:31:53 +00:00
committed by GitHub
parent 81bdffc81c
commit d83fe4b540
8 changed files with 182 additions and 13 deletions
+8
View File
@@ -0,0 +1,8 @@
export const normalizeServerUrl = (input: string): string => {
const url = new URL(input)
url.search = ""
url.hash = ""
const pathname = url.pathname.replace(/\/+$/, "")
return pathname.length === 0 ? url.origin : `${url.origin}${pathname}`
}