antigravity-claude-proxy 3.0.0 → 3.1.0

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.
Files changed (53) hide show
  1. package/bin/cli.js +4 -11
  2. package/package.json +1 -1
  3. package/public/app.js +7 -4
  4. package/public/css/src/input.css +379 -216
  5. package/public/css/style.css +1 -1
  6. package/public/favicon.svg +4 -8
  7. package/public/index.html +78 -72
  8. package/public/js/components/claude-config.js +0 -8
  9. package/public/js/components/dashboard/charts.js +25 -51
  10. package/public/js/components/dashboard/stats.js +1 -1
  11. package/public/js/components/dashboard.js +16 -21
  12. package/public/js/components/logs-viewer.js +1 -1
  13. package/public/js/components/models.js +12 -12
  14. package/public/js/components/server-config.js +1 -9
  15. package/public/js/data-store.js +2 -2
  16. package/public/js/store.js +1 -1
  17. package/public/js/translations/en.js +37 -39
  18. package/public/js/translations/id.js +36 -37
  19. package/public/js/translations/pt.js +37 -38
  20. package/public/js/translations/tr.js +37 -39
  21. package/public/js/translations/zh.js +0 -2
  22. package/public/js/utils/error-handler.js +0 -2
  23. package/public/js/utils/ui-logger.js +4 -3
  24. package/public/views/accounts.html +34 -38
  25. package/public/views/dashboard.html +86 -99
  26. package/public/views/logs.html +4 -4
  27. package/public/views/models.html +32 -36
  28. package/public/views/settings.html +50 -50
  29. package/src/account-manager/index.js +0 -4
  30. package/src/account-manager/rate-limits.js +0 -5
  31. package/src/account-manager/strategies/base-strategy.js +4 -4
  32. package/src/account-manager/strategies/hybrid-strategy.js +3 -3
  33. package/src/auth/database.js +1 -0
  34. package/src/auth/oauth.js +43 -41
  35. package/src/auth/token-extractor.js +1 -1
  36. package/src/cli/accounts.js +2 -1
  37. package/src/cloudcode/model-registry.js +0 -3
  38. package/src/cloudcode/rate-limit-state.js +1 -7
  39. package/src/config.js +1 -1
  40. package/src/constants.js +0 -2
  41. package/src/format/content-converter.js +0 -4
  42. package/src/format/request-converter.js +1 -6
  43. package/src/format/response-converter.js +0 -3
  44. package/src/format/schema-sanitizer.js +3 -22
  45. package/src/format/thinking-utils.js +1 -13
  46. package/src/index.js +1 -6
  47. package/src/modules/usage-stats.js +1 -1
  48. package/src/server.js +1 -28
  49. package/src/utils/claude-config.js +2 -6
  50. package/src/utils/native-module-helper.js +0 -4
  51. package/src/utils/proxy.js +1 -10
  52. package/src/utils/version-detector.js +14 -5
  53. package/src/webui/index.js +1 -37
@@ -1,17 +1,13 @@
1
1
  <div x-data="models" class="view-container">
2
2
  <!-- Compact Header -->
3
- <div class="flex items-center justify-between gap-4 mb-6">
4
- <!-- Title with inline subtitle -->
5
- <div class="flex flex-wrap items-center gap-4">
6
- <h1 class="text-2xl font-bold text-white tracking-tight" x-text="$store.global.t('models')">
3
+ <div class="flex items-end justify-between gap-4">
4
+ <div class="flex flex-col gap-1">
5
+ <h1 class="font-display text-[1.5rem] leading-tight font-bold text-white tracking-[-0.01em]" x-text="$store.global.t('models')">
7
6
  Models
8
7
  </h1>
9
- <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">
10
- <span class="text-[10px] font-mono text-gray-400 uppercase tracking-wider"
11
- x-text="$store.global.t('modelsPageDesc')">
12
- Real-time quota and status for all available models.
13
- </span>
14
- </div>
8
+ <p class="text-sm text-gray-500" x-text="$store.global.t('modelsPageDesc')">
9
+ Real-time quota and status for all available models.
10
+ </p>
15
11
  </div>
16
12
 
17
13
  <!-- Search Bar -->
@@ -65,23 +61,23 @@
65
61
  <!-- Filter Buttons -->
66
62
  <div class="join h-9 w-full md:w-auto overflow-x-auto">
67
63
  <button
