mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-04 02:52:55 +08:00
17 lines
565 B
TypeScript
17 lines
565 B
TypeScript
import { defineProviderPlugin } from "cursor-byok:plugin";
|
|
import { codexDeviceOAuth } from "./oauth.ts";
|
|
import { codexProvider } from "./provider.ts";
|
|
import { credentialImport, presentAccount, refreshAccount, RESOURCE_TYPE } from "./resources.ts";
|
|
|
|
export default defineProviderPlugin({
|
|
providers: [codexProvider],
|
|
resources: [{
|
|
type: RESOURCE_TYPE,
|
|
displayName: { "en-US": "ChatGPT accounts", "zh-CN": "ChatGPT 账号" },
|
|
add: [codexDeviceOAuth],
|
|
import: credentialImport,
|
|
present: presentAccount,
|
|
refresh: refreshAccount,
|
|
}],
|
|
});
|