coding-proxy 0.5.2a4__py3-none-any.whl → 0.5.2a5__py3-none-any.whl

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.
@@ -12,26 +12,36 @@ from fastapi.responses import HTMLResponse, Response
12
12
  from ..logging.db import TimePeriod
13
13
 
14
14
  # ── 品牌图标:Tabler terminal-2 核心笔划(> 与 _),不含外框 ──────────────
15
- # 外框由「蓝紫渐变圆角方块」容器承载(favicon SVG 的 <rect> 与页面 .logo 的 CSS
16
- # 渐变),保留 Tabler 原始外框笔划会双重描边、边缘发糊,故仅取 > 与 _ 两条。
17
- # 作为单一事实源,同时供 favicon SVG(f-string)与页面 logo({{TERMINAL2}} 模板替换)消费。
15
+ # 容器为「淡色磨砂卡片」(#f5f6fb 浅底 + 品牌紫描边环),> 与 _ 笔划改用品牌渐变
16
+ # (#667eea -> #764ba2)——色彩反转:品牌紫由背景迁移至图标笔划,轮廓成为视觉主角,
17
+ # 更简约、小尺寸下更清晰(Linear/Vercel 风)。保留 Tabler 原始外框笔划会双重描边、
18
+ # 边缘发糊,故仅取 > 与 _ 两条。
19
+ # 单一事实源:_TERMINAL2_PATHS 与 _LOGO_DEFS 同时供 favicon SVG(f-string)与页面
20
+ # logo({{TERMINAL2}} / {{LOGO_DEFS}} 模板替换)消费。
21
+ _BRAND_FROM, _BRAND_TO = "#667eea", "#764ba2"
22
+ _LOGO_DEFS = (
23
+ '<defs><linearGradient id="cpBrand" x1="0" y1="0" x2="1" y2="1">'
24
+ f'<stop offset="0" stop-color="{_BRAND_FROM}"/>'
25
+ f'<stop offset="1" stop-color="{_BRAND_TO}"/>'
26
+ "</linearGradient></defs>"
27
+ )
18
28
  _TERMINAL2_PATHS = '<path d="M8 9l3 3l-3 3" /><path d="M13 15l3 0" />'
19
29
 
20
30
 
21
31
  # ── Favicon (SVG, 现代浏览器主选) ──────────────────────────────────────────
22
32
  def _build_favicon_svg() -> str:
23
- """生成 24×24 SVG favicon:品牌渐变圆角方块 + 白色 terminal-2 笔划.
33
+ """生成 24×24 SVG favicon:淡色磨砂卡片 + 品牌渐变 terminal-2 笔划.
24
34
 
