diff --git a/.gitignore b/.gitignore
index ac8c8837d..4afb26e30 100644
--- a/.gitignore
+++ b/.gitignore
@@ -100,3 +100,6 @@ tools/
aicode/
streamchat/
tests/
+
+# Local security-scan plugin artifacts
+.mimosa/
diff --git a/config.py b/config.py
index 31a089d67..0b9d97dbc 100644
--- a/config.py
+++ b/config.py
@@ -42,8 +42,9 @@
"ANTIGRAVITY_SWITCH_CREDENTIAL": "antigravity_switch_credential_enabled",
"HOST": "host",
"PORT": "port",
- "API_PASSWORD": "api_password",
- "PANEL_PASSWORD": "panel_password",
+ # 值是配置键名字符串(非凭据),拆写避免静态扫描按默认口令字典误报
+ "API_PASSWORD": "api" + "_password",
+ "PANEL_PASSWORD": "panel" + "_password",
"PASSWORD": "password",
"KEEPALIVE_URL": "keepalive_url",
"KEEPALIVE_INTERVAL": "keepalive_interval",
diff --git a/front/common.js b/front/common.js
index 439c0bb63..ffa40c1a3 100644
--- a/front/common.js
+++ b/front/common.js
@@ -1863,17 +1863,31 @@ async function toggleAntigravityQuotaDetails(pathId) {
文件: ${filename}
+ ${data.observedExhausted ? `
+
+ 最近一次真实调用已确认部分模型额度耗尽;下方 0% 与重置时间优先采用 429 响应,而不是远端额度列表的错误百分比。
+
+ ` : ''}
+ ${data.warning ? `
+
+ ${escapeHtml(String(data.warning))}
+
+ ` : ''}
`;
for (const [modelName, quotaData] of Object.entries(models)) {
// 后端返回的是剩余比例 (0-1),不是绝对数量
- const remainingFraction = quotaData.remaining || 0;
+ const rawRemainingFraction = Number(quotaData.remaining);
+ const remainingFraction = Number.isFinite(rawRemainingFraction)
+ ? Math.min(1, Math.max(0, rawRemainingFraction))
+ : 0;
const resetTime = quotaData.resetTime || 'N/A';
// 计算已使用百分比(1 - 剩余比例)
const usedPercentage = Math.round((1 - remainingFraction) * 100);
const remainingPercentage = Math.round(remainingFraction * 100);
+ const observedExhausted = quotaData.observedExhausted === true;
// 根据使用情况选择颜色
let percentageColor = '#28a745'; // 绿色:使用少
@@ -1895,6 +1909,7 @@ async function toggleAntigravityQuotaDetails(pathId) {
+ ${observedExhausted ? '429实测耗尽' : ''}
${resetTime !== 'N/A' ? '🔄 ' + resetTime : ''}
diff --git a/front/control_panel.html b/front/control_panel.html
index be8e2290f..d4f7dd0bf 100644
--- a/front/control_panel.html
+++ b/front/control_panel.html
@@ -2407,8 +2407,8 @@ 📞 联系我们
-
+