diff options
| author | Dax Raad <[email protected]> | 2025-06-24 11:09:36 -0400 |
|---|---|---|
| committer | Dax Raad <[email protected]> | 2025-06-24 11:09:36 -0400 |
| commit | 7050cc0ac384c32c61c72cc0356065c7cdb09d4a (patch) | |
| tree | 07520c0be13c3d411246938a847a0731d2b1ddd1 | |
| parent | 4d3d63294d7598fc70459291de874baa36966b1d (diff) | |
| download | opencode-7050cc0ac384c32c61c72cc0356065c7cdb09d4a.tar.gz opencode-7050cc0ac384c32c61c72cc0356065c7cdb09d4a.zip | |
ignore: fix type errors
| -rw-r--r-- | packages/opencode/src/provider/provider.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/opencode/src/provider/provider.ts b/packages/opencode/src/provider/provider.ts index 5a4cc95da..269afa476 100644 --- a/packages/opencode/src/provider/provider.ts +++ b/packages/opencode/src/provider/provider.ts @@ -86,17 +86,17 @@ export namespace Provider { options: { apiKey: "", async fetch(input: any, init: any) { - let info = await Auth.get("github-copilot") + const info = await Auth.get("github-copilot") if (!info || info.type !== "oauth") return if (!info.access || info.expires < Date.now()) { const tokens = await copilot.access(info.refresh) if (!tokens) throw new Error("GitHub Copilot authentication expired") - info = { + await Auth.set("github-copilot", { type: "oauth", ...tokens, - } - await Auth.set("github-copilot", info) + }) + info.access = tokens.access } const headers = { ...init.headers, |