68
- class="join-item btn btn-xs h-full flex-1 md:flex-none px-6 border-space-border/50 bg-space-800 transition-all font-medium text-[10px] tracking-wide"
64
+ class="join-item btn btn-xs h-full flex-1 md:flex-none px-6 border-space-border/50 bg-space-800 transition-colors font-medium text-xs"
69
65
  :class="$store.data.filters.family === 'all'
70
- ? 'bg-neon-purple/20 text-neon-purple border-neon-purple/60 shadow-lg shadow-neon-purple/10'
66
+ ? 'bg-neon-purple/15 text-neon-purple border-neon-purple/50'
71
67
  : 'text-gray-400 hover:text-white hover:bg-space-700 hover:border-space-border'"
72
68
  @click="$store.data.filters.family = 'all'; $store.data.computeQuotaRows()"
73
69
  x-text="$store.global.t('allCaps')">ALL</button>
74
70
  <button
75
- class="join-item btn btn-xs h-full flex-1 md:flex-none px-6 border-space-border/50 bg-space-800 transition-all font-medium text-[10px] tracking-wide"
71
+ class="join-item btn btn-xs h-full flex-1 md:flex-none px-6 border-space-border/50 bg-space-800 transition-colors font-medium text-xs"
76
72
  :class="$store.data.filters.family === 'claude'
77
- ? 'bg-neon-purple/20 text-neon-purple border-neon-purple/60 shadow-lg shadow-neon-purple/10'
73
+ ? 'bg-neon-purple/15 text-neon-purple border-neon-purple/50'
78
74
  : 'text-gray-400 hover:text-white hover:bg-space-700 hover:border-space-border'"
79
75
  @click="$store.data.filters.family = 'claude'; $store.data.computeQuotaRows()"
80
76
  x-text="$store.global.t('claudeCaps')">CLAUDE</button>
81
77
  <button
82
- class="join-item btn btn-xs h-full flex-1 md:flex-none px-6 border-space-border/50 bg-space-800 transition-all font-medium text-[10px] tracking-wide"
78
+ class="join-item btn btn-xs h-full flex-1 md:flex-none px-6 border-space-border/50 bg-space-800 transition-colors font-medium text-xs"
83
79
  :class="$store.data.filters.family === 'gemini'
84
- ? 'bg-neon-green/20 text-neon-green border-neon-green/60 shadow-lg shadow-neon-green/10'
80
+ ? 'bg-neon-green/15 text-neon-green border-neon-green/50'
85
81
  : 'text-gray-400 hover:text-white hover:bg-space-700 hover:border-space-border'"
86
82
  @click="$store.data.filters.family = 'gemini'; $store.data.computeQuotaRows()"
87
83
  x-text="$store.global.t('geminiCaps')">GEMINI</button>
@@ -96,7 +92,7 @@
96
92
  <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
97
93
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13.875 18.825A10.05 10.05 0 0112 19c-4.478 0-8.268-2.943-9.543-7a9.97 9.97 0 011.563-3.029m5.858.908a3 3 0 114.243 4.243M9.878 9.878l4.242 4.242M9.88 9.88l-3.29-3.29m7.532 7.532l3.29 3.29M3 3l3.59 3.59m0 0A9.953 9.953 0 0112 5c4.478 0 8.268 2.943 9.543 7a10.025 10.025 0 01-4.132 5.411m0 0L21 21" />
98
94
  </svg>
99
- <span class="text-[10px] font-medium uppercase tracking-wide" x-text="$store.settings.showHiddenModels ? $store.global.t('hiddenOn') : $store.global.t('hiddenOff')"></span>
95
+ <span class="text-[11px] font-medium" x-text="$store.settings.showHiddenModels ? $store.global.t('hiddenOn') : $store.global.t('hiddenOff')"></span>
100
96
  </button>
101
97
 
102
98
  <!-- Show All Accounts Toggle (only in detail mode) -->
@@ -108,7 +104,7 @@
108
104
  <svg xmlns="http://www.w3.org/2000/svg" class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor">
109
105
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" 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 0z" />
110
106
  </svg>
111
- <span class="text-[10px] font-medium uppercase tracking-wide" x-text="$store.settings.showAllAccounts ? 'All' : 'Capped'"></span>
107
+ <span class="text-[11px] font-medium capitalize" x-text="$store.settings.showAllAccounts ? 'All' : 'Capped'"></span>
112
108
  </button>
113
109
  </div>
114
110
  </div>
@@ -189,10 +185,10 @@
189
185
  </div>
190
186
  </td>
