mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 00:03:13 +03:00
fix(core): clarify legacy ChatGPT OAuth method labels (#53451)
This commit is contained in:
committed by
GitHub
Unverified
parent
19f8610c0a
commit
48b295aef4
@@ -66,8 +66,9 @@ export const OpenCodeZen = {
|
||||
|
||||
export const LoginMethods = {
|
||||
render: renderConnection("openai", [
|
||||
{ type: "oauth", label: "ChatGPT Pro/Plus (browser)" },
|
||||
{ type: "oauth", label: "ChatGPT Pro/Plus (headless)" },
|
||||
{ type: "oauth", label: "Sign in with ChatGPT" },
|
||||
{ type: "oauth", label: "ChatGPT browser (legacy)" },
|
||||
{ type: "oauth", label: "ChatGPT device code (legacy)" },
|
||||
{ type: "key", label: "API key" },
|
||||
]),
|
||||
}
|
||||
|
||||
@@ -55,7 +55,7 @@ const browser = (app: App.Info) =>
|
||||
method: {
|
||||
id: browserMethodID,
|
||||
type: "oauth",
|
||||
label: "ChatGPT Pro/Plus (browser)",
|
||||
label: "ChatGPT browser (legacy)",
|
||||
},
|
||||
authorize: () =>
|
||||
Effect.gen(function* () {
|
||||
@@ -123,7 +123,7 @@ function listen(server: Server) {
|
||||
Effect.catchIf(addressInUse, () =>
|
||||
Effect.fail(
|
||||
new Error(
|
||||
`OpenAI browser login needs local port ${callbackPort} or ${callbackFallbackPort}, but both are already in use. Stop the processes using those ports or choose ChatGPT Pro/Plus (headless), then try again.`,
|
||||
`OpenAI browser login needs local port ${callbackPort} or ${callbackFallbackPort}, but both are already in use. Stop the processes using those ports or choose ChatGPT device code (legacy), then try again.`,
|
||||
),
|
||||
),
|
||||
),
|
||||
@@ -174,7 +174,7 @@ const headless = (app: App.Info) =>
|
||||
method: {
|
||||
id: headlessMethodID,
|
||||
type: "oauth",
|
||||
label: "ChatGPT Pro/Plus (headless)",
|
||||
label: "ChatGPT device code (legacy)",
|
||||
},
|
||||
authorize: () =>
|
||||
Effect.gen(function* () {
|
||||
|
||||
@@ -73,12 +73,12 @@ describe("OpenAIPlugin", () => {
|
||||
{
|
||||
id: Integration.MethodID.make("chatgpt-browser"),
|
||||
type: "oauth",
|
||||
label: "ChatGPT Pro/Plus (browser)",
|
||||
label: "ChatGPT browser (legacy)",
|
||||
},
|
||||
{
|
||||
id: Integration.MethodID.make("chatgpt-headless"),
|
||||
type: "oauth",
|
||||
label: "ChatGPT Pro/Plus (headless)",
|
||||
label: "ChatGPT device code (legacy)",
|
||||
},
|
||||
])
|
||||
}),
|
||||
|
||||
@@ -320,7 +320,7 @@ it.live(
|
||||
expect(yield* Effect.promise(() => response.json())).toEqual({
|
||||
_tag: "InvalidRequestError",
|
||||
message:
|
||||
"OpenAI browser login needs local port 1455 or 1457, but both are already in use. Stop the processes using those ports or choose ChatGPT Pro/Plus (headless), then try again.",
|
||||
"OpenAI browser login needs local port 1455 or 1457, but both are already in use. Stop the processes using those ports or choose ChatGPT device code (legacy), then try again.",
|
||||
kind: "integration_authorization",
|
||||
})
|
||||
}),
|
||||
|
||||
@@ -20,7 +20,7 @@ code to enter; press `o` to open the URL and `c` to copy the authorization detai
|
||||
|
||||
```text
|
||||
/connect
|
||||
# Select OpenAI, then ChatGPT Pro/Plus (headless).
|
||||
# Select OpenAI, then ChatGPT device code (legacy).
|
||||
```
|
||||
|
||||
Run `/connect` again to add another account. Selecting an already connected provider opens its account list, where you
|
||||
|
||||
Reference in New Issue
Block a user