25
- 独立 SVG 文档无 CSS 上下文,``currentColor`` 不可靠,故笔划硬编码 ``#ffffff``。
35
+ 容器为 ``#f5f6fb`` 浅底圆角方块 + 品牌紫描边环;``>`` 与 ``_`` 笔划由白色改为品牌
36
+ 渐变(``url(#cpBrand)``),使图标轮廓成为主角。独立 SVG 文档无 CSS 上下文,
37
+ ``currentColor`` 不可靠,故颜色硬编码;``<defs>`` 复用 ``_LOGO_DEFS`` 单一事实源。
26
38
  """
27
39
  return (
28
40
  '<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24">'
29
- '<defs><linearGradient id="g" x1="0" y1="0" x2="1" y2="1">'
30
- '<stop offset="0" stop-color="#667eea"/>'
31
- '<stop offset="1" stop-color="#764ba2"/>'
32
- "</linearGradient></defs>"
33
- '<rect x="1" y="1" width="22" height="22" rx="6" fill="url(#g)"/>'
34
- f'<g fill="none" stroke="#ffffff" stroke-width="2" '
41
+ f"{_LOGO_DEFS}"
42
+ '<rect x="1" y="1" width="22" height="22" rx="6" fill="#f5f6fb" '
43
+ 'stroke="#667eea" stroke-opacity=".18" stroke-width="1"/>'
44
+ f'<g fill="none" stroke="url(#cpBrand)" stroke-width="2" '
35
45
  f'stroke-linecap="round" stroke-linejoin="round">{_TERMINAL2_PATHS}</g>'
36
46
  "</svg>"
37
47
  )
@@ -39,11 +49,12 @@ def _build_favicon_svg() -> str:
39
49
 
40
50
  # ── Favicon (ICO, 32×32 光栅回退) ─────────────────────────────────────────
41
51
  def _build_favicon() -> bytes:
42
- """程序化生成 32×32 ICO:品牌渐变圆角方块 + 白色 terminal-2 笔划(旧浏览器/Safari 回退).
52
+ """程序化生成 32×32 ICO:淡色磨砂卡片 + 品牌渐变 terminal-2 笔划(旧浏览器/Safari 回退).
43
53
 
44
- 项目无 Pillow/cairosvg 等图像库,故以纯 Python 按像素光栅化:渐变圆角方块背景
45
- + 白色 ``>`` 折线与 ``_`` 下划线。沿用原实现「全零 AND-mask + per-pixel alpha」
46
- 的圆角透明方案(现代渲染器按 alpha 通道处理透明)。
54
+ 项目无 Pillow/cairosvg 等图像库,故以纯 Python 按像素光栅化:``#f5f6fb`` 浅底圆角
55
+ 方块 + 品牌渐变(#667eea -> #764ba2)``>`` 折线与 ``_`` 下划线。沿用原实现「全零
56
+ AND-mask + per-pixel alpha」的圆角透明方案(现代渲染器按 alpha 通道处理透明)。
57
+ 32px 下细描边环易锯齿,故 ICO 仅保留浅底 + 渐变笔划,精修外观由 SVG 承载。
47
58
  """
48
59
  import math
49
60
  import struct
@@ -52,8 +63,11 @@ def _build_favicon() -> bytes:
52
63
  radius = 8
53
64
  scale = width / 24.0 # SVG 24 单位 -> 像素
54
65
 
55
- r0, g0, b0 = 0x66, 0x7E, 0xEA # #667eea
56
- r1, g1, b1 = 0x76, 0x4B, 0xA2 # #764ba2
66
+ # 图标笔划品牌渐变:#667eea -> #764ba2(与 _LOGO_DEFS 同源)
67
+ r0, g0, b0 = 0x66, 0x7E, 0xEA
68
+ r1, g1, b1 = 0x76, 0x4B, 0xA2
69
+ # 容器底色:#f5f6fb(近白、极浅冷蓝紫)
70
+ tile_r, tile_g, tile_b = 0xF5, 0xF6, 0xFB
57
71
 
58
72
  def inside(x: int, y: int) -> bool:
59
73
  """满铺圆角方块(四角半径 radius)包含判定."""
@@ -68,30 +82,34 @@ def _build_favicon() -> bytes:
68
82
  [[0, 0, 0, 0] for _ in range(width)] for _ in range(height)
69
83
  ]
70
84
 
71
- # 1) 对角渐变圆角背景(左上 #667eea -> 右下 #764ba2)
85
+ # 1) 浅底圆角背景(扁平 #f5f6fb)
72
86
  for y in range(height):
73
87
  for x in range(width):
74
88
  if not inside(x, y):
75
89
  continue
76
- t = (x + y) / (width + height - 2)
77
- buf[y][x] = [
78
- int(b0 + (b1 - b0) * t),
79
- int(g0 + (g1 - g0) * t),
80
- int(r0 + (r1 - r0) * t),
81
- 255,
82
- ]
90
+ buf[y][x] = [tile_b, tile_g, tile_r, 255]
91
+
92
+ def brand_at(px: float, py: float) -> tuple[int, int, int]:
93
+ """按对角参数 t 返回 (px,py) 处的品牌渐变 RGB(与 SVG url(#cpBrand) 同向)."""
94
+ t = (px + py) / (width + height - 2)
95
+ return (
96
+ int(r0 + (r1 - r0) * t),
97
+ int(g0 + (g1 - g0) * t),
98
+ int(b0 + (b1 - b0) * t),
99
+ )
83
100
 
84
101
  def stamp(px: float, py: float) -> None:
85
- """以 (px, py) 为中心盖 ~3px 白色方块(笔划加粗,保证小尺寸可辨识)."""
102
+ """以 (px, py) 为中心盖 ~3px 品牌渐变方块(笔划加粗,保证小尺寸可辨识)."""
86
103
  ix, iy = int(round(px)), int(round(py))
104
+ cr, cg, cb = brand_at(px, py)
87
105
  for oy in (-1, 0, 1):
88
106
  for ox in (-1, 0, 1):
89
107
  nx, ny = ix + ox, iy + oy
90
108
  if 0 <= nx < width and 0 <= ny < height:
91
- buf[ny][nx] = [255, 255, 255, 255]
109
+ buf[ny][nx] = [cb, cg, cr, 255]
92
110
 
93
111
  def line(x0: float, y0: float, x1: float, y1: float) -> None:
94
- """稠密采样 + stamp 形成白色粗线段."""
112
+ """稠密采样 + stamp 形成品牌渐变粗线段."""
95
113
  dist = math.hypot(x1 - x0, y1 - y0)
96
114
  steps = max(1, int(dist * 3))
97
115
  for i in range(steps + 1):
@@ -204,10 +222,11 @@ _DASHBOARD_HTML = """<!DOCTYPE html>
204
222
  .header-left { display: flex; align-items: center; gap: 12px; }
205
223
  .logo {
206
224
  width: 32px; height: 32px;
207
- background: var(--gradient-primary);
225
+ background: #f5f6fb;
226
+ border: 1px solid rgba(102,126,234,.18);
208
227
  border-radius: 10px;
209
228
  display: flex; align-items: center; justify-content: center;
210
- box-shadow: 0 4px 12px rgba(102,126,234,.25);
229
+ box-shadow: 0 4px 12px rgba(102,126,234,.18);
211
230
  }
212
231
  .logo svg { width: 20px; height: 20px; display: block; }
213
232
  h1 { font-size: 18px; font-weight: 600; color: var(--text-primary); letter-spacing: -.3px; }
@@ -411,20 +430,17 @@ _DASHBOARD_HTML = """<!DOCTYPE html>
411
430
  height: 100%; border-radius: 2px;
412
431
  transition: width .6s cubic-bezier(.4,0,.2,1);
413
432
  }