191
187
  <td>
192
- <div class="font-bold text-gray-200 group-hover:text-neon-purple transition-colors"
188
+ <div class="font-mono text-[13px] font-medium text-gray-100"
193
189
  :class="$store.settings.compact ? 'text-xs' : ''"
194
190
  x-text="row.modelId"></div>
195
- <div class="text-[10px] font-mono text-gray-500 uppercase"
191
+ <div class="text-[11px] text-gray-500"
196
192
  x-show="!$store.settings.compact"
197
193
  x-text="$store.global.t('family' + row.family.charAt(0).toUpperCase() + row.family.slice(1))">
198
194
  </div>
@@ -202,17 +198,17 @@
202
198
  :class="$store.settings.compact ? 'gap-0.5' : 'gap-1'">
203
199
  <div class="flex justify-between text-xs font-mono">
204
200
  <span class="flex items-center gap-1.5">
205
- <span x-text="row.avgQuota + '%'"
201
+ <span class="readout text-[13px] font-bold" x-text="row.avgQuota + '%'"
206
202
  :class="row.avgQuota > 0 ? 'text-white' : 'text-red-500'"></span>
207
203
  <!-- Threshold indicator (inline) -->
208
204
  <span x-show="row.effectiveThresholdPct > 0"
209
- class="text-[10px] text-gray-500"
205
+ class="text-[11px] text-gray-500"
210
206
  x-text="row.hasVariedThresholds && row.quotaInfo.some(q => q.thresholdPct > 0)
211
207
  ? '· min ' + Math.min(...row.quotaInfo.map(q => q.thresholdPct).filter(t => t > 0)) + '–' + row.effectiveThresholdPct + '%'
212
208
  : '· min ' + row.effectiveThresholdPct + '%'"></span>
213
209
  <!-- Inline reset time (compact only) -->
214
210
  <span x-show="$store.settings.compact && row.resetIn && row.resetIn !== '-'"
215
- class="text-[10px]"
211
+ class="text-[11px]"
216
212
  :class="row.resetIn.indexOf('h') === -1 ? 'text-neon-purple' : 'text-gray-500'"
217
213
  x-text="'· ' + row.resetIn"></span>
218
214
  </span>
@@ -229,7 +225,7 @@
229
225
  x-text="'+' + (row.quotaInfo.length - 8)"></span>
230
226
  </span>
231
227
  <!-- Available/Total Accounts Indicator -->
232
- <span class="text-gray-500 text-[10px]"
228
+ <span class="text-gray-500 text-[11px]"
233
229
  x-text="row.quotaInfo.filter(q => q.pct > 0).length + '/' + row.quotaInfo.length"></span>
234
230
  </span>
235
231
  </div>
@@ -270,30 +266,30 @@
270
266
  class="flex flex-col gap-1 mt-1 pt-1 border-t border-space-border/30">
271
267
  <template x-for="q in getVisibleAccounts(row)" :key="q.fullEmail + '-detail'">
272
268
  <div class="flex items-center gap-2">
273
- <span class="text-[10px] font-mono text-gray-500 w-20 truncate text-right flex-shrink-0"
269
+ <span class="text-[11px] font-mono text-gray-500 w-20 truncate text-right flex-shrink-0"
274
270
  x-text="Redact.email(q.email)"></span>
275
- <div class="flex-1 h-1 rounded-full bg-space-800 overflow-hidden">
276
- <div class="h-full rounded-full transition-all duration-500"
277
- :class="q.pct > 50 ? 'bg-neon-green/70' : (q.pct > 0 ? 'bg-yellow-500/70' : 'bg-red-500/50')"
271
+ <div class="flex-1 h-1 rounded-[1px] bg-space-800 overflow-hidden">
272
+ <div class="h-full rounded-[1px] transition-all duration-500"
273
+ :class="q.pct > 50 ? 'bg-neon-green/80' : (q.pct > 0 ? 'bg-neon-yellow/80' : 'bg-neon-red/60')"
278
274
  :style="'width: ' + q.pct + '%'"></div>
279
275
  </div>
280
- <span class="text-[10px] font-mono w-8 text-right flex-shrink-0"
276
+ <span class="text-[11px] font-mono w-8 text-right flex-shrink-0"
281
277
  :class="q.pct > 0 ? 'text-gray-400' : 'text-red-500/70'"
282
278
  x-text="q.pct + '%'"></span>
283
279
  <span x-show="q.resetTime"
