mirror of
https://wget.la/https://github.com/leookun/cursor-byok
synced 2026-10-05 04:07:36 +08:00
25 lines
685 B
TypeScript
25 lines
685 B
TypeScript
import { defineProviderPlugin } from "cursor-byok:plugin";
|
|
import { codexDeviceOAuth } from "./oauth.ts";
|
|
import { codexProvider } from "./provider.ts";
|
|
import {
|
|
consumeResetCardAction,
|
|
credentialImport,
|
|
listResetCardsAction,
|
|
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,
|
|
actions: [listResetCardsAction, consumeResetCardAction],
|
|
refresh: refreshAccount,
|
|
}],
|
|
});
|