414
- /* ── 供应商状态:拖拽排序 ── */
415
- .vendor-item[draggable="true"] { cursor: grab; }
416
- .vendor-item[draggable="true"]:active { cursor: grabbing; }
433
+ /* ── 供应商状态:拖拽排序(Pointer Events,手柄发起) ── */
417
434
  .vendor-item.dragging { opacity: .4; }
418
435
  .drag-handle {
419
436
  display: flex; align-items: center; flex-shrink: 0;
420
437
  color: var(--text-tertiary); font-size: 15px; line-height: 1;
421
- cursor: grab; user-select: none; padding: 0 2px;
438
+ cursor: grab; user-select: none; touch-action: none; padding: 0 2px;
422
439
  opacity: 0; transition: opacity .2s ease;
423
440
  }
441
+ .drag-handle:active { cursor: grabbing; }
424
442
  .vendor-item:hover .drag-handle { opacity: .55; }
425
443
  .drag-handle:hover { opacity: 1 !important; color: var(--text-secondary); }
426
- .vendor-item.drag-over-before { box-shadow: inset 0 2px 0 0 var(--accent-blue); }
427
- .vendor-item.drag-over-after { box-shadow: inset 0 -2px 0 0 var(--accent-blue); }
428
444
  /* ── 故障转移表 ── */
429
445
  .ft-table-wrap { overflow-x: auto; }
430
446
  table { width: 100%; border-collapse: collapse; }