284
- class="text-[9px] font-mono text-gray-600 w-12 text-right flex-shrink-0"
280
+ class="text-[10px] font-mono text-gray-600 w-16 text-right whitespace-nowrap flex-shrink-0"
285
281
  x-text="window.utils.formatTimeUntil(q.resetTime)"></span>
286
282
  </div>
287
283
  </template>
288
284
  <!-- "+N more" expand button -->
289
285
  <button x-show="getHiddenCount(row) > 0"
290
286
  @click="toggleExpanded(row.modelId)"
291
- class="text-[10px] font-mono text-neon-purple/70 hover:text-neon-purple transition-colors text-left pl-[88px] py-0.5 cursor-pointer"
287
+ class="text-[11px] font-mono text-neon-purple/70 hover:text-neon-purple transition-colors text-left pl-[88px] py-0.5 cursor-pointer"
292
288
  x-text="'+' + getHiddenCount(row) + ' more'"></button>
293
289
  <!-- "Show less" collapse button -->
294
290
  <button x-show="isExpanded(row.modelId) && !$store.settings.showAllAccounts && row.quotaInfo.length > window.AppConstants.LIMITS.ACCOUNT_BREAKDOWN_LIMIT"
295
291
  @click="toggleExpanded(row.modelId)"
296
- class="text-[10px] font-mono text-gray-500 hover:text-gray-300 transition-colors text-left pl-[88px] py-0.5 cursor-pointer">Show less</button>
292
+ class="text-[11px] font-mono text-gray-500 hover:text-gray-300 transition-colors text-left pl-[88px] py-0.5 cursor-pointer">Show less</button>
297
293
  </div>
298
294
  </div>
299
295
  </td>
@@ -301,12 +297,12 @@
301
297
  <div class="tooltip tooltip-left"
302
298
  :data-tip="row.quotaInfo && row.quotaInfo.length > 0 ? row.quotaInfo.filter(q => q.resetTime).map(q => Redact.email(q.email) + ': ' + q.resetTime).join('\n') : 'No reset data'">
303
299
  <span x-text="row.resetIn"
304
- :class="(row.resetIn && row.resetIn.indexOf('h') === -1 && row.resetIn !== '-') ? 'text-neon-purple font-bold' : 'text-gray-400'"></span>
300
+ :class="(row.resetIn && row.resetIn.indexOf('h') === -1 && row.resetIn !== '-') ? 'text-neon-cyan font-bold' : 'text-gray-400'"></span>
305
301
  </div>
306
302
  </td>
307
303
  <td x-show="!$store.settings.compact">
308
304
  <div class="flex items-center justify-start gap-3">
309
- <div class="text-[10px] font-mono text-gray-500 hidden xl:block text-left leading-tight opacity-70">
305
+ <div class="text-[11px] font-mono text-gray-500 hidden xl:block text-left leading-tight opacity-70">
310
306
  <div
311
307
  x-text="$store.global.t('activeCount', {count: row.quotaInfo?.filter(q => q.pct > 0).length || 0})">
312
308
  </div>
@@ -314,7 +310,7 @@
314
310
  <!-- Account Status Indicators -->
315
311
  <div class="flex flex-wrap gap-1 justify-start max-w-[200px]" x-data="{ maxVisible: 12 }">
316
312
  <template x-if="!row.quotaInfo || row.quotaInfo.length === 0">
317
- <div class="text-[10px] text-gray-600 italic" x-text="$store.global.t('noData')">No data</div>
313
+ <div class="text-[11px] text-gray-600 italic" x-text="$store.global.t('noData')">No data</div>
318
314
  </template>
319
315
  <template x-if="row.quotaInfo && row.quotaInfo.length > 0">
320
316
  <div class="flex flex-wrap gap-1 justify-start">
@@ -417,7 +413,7 @@
417
413
  <p class="text-sm text-gray-600 max-w-md leading-relaxed">
418
414
  No model data available. Add accounts to see available models and quota information.
419
415
  </p>
420
- <button class="btn bg-neon-purple hover:bg-purple-600 border-none text-white btn-sm gap-2 shadow-lg shadow-neon-purple/20"
416
+ <button class="btn bg-neon-purple hover:bg-[#7fdbe4] border-none text-space-950 btn-sm gap-2"
421
417
  @click="$store.global.activeTab = 'accounts'">
422
418
  <svg class="w-4 h-4" fill="none" stroke="currentColor" viewBox="0 0 24 24">
423
419
  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4" />