mirror of
https://gitea.toothfairyai.com/ToothFairyAI/tf_code.git
synced 2026-03-30 13:54:01 +00:00
Revert "Support basic auth in opencode sdk (#4697)"
This reverts commit b9253d0b3b61483f82689a06c906f15ca9620287.
This commit is contained in:
parent
997aacf7f0
commit
3b2aa7e91d
@ -24,19 +24,6 @@ export function createOpencodeClient(config?: Config & { directory?: string }) {
|
||||
}
|
||||
}
|
||||
|
||||
if (config?.baseUrl) {
|
||||
const baseUrl = new URL(config.baseUrl)
|
||||
if (baseUrl.username || baseUrl.password) {
|
||||
config.headers = {
|
||||
...config.headers,
|
||||
Authorization: `Basic ${btoa(`${baseUrl.username}:${baseUrl.password}`)}`,
|
||||
}
|
||||
baseUrl.username = ""
|
||||
baseUrl.password = ""
|
||||
config.baseUrl = baseUrl.toString()
|
||||
}
|
||||
}
|
||||
|
||||
const client = createClient(config)
|
||||
return new OpencodeClient({ client })
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user