@@ -799,7 +815,7 @@ _DASHBOARD_HTML = """<!DOCTYPE html>
799
815
  <body>
800
816
  <header>
801
817
  <div class="header-left">
802
- <div class="logo"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="#ffffff" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">{{TERMINAL2}}</svg></div>
818
+ <div class="logo"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="url(#cpBrand)" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">{{LOGO_DEFS}}{{TERMINAL2}}</svg></div>
803
819
  <h1>Coding Proxy Dashboard</h1>
804
820
  <span class="badge" id="version-badge">v-.-.-</span>
805
821
  </div>
@@ -1354,7 +1370,7 @@ function updateVendorStatus(status) {
1354
1370
  list.innerHTML = '<div class="empty"><div class="empty-icon">🔌</div>无供应商数据</div>';
1355
1371
  return;
1356
1372
  }
1357
- const draggable = tiers.length >= 2;
1373
+ const reorderable = tiers.length >= 2;
1358
1374
  list.innerHTML = tiers.map(tier => {
1359
1375
  const cb = tier.circuit_breaker || {};
1360
1376
  const cbClass = cbStateClass(cb.state);
@@ -1368,8 +1384,9 @@ function updateVendorStatus(status) {
1368
1384
  const rlInfo = tier.rate_limit || {};
1369
1385
  const rlHtml = rlInfo.limited ? `<span class="status-badge sb-warn">限速中</span>` : '';
1370
1386
 
1371
- const dragAttrs = ` data-vendor="${tier.name}"` + (draggable ? ` draggable="true"` : '');
1372
- const handle = draggable ? `<div class="drag-handle" title="拖拽调整优先级">⠿</div>` : '';
1387
+ // Pointer Events 重排:仅需 data-vendor 定位;手柄作为拖拽发起点(无原生 draggable)
1388
+ const dragAttrs = ` data-vendor="${tier.name}"`;
1389
+ const handle = reorderable ? `<div class="drag-handle" title="拖拽调整优先级">⠿</div>` : '';
1373
1390
 
1374
1391
  return `<div class="vendor-item"${dragAttrs}>
1375
1392
  <div class="vendor-info">
@@ -1386,76 +1403,111 @@ function updateVendorStatus(status) {
1386
1403
  }).join('');
1387
1404
  }
1388
1405
 
1389
- // ── 供应商状态:拖拽调整优先级(运行时重排,不重置配额) ────
1390
- const _tierDrag = { active: false, srcName: null, inFlight: false };
1406
+ // ── 供应商状态:拖拽调整优先级(Pointer Events 重排,运行时生效,不重置配额) ────
1407
+ // 采用 Pointer Events 而非原生 HTML5 DnD:后者触屏不支持、跨浏览器易「拿不起来」,
1408
+ // 是业界公认脆弱的重排序方案(故 SortableJS / dnd-kit 等均改用指针事件)。
1409
+ const _tierDrag = {
1410
+ active: false, // 已越过阈值、进入拖拽
1411
+ srcName: null, // 被拖拽 vendor 名
1412
+ srcEl: null, // 被拖拽行
1413
+ pointerId: null, // 捕获的指针 ID
1414
+ startY: 0, // pointerdown 起点 Y
1415
+ origOrder: null, // 拖拽开始时的顺序快照(无变化则跳过 PUT)
1416
+ inFlight: false, // PUT 未决
1417
+ };
1418
+ const _TIER_DRAG_THRESHOLD = 4; // px,越过才判定为拖拽(否则视作点击)
1419
+
1420
+ function _tierCurrentOrder(listEl) {
1421
+ return Array.from(listEl.querySelectorAll('.vendor-item'))
1422
+ .map(function(el) { return el.dataset.vendor; })
1423
+ .filter(Boolean);
1424
+ }
1391
1425
 
1392
- function _tierDragClearIndicators() {
1393
- document.querySelectorAll('#vendor-list .drag-over-before, #vendor-list .drag-over-after')
1394
- .forEach(function(el) { el.classList.remove('drag-over-before', 'drag-over-after'); });
1426
+ // 依据指针 Y 与各兄弟行中点比较,即时(乐观)重排 DOM
1427
+ function _tierDragMoveTo(listEl, clientY) {
1428
+ const dragged = _tierDrag.srcEl;
1429
+ if (!dragged) return;
1430
+ const siblings = Array.from(listEl.querySelectorAll('.vendor-item'))
1431
+ .filter(function(el) { return el !== dragged; });
1432
+ for (var i = 0; i < siblings.length; i++) {
1433
+ const rect = siblings[i].getBoundingClientRect();
1434
+ if (clientY < rect.top + rect.height / 2) {
1435
+ if (dragged !== siblings[i] && dragged.nextElementSibling !== siblings[i]) {
1436
+ listEl.insertBefore(dragged, siblings[i]);
1437
+ }
1438
+ return;
1439
+ }
1440
+ }
1441
+ if (listEl.lastElementChild !== dragged) listEl.appendChild(dragged); // 落到末尾
1395
1442
  }
1396
1443
 
1397
- function _tierDragPosition(item, clientY) {
1398
- // 鼠标相对目标行中点的位置 → 插入到上方或下方
1399
- const rect = item.getBoundingClientRect();
1400
- return clientY < rect.top + rect.height / 2 ? 'before' : 'after';
1444
+ function _tierDragReset() {
1445
+ if (_tierDrag.srcEl) {
1446
+ if (_tierDrag.pointerId != null) {
1447
+ try { _tierDrag.srcEl.releasePointerCapture(_tierDrag.pointerId); } catch (_) {}
1448
+ }
1449
+ _tierDrag.srcEl.classList.remove('dragging');
1450
+ }
1451
+ _tierDrag.active = false;
1452
+ _tierDrag.srcName = null;
1453
+ _tierDrag.srcEl = null;
1454
+ _tierDrag.pointerId = null;
1455
+ _tierDrag.startY = 0;
1456
+ _tierDrag.origOrder = null;
1401
1457
  }
1402
1458
 
1403
1459
  function initTierDrag() {
1404
- // 事件委托绑定在静态容器 #vendor-list 上一次;子节点重渲染后仍生效
1460
+ // 指针事件委托绑定在静态容器 #vendor-list 上一次;子节点重渲染后仍生效
1405
1461
  const list = document.getElementById('vendor-list');
1406
1462
  if (!list || list.dataset.dndBound === '1') return;
1407
1463
  list.dataset.dndBound = '1';
1408
1464
 
1409
- list.addEventListener('dragstart', function(e) {
1410
- const item = e.target && e.target.closest && e.target.closest('.vendor-item');
1411
- if (!item || !item.draggable) return;
1412
- _tierDrag.active = true;
1465
+ list.addEventListener('pointerdown', function(e) {
1466
+ if (e.button != null && e.button !== 0) return; // 仅主指针/左键
1467
+ const handle = e.target && e.target.closest && e.target.closest('.drag-handle');
1468
+ if (!handle) return; // 仅从手柄发起,避免误触与文本选择
1469
+ const item = handle.closest('.vendor-item');
1470
+ if (!item || !item.dataset.vendor) return;
1471
+ if (list.querySelectorAll('.vendor-item').length < 2) return;
1472
+ _tierDrag.srcEl = item;
1413
1473
  _tierDrag.srcName = item.dataset.vendor;
1414
- item.classList.add('dragging');
1415
- if (e.dataTransfer) {
1416
- e.dataTransfer.effectAllowed = 'move';
1417
- try { e.dataTransfer.setData('text/plain', _tierDrag.srcName || ''); } catch (_) {}
1418
- }
1474
+ _tierDrag.pointerId = e.pointerId;
1475
+ _tierDrag.startY = e.clientY;
1476
+ try { item.setPointerCapture(e.pointerId); } catch (_) {} // 捕获后 DOM 重排不丢事件
1477
+ e.preventDefault(); // 阻止文本选择
1419
1478
  });
1420
1479
 
1421
- list.addEventListener('dragover', function(e) {
1422
- if (!_tierDrag.active) return;
1423
- e.preventDefault(); // 允许 drop(无论是否命中某一行)
1424
- if (e.dataTransfer) e.dataTransfer.dropEffect = 'move';
1425
- const item = e.target && e.target.closest && e.target.closest('.vendor-item');
1426
- _tierDragClearIndicators();
1427
- if (!item || item.dataset.vendor === _tierDrag.srcName) return;
1428
- item.classList.add(_tierDragPosition(item, e.clientY) === 'before' ? 'drag-over-before' : 'drag-over-after');
1429
- });
1430
-
1431
- list.addEventListener('drop', function(e) {
1432
- if (!_tierDrag.active) return;
1480
+ list.addEventListener('pointermove', function(e) {
1481
+ if (!_tierDrag.srcEl || e.pointerId !== _tierDrag.pointerId) return;
1482
+ if (!_tierDrag.active) {
1483
+ if (Math.abs(e.clientY - _tierDrag.startY) < _TIER_DRAG_THRESHOLD) return;
1484
+ _tierDrag.active = true; // 越阈值 → 正式进入拖拽
1485
+ _tierDrag.origOrder = _tierCurrentOrder(list);
1486
+ _tierDrag.srcEl.classList.add('dragging');
1487
+ }
1433
1488
  e.preventDefault();
1434
- const listEl = document.getElementById('vendor-list');
1435
- const dragged = listEl.querySelector('.vendor-item.dragging');
1436
- if (!dragged) return;
1437
- let target = e.target && e.target.closest && e.target.closest('.vendor-item');
1438
- if (!target) {
1439
- // 落在容器空白处 → 移到末尾
1440
- if (listEl.lastElementChild !== dragged) listEl.appendChild(dragged);
1441
- } else if (target !== dragged) {
1442
- const ref = _tierDragPosition(target, e.clientY) === 'before' ? target : target.nextElementSibling;
1443
- if (ref !== dragged) listEl.insertBefore(dragged, ref);
1444
- }
1445
- _tierDragClearIndicators();
1446
- const order = Array.from(listEl.children)
1447
- .filter(function(el) { return el.classList.contains('vendor-item'); })
1448
- .map(function(el) { return el.dataset.vendor; })
1449
- .filter(Boolean);
1450
- persistTierOrder(order);
1489
+ _tierDragMoveTo(list, e.clientY);
1451
1490
  });
1452
1491
 
1453
- list.addEventListener('dragend', function() {
1454
- _tierDrag.active = false;
1455
- _tierDrag.srcName = null;
1456
- _tierDragClearIndicators();
1457
- document.querySelectorAll('#vendor-list .dragging')
1458
- .forEach(function(el) { el.classList.remove('dragging'); });
1492
+ function _tierDragFinish(commit) {
1493
+ if (!_tierDrag.srcEl) return;
1494
+ const wasActive = _tierDrag.active;
1495
+ const order = _tierCurrentOrder(list);
1496
+ const orig = _tierDrag.origOrder;
1497
+ _tierDragReset();
1498
+ if (!wasActive) return; // 仅点击手柄未拖动 → 空操作
1499
+ if (!commit) { _tierRevertToList(); return; } // 取消 → 回滚服务端真实顺序
1500
+ if (orig && order.join(',') === orig.join(',')) return; // 顺序未变 → 跳过 PUT
1501
+ persistTierOrder(order); // 提交新顺序(PUT + 失败回滚)
1502
+ }
1503
+
1504
+ list.addEventListener('pointerup', function(e) {
1505
+ if (!_tierDrag.srcEl || e.pointerId !== _tierDrag.pointerId) return;
1506
+ _tierDragFinish(true);
1507
+ });
1508
+ list.addEventListener('pointercancel', function(e) {
1509
+ if (!_tierDrag.srcEl || e.pointerId !== _tierDrag.pointerId) return;
1510
+ _tierDragFinish(false);
1459
1511
  });
1460
1512
  }
1461
1513
 
@@ -2333,7 +2385,7 @@ function switchTab(name) {
2333
2385
  </script>
2334
2386
  </body>
2335
2387
  </html>
2336
- """.replace("{{TERMINAL2}}", _TERMINAL2_PATHS)
2388
+ """.replace("{{TERMINAL2}}", _TERMINAL2_PATHS).replace("{{LOGO_DEFS}}", _LOGO_DEFS)
2337
2389
 
2338
2390
 
2339
2391
  # ── 数据计算工具 ──────────────────────────────────────────────────────────
@@ -2417,8 +2469,13 @@ def register_dashboard_routes(app: Any) -> None:
2417
2469
 
2418
2470
  @app.get("/dashboard", response_class=HTMLResponse, include_in_schema=False)
2419
2471
  async def dashboard() -> HTMLResponse:
2420
- """返回 Dashboard HTML 页面."""
2421
- return HTMLResponse(content=_DASHBOARD_HTML)
2472
+ """返回 Dashboard HTML 页面.
2473
+
2474
+ 内联 JS/CSS 随版本变化,禁用缓存以免浏览器留存旧内联脚本掩盖前端修复。
2475
+ """
2476
+ return HTMLResponse(
2477
+ content=_DASHBOARD_HTML, headers={"Cache-Control": "no-cache"}
2478
+ )
2422
2479
 
2423
2480
  @app.get("/api/dashboard/summary")
2424
2481
  async def dashboard_summary(request: Request, days: int = 7) -> Response:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: coding-proxy
3
- Version: 0.5.2a4
3
+ Version: 0.5.2a5
4
4
  Summary: A High-Availability, Transparent, and Smart Multi-Vendor Proxy for Claude Code. Support Claude Plans, GitHub Copilot, Google Antigravity, ZAI/GLM, MiniMax, Qwen, Xiaomi, Kimi, Doubao...
5
5
  Project-URL: Source Code, https://github.com/ThreeFish-AI/coding-proxy
6
6
  Project-URL: User Guide, https://github.com/ThreeFish-AI/coding-proxy/blob/master/docs/user-guide.md
@@ -69,7 +69,7 @@ coding/proxy/routing/usage_parser.py,sha256=ZwPuMGtXAwdIOKrXLpdtA4nCmc83ViF6kw5J
69
69
  coding/proxy/routing/usage_recorder.py,sha256=PHUHotCt3VaKkdJizMpPGsUOAj-f5qz9JKeiLEnFNgA,8779
70
70
  coding/proxy/server/__init__.py,sha256=KeH7mEu36v9v27m3VgeSxSeFz9sLTJrxS_EVATJ7Vks,20
71
71
  coding/proxy/server/app.py,sha256=3MYE8-Vsxpt1SVqTKReMKNREBsh_LHKIFq1B4jhfeL8,7121
72
- coding/proxy/server/dashboard.py,sha256=317gxNGlgFDXiRJjZ3q-AsGCkkuLwWPL5uibAmbavvA,102136
72
+ coding/proxy/server/dashboard.py,sha256=Mm6Gh2WtHHdL7HPnDZwKWUHwY7mZBa0w3AG-R-NJsUE,104937
73
73
  coding/proxy/server/factory.py,sha256=L0d0AA0fpkV-gynM85u1l5dXY1OQ5A_p_-PV0XlFGQs,10272
74
74
  coding/proxy/server/responses.py,sha256=i0ugnLRNOdRYGHEWxkwsxR35ChmdMQsSaD8AjRluTn4,2167
75
75
  coding/proxy/server/routes.py,sha256=5f9ONVckM3LG2AftBW6YahelhjkP6XlgaYSH7MvXUp4,22362
@@ -93,8 +93,8 @@ coding/proxy/vendors/native_anthropic.py,sha256=SxtM71PDci0gqLqiwCrFnT410SnSoD7F
93
93
  coding/proxy/vendors/token_manager.py,sha256=s10t4Com0jNnKGkPyJ_HpG5SjHrCEJvfArEOAaPKA_k,4189
94
94
  coding/proxy/vendors/xiaomi.py,sha256=E-GcmJBZh7GOtDFonxZmlf0hKRhrlrXzL0IxHFRYcRo,860
95
95
  coding/proxy/vendors/zhipu.py,sha256=GaLaWssa4c1lcukQL4nOtzji8jxEUJFrZtFgOkXTKaM,11127
96
- coding_proxy-0.5.2a4.dist-info/METADATA,sha256=R8dbE0fCB_GW0vLHSO_D2-7N91Od6wdcwCldIX0ZUOE,11346
97
- coding_proxy-0.5.2a4.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
98
- coding_proxy-0.5.2a4.dist-info/entry_points.txt,sha256=moIVzt5ho0Wk9B47LOo2SEAbhzuDDHWi-EfM30U0XBg,54
99
- coding_proxy-0.5.2a4.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
100
- coding_proxy-0.5.2a4.dist-info/RECORD,,
96
+ coding_proxy-0.5.2a5.dist-info/METADATA,sha256=TKQ7eSzT2YftZSCzbcnPv5WV-oLcqkjQwwkZPtMLAd8,11346
97
+ coding_proxy-0.5.2a5.dist-info/WHEEL,sha256=mffPy8wBnZQn2VnJUU5jE99KsxaSfiyMHV9Yt0aLVxs,87
98
+ coding_proxy-0.5.2a5.dist-info/entry_points.txt,sha256=moIVzt5ho0Wk9B47LOo2SEAbhzuDDHWi-EfM30U0XBg,54
99
+ coding_proxy-0.5.2a5.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
100
+ coding_proxy-0.5.2a5.dist-info/RECORD,,