claude-codex-proxy 1.0.5-beta.13 → 1.0.5-beta.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +272 -0
- package/bin/cli.js +2 -37
- package/package.json +1 -1
- package/public/css/style.css +9 -210
- package/public/index.html +926 -32
- package/public/js/app.js +744 -115
- package/src/account-manager.js +3 -34
- package/src/account-rotation/rate-limits.js +26 -4
- package/src/account-rotation/strategies/base-strategy.js +0 -4
- package/src/account-rotation/strategies/sticky-strategy.js +0 -7
- package/src/claude-config.js +18 -0
- package/src/deployment.js +49 -49
- package/src/direct-api.js +13 -12
- package/src/index.js +4 -13
- package/src/middleware/auth.js +11 -46
- package/src/middleware/credentials.js +3 -13
- package/src/model-api.js +0 -60
- package/src/response-streamer.js +5 -5
- package/src/routes/accounts-route.js +2 -106
- package/src/routes/api-routes.js +35 -61
- package/src/routes/chat-route.js +4 -25
- package/src/routes/claude-config-route.js +15 -22
- package/src/routes/logs-route.js +2 -21
- package/src/routes/messages-route.js +13 -39
- package/src/routes/settings-route.js +5 -36
- package/src/server-settings.js +2 -18
- package/src/utils/logger.js +0 -18
- package/public/login.html +0 -32
- package/public/views/accounts-modals.html +0 -215
- package/public/views/accounts.html +0 -202
- package/public/views/client-api-keys-modals.html +0 -55
- package/public/views/client-api-keys.html +0 -69
- package/public/views/dashboard.html +0 -90
- package/public/views/empty.html +0 -0
- package/public/views/logs.html +0 -99
- package/public/views/settings.html +0 -123
- package/src/admin-path.js +0 -33
- package/src/client-key-usage.js +0 -125
- package/src/model-pricing.js +0 -96
- package/src/routes/client-quota-route.js +0 -25
- package/src/utils/proxy-logging.js +0 -5
package/src/server-settings.js
CHANGED
|
@@ -10,8 +10,6 @@ export const DEFAULT_MODEL_MAP = {
|
|
|
10
10
|
haiku: 'gpt-5.4-mini'
|
|
11
11
|
};
|
|
12
12
|
|
|
13
|
-
export const DEFAULT_CLIENT_KEY_WEEKLY_LIMIT_USD = 50;
|
|
14
|
-
|
|
15
13
|
export const DEFAULT_SETTINGS = {
|
|
16
14
|
accountStrategy: 'sticky',
|
|
17
15
|
defaultCodexModel: 'gpt-5.5',
|
|
@@ -26,16 +24,6 @@ function ensureConfigDir() {
|
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
26
|
|
|
29
|
-
function normalizeClientApiKey(clientApiKey) {
|
|
30
|
-
const weeklyLimitUsd = Number(clientApiKey?.weeklyLimitUsd);
|
|
31
|
-
return {
|
|
32
|
-
...clientApiKey,
|
|
33
|
-
weeklyLimitUsd: Number.isFinite(weeklyLimitUsd) && weeklyLimitUsd >= 0
|
|
34
|
-
? weeklyLimitUsd
|
|
35
|
-
: DEFAULT_CLIENT_KEY_WEEKLY_LIMIT_USD
|
|
36
|
-
};
|
|
37
|
-
}
|
|
38
|
-
|
|
39
27
|
function mergeSettings(data = {}) {
|
|
40
28
|
return {
|
|
41
29
|
...DEFAULT_SETTINGS,
|
|
@@ -43,10 +31,7 @@ function mergeSettings(data = {}) {
|
|
|
43
31
|
modelMap: {
|
|
44
32
|
...DEFAULT_MODEL_MAP,
|
|
45
33
|
...(data.modelMap || {})
|
|
46
|
-
}
|
|
47
|
-
clientApiKeys: Array.isArray(data.clientApiKeys)
|
|
48
|
-
? data.clientApiKeys.map(normalizeClientApiKey)
|
|
49
|
-
: []
|
|
34
|
+
}
|
|
50
35
|
};
|
|
51
36
|
}
|
|
52
37
|
|
|
@@ -80,6 +65,5 @@ export default {
|
|
|
80
65
|
setServerSettings,
|
|
81
66
|
SETTINGS_FILE,
|
|
82
67
|
DEFAULT_SETTINGS,
|
|
83
|
-
DEFAULT_MODEL_MAP
|
|
84
|
-
DEFAULT_CLIENT_KEY_WEEKLY_LIMIT_USD
|
|
68
|
+
DEFAULT_MODEL_MAP
|
|
85
69
|
};
|
package/src/utils/logger.js
CHANGED
|
@@ -40,24 +40,6 @@ class Logger extends EventEmitter {
|
|
|
40
40
|
return [...this.history];
|
|
41
41
|
}
|
|
42
42
|
|
|
43
|
-
/**
|
|
44
|
-
* Returns a newest-first page of in-memory log entries.
|
|
45
|
-
*
|
|
46
|
-
* @param {number} page - One-based page number.
|
|
47
|
-
* @param {number} pageSize - Maximum number of entries per page.
|
|
48
|
-
* @returns {{ logs: object[], total: number }} Requested page and total entry count.
|
|
49
|
-
*/
|
|
50
|
-
getHistoryPage(page, pageSize) {
|
|
51
|
-
const total = this.history.length;
|
|
52
|
-
const end = Math.max(0, total - (page - 1) * pageSize);
|
|
53
|
-
const start = Math.max(0, end - pageSize);
|
|
54
|
-
|
|
55
|
-
return {
|
|
56
|
-
logs: this.history.slice(start, end).reverse(),
|
|
57
|
-
total
|
|
58
|
-
};
|
|
59
|
-
}
|
|
60
|
-
|
|
61
43
|
clear() {
|
|
62
44
|
this.history = [];
|
|
63
45
|
}
|
package/public/login.html
DELETED
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en" data-theme="codex" class="dark">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>Sign in · Claude Codex Proxy</title>
|
|
7
|
-
<script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
|
|
8
|
-
<link rel="stylesheet" href="/css/style.css">
|
|
9
|
-
</head>
|
|
10
|
-
<body class="bg-space-950 text-gray-300 font-sans antialiased min-h-screen" x-data="app" x-init="init()">
|
|
11
|
-
<main x-cloak x-show="authChecked" class="min-h-screen flex items-center justify-center px-4">
|
|
12
|
-
<div class="w-full max-w-md bg-space-900/70 border border-space-border rounded-2xl p-6 shadow-2xl backdrop-blur-md">
|
|
13
|
-
<div class="flex items-center gap-3 mb-6">
|
|
14
|
-
<div class="w-10 h-10 rounded bg-gradient-to-br from-neon-purple to-blue-600 flex items-center justify-center text-white font-bold">CX</div>
|
|
15
|
-
<div>
|
|
16
|
-
<h1 class="text-xl font-bold text-white">Access Required</h1>
|
|
17
|
-
<p class="text-sm text-gray-500">Enter the server access key to open the management UI.</p>
|
|
18
|
-
</div>
|
|
19
|
-
</div>
|
|
20
|
-
<form @submit.prevent="login" class="space-y-4">
|
|
21
|
-
<label class="form-control w-full">
|
|
22
|
-
<span class="label-text text-gray-400 mb-1">Access Key</span>
|
|
23
|
-
<input type="password" x-model="loginApiKey" class="input input-bordered w-full bg-space-950 border-space-border text-white" placeholder="Enter access key" autocomplete="current-password" autofocus>
|
|
24
|
-
</label>
|
|
25
|
-
<p x-show="loginError" x-text="loginError" class="text-sm text-red-400"></p>
|
|
26
|
-
<button type="submit" class="btn w-full bg-neon-purple hover:bg-purple-600 border-0 text-white">Unlock UI</button>
|
|
27
|
-
</form>
|
|
28
|
-
</div>
|
|
29
|
-
</main>
|
|
30
|
-
<script src="/js/app.js"></script>
|
|
31
|
-
</body>
|
|
32
|
-
</html>
|
|
@@ -1,215 +0,0 @@
|
|
|
1
|
-
<div x-show="showAddModal" x-transition class="fixed inset-0 z-50 flex items-center justify-center p-4" style="display: none;">
|
|
2
|
-
<div class="absolute inset-0 bg-black/70 backdrop-blur-sm" @click="showAddModal = false"></div>
|
|
3
|
-
<div class="relative bg-space-900 border border-space-border rounded-xl shadow-2xl max-w-md w-full p-6">
|
|
4
|
-
<h3 class="font-bold text-lg text-white mb-4">Add New Account</h3>
|
|
5
|
-
|
|
6
|
-
<template x-if="!oauthManualMode">
|
|
7
|
-
<div>
|
|
8
|
-
<p class="text-sm text-gray-400 mb-6">Connect a ChatGPT account to use with the proxy. The account will be used for API calls.</p>
|
|
9
|
-
|
|
10
|
-
<div class="flex flex-col gap-3">
|
|
11
|
-
<button class="btn bg-neon-purple hover:bg-purple-600 border-none text-white btn-sm gap-3 h-11"
|
|
12
|
-
@click="startOAuth()">
|
|
13
|
-
<svg class="w-5 h-5" viewBox="0 0 24 24" fill="currentColor">
|
|
14
|
-
<path d="M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09z"></path>
|
|
15
|
-
<path d="M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23z"></path>
|
|
16
|
-
<path d="M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22.81-.62z"></path>
|
|
17
|
-
<path d="M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53z"></path>
|
|
18
|
-
</svg>
|
|
19
|
-
<span>Connect via OAuth</span>
|
|
20
|
-
</button>
|
|
21
|
-
|
|
22
|
-
<div class="text-center">
|
|
23
|
-
<span class="text-xs text-gray-500">or</span>
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<button class="btn btn-outline btn-sm text-gray-400 hover:text-white gap-2"
|
|
27
|
-
@click="startManualOAuth()">
|
|
28
|
-
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
29
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 6H6a2 2 0 00-2 2v10a2 2 0 002 2h10a2 2 0 002-2v-4M14 4h6m0 0v6m0-6L10 14" />
|
|
30
|
-
</svg>
|
|
31
|
-
<span>Manual Authorization (Headless)</span>
|
|
32
|
-
</button>
|
|
33
|
-
|
|
34
|
-
<div class="text-center">
|
|
35
|
-
<span class="text-xs text-gray-500">or</span>
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<button class="btn btn-outline btn-sm text-gray-400 hover:text-white gap-2"
|
|
39
|
-
@click="importFromCodex()">
|
|
40
|
-
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
41
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 16v1a3 3 0 003 3h10a3 3 0 003-3v-1m-4-8l-4-4m0 0L8 8m4-4v12" />
|
|
42
|
-
</svg>
|
|
43
|
-
<span>Import from Codex App</span>
|
|
44
|
-
</button>
|
|
45
|
-
</div>
|
|
46
|
-
|
|
47
|
-
<div class="mt-6 flex justify-end">
|
|
48
|
-
<button class="btn btn-outline btn-sm text-gray-400" @click="showAddModal = false">Cancel</button>
|
|
49
|
-
</div>
|
|
50
|
-
</div>
|
|
51
|
-
</template>
|
|
52
|
-
|
|
53
|
-
<template x-if="oauthManualMode">
|
|
54
|
-
<div>
|
|
55
|
-
<p class="text-sm text-gray-400 mb-4">For headless servers without a browser:</p>
|
|
56
|
-
|
|
57
|
-
<div class="bg-space-800/50 border border-space-border/30 rounded-lg p-3 mb-4">
|
|
58
|
-
<p class="text-xs text-gray-500 mb-2">1. Open this URL on another device:</p>
|
|
59
|
-
<div class="flex items-center gap-2">
|
|
60
|
-
<input type="text" readonly :value="oauthManualUrl"
|
|
61
|
-
class="input flex-1 bg-space-700 border-space-border text-xs font-mono text-gray-300">
|
|
62
|
-
<button class="btn btn-xs btn-ghost text-gray-400" @click="copyToClipboard(oauthManualUrl)">
|
|
63
|
-
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
64
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 16H6a2 2 0 01-2-2V6a2 2 0 012-2h8a2 2 0 012 2v2m-6 12h8a2 2 0 002-2v-8a2 2 0 00-2-2h-8a2 2 0 00-2 2v8a2 2 0 002 2z" />
|
|
65
|
-
</svg>
|
|
66
|
-
</button>
|
|
67
|
-
</div>
|
|
68
|
-
</div>
|
|
69
|
-
|
|
70
|
-
<div class="mb-4">
|
|
71
|
-
<p class="text-xs text-gray-500 mb-2">2. After authorizing, paste the callback URL or code:</p>
|
|
72
|
-
<input type="text" x-model="oauthManualCode"
|
|
73
|
-
placeholder="http://localhost:1455/auth/callback?code=... or just the code"
|
|
74
|
-
class="input w-full bg-space-800 border-space-border text-white font-mono text-sm">
|
|
75
|
-
</div>
|
|
76
|
-
|
|
77
|
-
<div class="flex justify-end gap-2">
|
|
78
|
-
<button class="btn btn-outline btn-sm text-gray-400" @click="oauthManualMode = false">Back</button>
|
|
79
|
-
<button class="btn bg-neon-purple hover:bg-purple-600 border-none text-white btn-sm"
|
|
80
|
-
@click="submitManualOAuth()" :disabled="!oauthManualCode">
|
|
81
|
-
Add Account
|
|
82
|
-
</button>
|
|
83
|
-
</div>
|
|
84
|
-
</div>
|
|
85
|
-
</template>
|
|
86
|
-
</div>
|
|
87
|
-
</div>
|
|
88
|
-
|
|
89
|
-
<div x-show="showAccountExpirationModalView" x-transition class="fixed inset-0 z-50 flex items-center justify-center p-4" style="display: none;">
|
|
90
|
-
<div class="absolute inset-0 bg-black/70 backdrop-blur-sm" @click="closeAccountExpirationModal()"></div>
|
|
91
|
-
<div class="relative bg-space-900 border border-space-border rounded-xl shadow-2xl max-w-md w-full p-6">
|
|
92
|
-
<h3 class="font-bold text-lg text-white mb-2">Set Account Expiration</h3>
|
|
93
|
-
<p class="text-sm text-gray-500 font-mono mb-5" x-text="expirationTarget?.email"></p>
|
|
94
|
-
<label class="block text-xs font-semibold uppercase tracking-wider text-gray-500 mb-2" for="account-expiration">Expires at</label>
|
|
95
|
-
<input id="account-expiration" type="datetime-local" x-model="accountExpirationInput"
|
|
96
|
-
class="input w-full bg-space-800 border-space-border text-white font-mono text-sm">
|
|
97
|
-
<p class="mt-2 text-xs text-gray-500">The time uses your browser's local timezone. After expiration, this account will not participate in automatic account selection.</p>
|
|
98
|
-
<div class="mt-6 flex justify-between gap-2">
|
|
99
|
-
<button class="btn btn-ghost btn-sm text-gray-400 hover:text-white" @click="clearAccountExpiration()" :disabled="accountExpirationSaving || !expirationTarget?.accountExpiresAt">Clear Expiration</button>
|
|
100
|
-
<div class="flex gap-2">
|
|
101
|
-
<button class="btn btn-outline btn-sm text-gray-400" @click="closeAccountExpirationModal()">Cancel</button>
|
|
102
|
-
<button class="btn bg-neon-purple hover:bg-purple-600 border-none text-white btn-sm" @click="saveAccountExpiration()" :disabled="accountExpirationSaving || !accountExpirationInput" x-text="accountExpirationSaving ? 'Saving...' : 'Save'"></button>
|
|
103
|
-
</div>
|
|
104
|
-
</div>
|
|
105
|
-
</div>
|
|
106
|
-
</div>
|
|
107
|
-
|
|
108
|
-
<div x-show="showDeleteModal" x-transition class="fixed inset-0 z-50 flex items-center justify-center p-4" style="display: none;">
|
|
109
|
-
<div class="absolute inset-0 bg-black/70 backdrop-blur-sm" @click="showDeleteModal = false"></div>
|
|
110
|
-
<div class="relative bg-space-900 border-2 border-red-500/50 rounded-xl shadow-2xl max-w-md w-full p-6">
|
|
111
|
-
<h3 class="font-bold text-lg text-red-400 flex items-center gap-2 mb-4">
|
|
112
|
-
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
113
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 9v2m0 4h.01m-6.938 4h13.856c1.54 0 2.502-1.667 1.732-3L13.732 4c-.77-1.333-2.694-1.333-3.464 0L3.34 16c-.77 1.333.192 3 1.732 3z" />
|
|
114
|
-
</svg>
|
|
115
|
-
<span>Delete Account</span>
|
|
116
|
-
</h3>
|
|
117
|
-
<p class="text-gray-300 mb-4">Are you sure you want to delete <strong class="text-white font-mono" x-text="deleteTarget"></strong>?</p>
|
|
118
|
-
<div class="bg-red-500/10 border border-red-500/30 rounded p-3 mb-4">
|
|
119
|
-
<p class="text-sm text-red-300">This action cannot be undone. All configuration will be permanently deleted.</p>
|
|
120
|
-
</div>
|
|
121
|
-
<div class="flex justify-end gap-2">
|
|
122
|
-
<button class="btn btn-outline btn-sm text-gray-400" @click="showDeleteModal = false">Cancel</button>
|
|
123
|
-
<button class="btn bg-red-500 hover:bg-red-600 border-none text-white btn-sm" @click="executeDelete()">
|
|
124
|
-
Delete
|
|
125
|
-
</button>
|
|
126
|
-
</div>
|
|
127
|
-
</div>
|
|
128
|
-
</div>
|
|
129
|
-
|
|
130
|
-
<div x-show="showQuotaModalView" x-transition class="fixed inset-0 z-50 flex items-center justify-center p-4" style="display: none;">
|
|
131
|
-
<div class="absolute inset-0 bg-black/70 backdrop-blur-sm" @click="showQuotaModalView = false"></div>
|
|
132
|
-
<div class="relative bg-space-900 border border-space-border rounded-xl shadow-2xl max-w-lg w-full p-6">
|
|
133
|
-
<h3 class="font-bold text-lg text-white mb-2 flex items-center gap-2">
|
|
134
|
-
<svg class="w-6 h-6 text-neon-cyan" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
135
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 19v-6a2 2 0 00-2-2H5a2 2 0 00-2 2v6a2 2 0 002 2h2a2 2 0 002-2zm0 0V9a2 2 0 012-2h2a2 2 0 012 2v10m-6 0a2 2 0 002 2h2a2 2 0 002-2m0 0V5a2 2 0 012-2h2a2 2 0 012 2v14a2 2 0 01-2 2h-2a2 2 0 01-2-2z" />
|
|
136
|
-
</svg>
|
|
137
|
-
<span>Quota Distribution</span>
|
|
138
|
-
</h3>
|
|
139
|
-
<p class="text-sm text-gray-500 font-mono mb-4" x-text="selectedAccount?.email"></p>
|
|
140
|
-
|
|
141
|
-
<div class="space-y-3 max-h-[60vh] overflow-y-auto" x-show="getRemainingPercentage(selectedAccount) !== null">
|
|
142
|
-
<div class="p-3 bg-space-800/50 border border-space-border/30 rounded-lg">
|
|
143
|
-
<div class="flex justify-between items-center mb-2">
|
|
144
|
-
<span class="text-sm font-semibold text-gray-200">Usage</span>
|
|
145
|
-
<template x-if="!isQuotaExhausted(selectedAccount)">
|
|
146
|
-
<span class="text-xs font-mono"
|
|
147
|
-
:class="quotaTextClass(selectedAccount)"
|
|
148
|
-
x-text="quotaLabel(selectedAccount) + ' remaining'"></span>
|
|
149
|
-
</template>
|
|
150
|
-
<template x-if="isQuotaExhausted(selectedAccount)">
|
|
151
|
-
<span class="text-[10px] font-bold uppercase text-red-400 bg-red-500/10 px-2 py-0.5 rounded border border-red-500/30">QUOTA EXHAUSTED</span>
|
|
152
|
-
</template>
|
|
153
|
-
</div>
|
|
154
|
-
<div class="w-full bg-gray-700 rounded-full h-3 overflow-hidden">
|
|
155
|
-
<div class="h-full rounded-full transition-all"
|
|
156
|
-
:class="quotaBarClass(selectedAccount)"
|
|
157
|
-
:style="`width: ${getRemainingPercentage(selectedAccount)}%`"></div>
|
|
158
|
-
</div>
|
|
159
|
-
<div class="mt-3 pt-3 border-t border-space-border/30 space-y-1">
|
|
160
|
-
<div class="flex items-center justify-between text-xs">
|
|
161
|
-
<span class="text-gray-500">Reset window</span>
|
|
162
|
-
<span class="font-mono text-gray-300" x-text="quotaResetSummary(selectedAccount) || '-'"></span>
|
|
163
|
-
</div>
|
|
164
|
-
<template x-if="quotaResetAtLabel(selectedAccount)">
|
|
165
|
-
<div class="flex items-center justify-between text-xs">
|
|
166
|
-
<span class="text-gray-500">Resets at</span>
|
|
167
|
-
<span class="font-mono text-gray-300" x-text="quotaResetAtLabel(selectedAccount)"></span>
|
|
168
|
-
</div>
|
|
169
|
-
</template>
|
|
170
|
-
</div>
|
|
171
|
-
</div>
|
|
172
|
-
</div>
|
|
173
|
-
|
|
174
|
-
<div class="mt-4 p-3 bg-space-800/50 border border-space-border/30 rounded-lg">
|
|
175
|
-
<div class="flex items-center justify-between gap-3 mb-2">
|
|
176
|
-
<div>
|
|
177
|
-
<h4 class="text-sm font-semibold text-gray-200">Rate-limit reset credits</h4>
|
|
178
|
-
<p class="text-xs text-gray-500">Redeeming a credit resets this account's upstream quota.</p>
|
|
179
|
-
</div>
|
|
180
|
-
<button class="btn btn-xs btn-outline text-gray-400" @click="loadRateLimitResetCredits(selectedAccount.email)" :disabled="resetCreditsLoading || resetCreditsRedeeming">Refresh</button>
|
|
181
|
-
</div>
|
|
182
|
-
<template x-if="resetCreditsLoading">
|
|
183
|
-
<p class="text-xs text-gray-500">Loading reset credits...</p>
|
|
184
|
-
</template>
|
|
185
|
-
<template x-if="!resetCreditsLoading && !availableRateLimitResetCredits().length">
|
|
186
|
-
<p class="text-xs text-gray-500">No available reset credits.</p>
|
|
187
|
-
</template>
|
|
188
|
-
<template x-if="!resetCreditsLoading && availableRateLimitResetCredits().length">
|
|
189
|
-
<div class="space-y-2">
|
|
190
|
-
<template x-for="credit in availableRateLimitResetCredits()" :key="credit.id">
|
|
191
|
-
<div class="flex items-center justify-between gap-4 rounded-lg border border-space-border/30 bg-space-900/40 p-3">
|
|
192
|
-
<div class="min-w-0 flex-1">
|
|
193
|
-
<div class="flex items-center gap-2">
|
|
194
|
-
<span class="truncate text-sm font-semibold text-gray-200" x-text="credit.title || 'Full reset'"></span>
|
|
195
|
-
<span class="shrink-0 rounded border border-neon-green/30 bg-neon-green/10 px-1.5 py-0.5 text-[9px] font-bold uppercase text-neon-green">Available</span>
|
|
196
|
-
</div>
|
|
197
|
-
<p class="mt-1 truncate text-xs text-gray-500" x-text="credit.description || credit.id"></p>
|
|
198
|
-
<div class="mt-2 flex items-center gap-1.5 text-[10px] text-gray-500">
|
|
199
|
-
<svg class="h-3 w-3 shrink-0" fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 8v4l3 2m6-2a9 9 0 11-18 0 9 9 0 0118 0z"/></svg>
|
|
200
|
-
<span>Expires</span>
|
|
201
|
-
<span class="font-mono text-gray-400" x-text="resetCreditExpiryLabel(credit)"></span>
|
|
202
|
-
</div>
|
|
203
|
-
</div>
|
|
204
|
-
<button class="btn btn-xs shrink-0 bg-neon-purple hover:bg-purple-600 border-none text-white" @click="redeemRateLimitResetCredit(credit.id)" :disabled="resetCreditsRedeeming" x-text="resetCreditsRedeeming ? 'Resetting...' : 'Reset quota'"></button>
|
|
205
|
-
</div>
|
|
206
|
-
</template>
|
|
207
|
-
</div>
|
|
208
|
-
</template>
|
|
209
|
-
</div>
|
|
210
|
-
|
|
211
|
-
<div class="mt-6 flex justify-end">
|
|
212
|
-
<button class="btn btn-outline btn-sm text-gray-400" @click="showQuotaModalView = false">Close</button>
|
|
213
|
-
</div>
|
|
214
|
-
</div>
|
|
215
|
-
</div>
|
|
@@ -1,202 +0,0 @@
|
|
|
1
|
-
<div x-show="activeTab === 'accounts'" x-transition class="view-container">
|
|
2
|
-
<div class="flex items-center justify-between gap-4 mb-6">
|
|
3
|
-
<div class="flex flex-wrap items-center gap-4">
|
|
4
|
-
<h1 class="text-2xl font-bold text-white tracking-tight">Account Management</h1>
|
|
5
|
-
<div class="flex items-center h-6 px-3 rounded-full bg-space-800/80 border border-space-border/50 shadow-sm backdrop-blur-sm">
|
|
6
|
-
<span class="text-[10px] font-mono text-gray-400 uppercase tracking-wider">Manage ChatGPT accounts</span>
|
|
7
|
-
</div>
|
|
8
|
-
</div>
|
|
9
|
-
|
|
10
|
-
<div class="flex flex-wrap items-center justify-end gap-2 sm:flex-nowrap">
|
|
11
|
-
<div class="relative" x-show="accounts.length > 0">
|
|
12
|
-
<input type="text" x-model="searchQuery" placeholder="Search accounts..."
|
|
13
|
-
class="input-search-sm w-48 pl-9 h-8" @keydown.escape="searchQuery = ''">
|
|
14
|
-
<svg class="w-4 h-4 absolute left-3 top-2 text-gray-500" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
15
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
|
16
|
-
</svg>
|
|
17
|
-
</div>
|
|
18
|
-
|
|
19
|
-
<button class="btn btn-xs btn-outline border-space-border text-gray-400 hover:text-white transition-all gap-2 h-8"
|
|
20
|
-
@click="refreshAllTokens()" x-show="accounts.length > 0">
|
|
21
|
-
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
22
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 7a2 2 0 012 2m4 0a6 6 0 01-7.743 5.743L11 17H9v2H7v2H4a1 1 0 01-1-1v-2.586a1 1 0 01.293-.707l5.964-5.964A6 6 0 1121 9z"></path>
|
|
23
|
-
</svg>
|
|
24
|
-
<span>Refresh All</span>
|
|
25
|
-
</button>
|
|
26
|
-
|
|
27
|
-
<div class="flex items-center h-6 px-2 rounded bg-space-800/80 border border-space-border/50 sm:ml-1">
|
|
28
|
-
<span class="text-[11px] font-mono text-gray-400" x-text="accounts.length + ' accounts'"></span>
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<button class="btn bg-neon-purple hover:bg-purple-600 border-none text-white btn-xs gap-2 shadow-lg shadow-neon-purple/20 h-8"
|
|
32
|
-
@click="showAddModal = true">
|
|
33
|
-
<svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
34
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
|
|
35
|
-
</svg>
|
|
36
|
-
<span>Add Account</span>
|
|
37
|
-
</button>
|
|
38
|
-
</div>
|
|
39
|
-
</div>
|
|
40
|
-
|
|
41
|
-
<div class="view-card !p-0 overflow-x-auto">
|
|
42
|
-
<table class="w-full min-w-[980px]">
|
|
43
|
-
<thead x-show="filteredAccounts.length > 0">
|
|
44
|
-
<tr class="bg-space-900/50 border-b border-space-border/50">
|
|
45
|
-
<th class="py-3 text-left text-[10px] font-bold text-gray-500 uppercase tracking-wider w-20">Status</th>
|
|
46
|
-
<th class="w-56 py-3 text-center text-[10px] font-bold text-gray-500 uppercase tracking-wider">Account (Email)</th>
|
|
47
|
-
<th class="py-3 text-left text-[10px] font-bold text-gray-500 uppercase tracking-wider w-20">Plan</th>
|
|
48
|
-
<th class="py-3 text-left text-[10px] font-bold text-gray-500 uppercase tracking-wider w-32">Token</th>
|
|
49
|
-
<th class="py-3 text-left text-[10px] font-bold text-gray-500 uppercase tracking-wider w-24">Quota</th>
|
|
50
|
-
<th class="w-52 min-w-[13rem] py-3 text-center text-[10px] font-bold text-gray-500 uppercase tracking-wider">Account Expiry</th>
|
|
51
|
-
<th class="py-3 pr-6 text-right text-[10px] font-bold text-gray-500 uppercase tracking-wider w-40">Operations</th>
|
|
52
|
-
</tr>
|
|
53
|
-
</thead>
|
|
54
|
-
<tbody>
|
|
55
|
-
<template x-if="filteredAccounts.length === 0 && accounts.length === 0">
|
|
56
|
-
<tr>
|
|
57
|
-
<td colspan="7" class="py-16 text-center flex justify-center">
|
|
58
|
-
<div class="flex flex-col items-center gap-4 max-w-lg mx-auto">
|
|
59
|
-
<svg class="w-20 h-20 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
60
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="1.5" d="M17 20h5v-2a3 3 0 00-5.356-1.857M17 20H7m10 0v-2c0-.656-.126-1.283-.356-1.857M7 20H2v-2a3 3 0 015.356-1.857M7 20v-2c0-.656.126-1.283.356-1.857m0 0a5.002 5.002 0 019.288 0M15 7a3 3 0 11-6 0 3 3 0 016 0zm6 3a2 2 0 11-4 0 2 2 0 014 0zM7 10a2 2 0 11-4 0 2 2 0 014 0z" />
|
|
61
|
-
</svg>
|
|
62
|
-
<h3 class="text-xl font-semibold text-gray-400">No Accounts Yet</h3>
|
|
63
|
-
<p class="text-sm text-gray-600 max-w-md leading-relaxed">Get started by adding a ChatGPT account via OAuth, or import from the Codex app.</p>
|
|
64
|
-
<div class="flex items-center gap-4 mt-2">
|
|
65
|
-
<button class="btn bg-neon-purple hover:bg-purple-600 border-none text-white btn-sm gap-2 shadow-lg shadow-neon-purple/20"
|
|
66
|
-
@click="showAddModal = true">
|
|
67
|
-
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
68
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />
|
|
69
|
-
</svg>
|
|
70
|
-
<span>Add Your First Account</span>
|
|
71
|
-
</button>
|
|
72
|
-
<span class="text-xs text-gray-600">or</span>
|
|
73
|
-
<button class="btn btn-outline btn-sm text-gray-400" @click="importFromCodex()">
|
|
74
|
-
Import from Codex
|
|
75
|
-
</button>
|
|
76
|
-
</div>
|
|
77
|
-
</div>
|
|
78
|
-
</td>
|
|
79
|
-
</tr>
|
|
80
|
-
</template>
|
|
81
|
-
|
|
82
|
-
<template x-for="acc in filteredAccounts" :key="acc.email">
|
|
83
|
-
<tr class="border-b border-space-border/30 last:border-0 hover:bg-white/5 transition-colors group">
|
|
84
|
-
<td class="py-4 pl-6">
|
|
85
|
-
<div class="flex items-center gap-2">
|
|
86
|
-
<div class="w-2 h-2 rounded-full flex-shrink-0"
|
|
87
|
-
:class="acc.accountExpired ? 'bg-red-500' : acc.isActive ? 'bg-neon-green shadow-[0_0_8px_rgba(34,197,94,0.6)] animate-pulse' : 'bg-gray-500'">
|
|
88
|
-
</div>
|
|
89
|
-
<span class="text-xs font-mono font-semibold"
|
|
90
|
-
:class="acc.accountExpired ? 'text-red-400' : acc.isActive ? 'text-neon-green' : 'text-gray-500'"
|
|
91
|
-
x-text="acc.accountExpired ? 'EXPIRED' : acc.isActive ? 'ACTIVE' : 'IDLE'">
|
|
92
|
-
</span>
|
|
93
|
-
</div>
|
|
94
|
-
</td>
|
|
95
|
-
<td class="w-56 max-w-56 py-4 text-center">
|
|
96
|
-
<span class="inline-block max-w-[13rem] truncate font-mono text-sm text-gray-300 transition-colors group-hover:text-white"
|
|
97
|
-
x-text="acc.email"></span>
|
|
98
|
-
</td>
|
|
99
|
-
<td class="py-4">
|
|
100
|
-
<span class="text-[10px] font-bold uppercase px-2 py-1 rounded"
|
|
101
|
-
:class="{
|
|
102
|
-
'bg-yellow-500/10 text-yellow-400 border border-yellow-500/30': acc.planType === 'plus',
|
|
103
|
-
'bg-blue-500/10 text-blue-400 border border-blue-500/30': acc.planType === 'pro',
|
|
104
|
-
'bg-gray-500/10 text-gray-400 border border-gray-500/30': acc.planType === 'free'
|
|
105
|
-
}"
|
|
106
|
-
x-text="(acc.planType || 'free').toUpperCase()"></span>
|
|
107
|
-
</td>
|
|
108
|
-
<td class="py-4">
|
|
109
|
-
<div class="flex items-center gap-2">
|
|
110
|
-
<span class="text-xs font-mono"
|
|
111
|
-
:class="acc.tokenExpired ? 'text-red-400' : 'text-neon-green'"
|
|
112
|
-
x-text="acc.tokenExpired ? 'Expired' : 'Valid'"></span>
|
|
113
|
-
<button class="btn btn-xs btn-ghost p-2 rounded hover:bg-white/10 text-gray-500 hover:text-white transition-colors"
|
|
114
|
-
@click="refreshToken(acc.email)"
|
|
115
|
-
:disabled="refreshingTokenEmails.includes(acc.email)" title="Refresh token">
|
|
116
|
-
<svg class="w-4 h-4" :class="{'animate-spin': refreshingTokenEmails.includes(acc.email)}" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
117
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15" />
|
|
118
|
-
</svg>
|
|
119
|
-
</button>
|
|
120
|
-
</div>
|
|
121
|
-
</td>
|
|
122
|
-
<td class="py-4 cursor-pointer" @click="showQuotaModal(acc)">
|
|
123
|
-
<template x-if="getRemainingPercentage(acc) !== null">
|
|
124
|
-
<div class="flex flex-col gap-1">
|
|
125
|
-
<div class="flex items-center gap-2">
|
|
126
|
-
<div class="w-16 bg-gray-700 rounded-full h-2 overflow-hidden">
|
|
127
|
-
<div class="h-full rounded-full transition-all"
|
|
128
|
-
:class="quotaBarClass(acc)"
|
|
129
|
-
:style="`width: ${getRemainingPercentage(acc)}%`">
|
|
130
|
-
</div>
|
|
131
|
-
</div>
|
|
132
|
-
<template x-if="isQuotaExhausted(acc)">
|
|
133
|
-
<span class="text-[10px] font-bold uppercase text-red-400 bg-red-500/10 px-1.5 py-0.5 rounded border border-red-500/30">USED</span>
|
|
134
|
-
</template>
|
|
135
|
-
<template x-if="!isQuotaExhausted(acc)">
|
|
136
|
-
<span class="text-xs font-mono"
|
|
137
|
-
:class="quotaTextClass(acc)"
|
|
138
|
-
x-text="quotaLabel(acc)"></span>
|
|
139
|
-
</template>
|
|
140
|
-
</div>
|
|
141
|
-
<template x-if="quotaResetSummary(acc)">
|
|
142
|
-
<span class="text-[10px] font-mono text-gray-500" x-text="quotaResetSummary(acc)"></span>
|
|
143
|
-
</template>
|
|
144
|
-
</div>
|
|
145
|
-
</template>
|
|
146
|
-
<template x-if="getRemainingPercentage(acc) === null">
|
|
147
|
-
<span class="text-xs text-gray-600">-</span>
|
|
148
|
-
</template>
|
|
149
|
-
</td>
|
|
150
|
-
<td class="w-52 min-w-[13rem] py-4 text-center">
|
|
151
|
-
<div class="inline-flex items-center justify-center gap-1">
|
|
152
|
-
<div>
|
|
153
|
-
<span class="block whitespace-nowrap text-xs font-mono"
|
|
154
|
-
:class="acc.accountExpired ? 'text-red-400' : acc.accountExpiresAt ? 'text-gray-300' : 'text-gray-500'"
|
|
155
|
-
x-text="accountExpirationLabel(acc)"></span>
|
|
156
|
-
<span class="mt-1 block text-[10px]"
|
|
157
|
-
:class="acc.accountExpired ? 'text-red-500/70' : 'text-gray-600'"
|
|
158
|
-
x-text="acc.accountExpired ? 'Expired' : acc.accountExpiresAt ? 'Local time' : 'Not set'"></span>
|
|
159
|
-
</div>
|
|
160
|
-
<button class="btn btn-xs btn-ghost shrink-0 rounded p-1.5 text-gray-600 transition-colors hover:bg-white/10 hover:text-neon-cyan"
|
|
161
|
-
@click="showAccountExpirationModal(acc)" title="Configure account expiration">
|
|
162
|
-
<svg class="h-3.5 w-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
163
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15.232 5.232l3.536 3.536M9 11l6.232-6.232a2.5 2.5 0 013.536 3.536L12.536 14.536 9 15l.464-3.536zM5 19h14" />
|
|
164
|
-
</svg>
|
|
165
|
-
</button>
|
|
166
|
-
</div>
|
|
167
|
-
</td>
|
|
168
|
-
<td class="py-4 pr-6">
|
|
169
|
-
<div class="flex justify-end gap-2">
|
|
170
|
-
<button x-show="!acc.isActive && !acc.accountExpired"
|
|
171
|
-
class="cursor-pointer px-3 py-1 text-[10px] font-bold font-mono uppercase tracking-wider rounded bg-neon-purple/10 text-neon-purple hover:bg-neon-purple/20 border border-neon-purple/30 hover:border-neon-purple/50 transition-all"
|
|
172
|
-
@click="switchAccount(acc.email)">
|
|
173
|
-
SWITCH
|
|
174
|
-
</button>
|
|
175
|
-
<button class="btn btn-xs btn-ghost p-2 rounded hover:bg-red-500/10 text-gray-500 hover:text-red-400 transition-colors"
|
|
176
|
-
@click="confirmDelete(acc.email)" title="Delete account">
|
|
177
|
-
<svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
178
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 7l-.867 12.142A2 2 0 0116.138 21H7.862a2 2 0 01-1.995-1.858L5 7m5 4v6m4-6v6m1-10V4a1 1 0 00-1-1h-4a1 1 0 00-1 1v3M4 7h16" />
|
|
179
|
-
</svg>
|
|
180
|
-
</button>
|
|
181
|
-
</div>
|
|
182
|
-
</td>
|
|
183
|
-
</tr>
|
|
184
|
-
</template>
|
|
185
|
-
|
|
186
|
-
<template x-if="accounts.length > 0 && filteredAccounts.length === 0">
|
|
187
|
-
<tr>
|
|
188
|
-
<td colspan="7" class="py-12 text-center">
|
|
189
|
-
<div class="flex flex-col items-center gap-3">
|
|
190
|
-
<svg class="w-12 h-12 text-gray-700" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
191
|
-
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M21 21l-6-6m2-5a7 7 0 11-14 0 7 7 0 0114 0z" />
|
|
192
|
-
</svg>
|
|
193
|
-
<p class="text-sm text-gray-600">No accounts match your search</p>
|
|
194
|
-
<button class="text-xs text-neon-cyan hover:underline" @click="searchQuery = ''">Clear Search</button>
|
|
195
|
-
</div>
|
|
196
|
-
</td>
|
|
197
|
-
</tr>
|
|
198
|
-
</template>
|
|
199
|
-
</tbody>
|
|
200
|
-
</table>
|
|
201
|
-
</div>
|
|
202
|
-
</div>
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
<div x-show="showCreateClientApiKeyModal" x-transition class="fixed inset-0 z-50 flex items-center justify-center p-4" style="display: none;" @keydown.escape.window="showCreateClientApiKeyModal = false">
|
|
2
|
-
<div class="absolute inset-0 bg-black/70 backdrop-blur-sm" @click="showCreateClientApiKeyModal = false"></div>
|
|
3
|
-
<div class="relative bg-space-900 border border-space-border rounded-xl shadow-2xl max-w-md w-full p-6">
|
|
4
|
-
<h3 class="font-bold text-lg text-white mb-2">New Client API Key</h3>
|
|
5
|
-
<p class="text-sm text-gray-400 mb-5">The key is shown once after creation. Copy it before closing the result.</p>
|
|
6
|
-
<div class="space-y-4">
|
|
7
|
-
<label class="block">
|
|
8
|
-
<span class="block text-xs text-gray-400 mb-2">Name</span>
|
|
9
|
-
<input type="text" x-model="clientApiKeyName" placeholder="e.g. Development workstation"
|
|
10
|
-
class="input w-full bg-space-800 border-space-border text-white font-mono text-sm" @keydown.enter="createClientApiKey()">
|
|
11
|
-
</label>
|
|
12
|
-
<label class="block">
|
|
13
|
-
<span class="block text-xs text-gray-400 mb-2">Remark</span>
|
|
14
|
-
<input type="text" x-model="clientApiKeyRemark" placeholder="Optional note"
|
|
15
|
-
class="input w-full bg-space-800 border-space-border text-white font-mono text-sm" @keydown.enter="createClientApiKey()">
|
|
16
|
-
</label>
|
|
17
|
-
<label class="block">
|
|
18
|
-
<span class="block text-xs text-gray-400 mb-2">Weekly limit (USD)</span>
|
|
19
|
-
<input type="number" min="0" step="0.01" x-model="clientApiKeyWeeklyLimitUsd"
|
|
20
|
-
class="input w-full bg-space-800 border-space-border text-white font-mono text-sm" @keydown.enter="createClientApiKey()">
|
|
21
|
-
</label>
|
|
22
|
-
</div>
|
|
23
|
-
<div class="mt-6 flex justify-end gap-2">
|
|
24
|
-
<button class="btn btn-outline btn-sm text-gray-400" @click="showCreateClientApiKeyModal = false" :disabled="clientApiKeySaving">Cancel</button>
|
|
25
|
-
<button class="btn btn-sm bg-neon-purple hover:bg-purple-600 border-none text-white" @click="createClientApiKey()" :disabled="clientApiKeySaving">
|
|
26
|
-
<span x-text="clientApiKeySaving ? 'Creating...' : 'Create Key'"></span>
|
|
27
|
-
</button>
|
|
28
|
-
</div>
|
|
29
|
-
</div>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div x-show="revealedClientApiKey" x-transition class="fixed inset-0 z-50 flex items-center justify-center p-4" style="display: none;" @keydown.escape.window="revealedClientApiKey = ''">
|
|
33
|
-
<div class="absolute inset-0 bg-black/70 backdrop-blur-sm" @click="revealedClientApiKey = ''"></div>
|
|
34
|
-
<div class="relative bg-space-900 border border-yellow-400/40 rounded-xl shadow-2xl max-w-xl w-full p-6">
|
|
35
|
-
<h3 class="font-bold text-lg text-yellow-300 mb-2">Client API Key Created</h3>
|
|
36
|
-
<p class="text-sm text-gray-400 mb-5">Copy this key now. It cannot be retrieved later.</p>
|
|
37
|
-
<code class="block break-all rounded-lg border border-space-border bg-space-800 p-3 text-sm text-white font-mono" x-text="revealedClientApiKey"></code>
|
|
38
|
-
<template x-if="clientProxyConfig">
|
|
39
|
-
<div class="mt-5 space-y-3">
|
|
40
|
-
<p class="text-xs font-semibold uppercase tracking-wider text-gray-400">Claude Code configuration</p>
|
|
41
|
-
<div class="rounded-lg border border-space-border bg-space-800 p-3 font-mono text-xs text-gray-300 space-y-2">
|
|
42
|
-
<div><span class="text-gray-500">ANTHROPIC_BASE_URL=</span><span class="break-all" x-text="clientProxyConfig.env.ANTHROPIC_BASE_URL"></span></div>
|
|
43
|
-
<div><span class="text-gray-500">ANTHROPIC_AUTH_TOKEN=</span><span class="break-all" x-text="revealedClientApiKey"></span></div>
|
|
44
|
-
<div><span class="text-gray-500">ANTHROPIC_API_KEY=</span><span class="break-all" x-text="revealedClientApiKey"></span></div>
|
|
45
|
-
</div>
|
|
46
|
-
<p class="text-xs text-gray-500" x-text="clientProxyConfig.message"></p>
|
|
47
|
-
<button class="btn btn-outline btn-sm text-gray-300" @click="copyClientProxyCommands()">Copy PowerShell Commands</button>
|
|
48
|
-
</div>
|
|
49
|
-
</template>
|
|
50
|
-
<div class="mt-6 flex justify-end gap-2">
|
|
51
|
-
<button class="btn btn-outline btn-sm text-gray-300" @click="copyClientApiKey()">Copy Key</button>
|
|
52
|
-
<button class="btn btn-sm bg-neon-purple hover:bg-purple-600 border-none text-white" @click="revealedClientApiKey = ''; clientProxyConfig = null">Done</button>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|