"backend/internal/vscode:/vscode.git/clone" did not exist on "f7c13af11fa380d47635174645da9b6dd995cda3"
- 29 Apr, 2026 1 commit
-
-
erio authored
Background / 背景 The ops cleanup task currently rejects retention days < 1 in both validate and normalize, so operators who want minimal-history setups (e.g. high churn deployments that prefer near-realtime cleanup) cannot express that intent through the UI. The only options are 1+ days, which keeps at least 24h of history regardless of cron frequency. ops 清理任务目前在 validate 和 normalize 两处都拒绝小于 1 的保留天数, 让希望尽量不留历史的运维场景(高吞吐部署 + 想用近实时清理)无法通过 UI 表达。最低只能配 1,等于不管 cron 多频繁,至少都会保留 24 小时的历史。 Purpose / 目的 Let admins set retention days to 0, meaning "every scheduled cleanup run wipes the corresponding table(s) entirely". Combined with a more frequent cron (e.g. `0 * * * *`) this yields effectively rolling cleanup. 允许管理员把保留天数设为 0,语义为"每次定时清理时把对应表全部清空"。 搭配更频繁的 cron(比如每小时整点)即可获得近似滚动清理的效果。 Changes / 改动内容 Backend - service/ops_settings.go: validate accepts [0, 365]; normalize only refills default 30 when value is < 0 (negative is treated as legacy bad data, 0 is honoured) - service/ops_cleanup_service.go: introduce `opsCleanupPlan(now, days)` returning `(cutoff, truncate, ok)`. days==0 returns truncate=true and short-circuits to a new `truncateOpsTable` helper that uses `TRUNCATE TABLE` (O(1), no WAL, no VACUUM pressure). days>0 keeps the existing batched DELETE path unchanged. Empty tables skip TRUNCATE to avoid the ACCESS EXCLUSIVE lock entirely - Extract `isMissingRelationError` helper to dedupe the "table not yet created" tolerance shared by both delete and truncate paths - Add unit tests for `opsCleanupPlan` (three branches) and `isMissingRelationError` 后端 - service/ops_settings.go: validate 接受 [0, 365];normalize 仅在 < 0 时回填默认 30(负数视为脏数据,0 被尊重) - service/ops_cleanup_service.go: 抽 `opsCleanupPlan(now, days)` 返回 `(cutoff, truncate, ok)`。days==0 → truncate=true,走新增 `truncateOpsTable`(TRUNCATE TABLE,O(1),无 WAL、无 VACUUM 压力); days>0 仍走原批量 DELETE 路径,行为完全不变。空表跳过 TRUNCATE, 避免无意义的 ACCESS EXCLUSIVE 锁 - 抽 `isMissingRelationError` helper 复用 delete / truncate 两处的 "表不存在"宽容判断 - 补 `opsCleanupPlan` 三分支 + `isMissingRelationError` 单元测试 Frontend - OpsSettingsDialog.vue: validation accepts [0, 365]; input min=0 - i18n (zh/en): hint mentions "0 = wipe all on every cleanup", validation message updated to 0-365 range 前端 - OpsSettingsDialog.vue: 校验放宽到 [0, 365],input min 改 0 - i18n(zh/en):hint 补"0 = 每次清理时清空所有",错误提示改 0-365 Trade-offs / 取舍 - TRUNCATE requires ACCESS EXCLUSIVE lock briefly, but ops tables only have the cleanup task as a writer, so the lock is invisible to other workloads - Empty-table guard avoids the lock when there is nothing to clean - Negative values are still treated as legacy bad data and replaced with default 30 to preserve compatibility
-
- 23 Apr, 2026 2 commits
-
-
erio authored
Revert payment/wechat, sora/claude-max cleanup, fork-only migrations, and cosmetic changes that were brought in by the release sync commit. Keep only channel-monitor related improvements: - PublicSettingsInjectionPayload named struct with drift test - ChannelMonitorRunner graceful shutdown in wire - image_output_price in SupportedModelChip - Simplified buildSelfNavItems in AppSidebar - Gateway WARN logs for 503 branches
-
erio authored
- Extract PublicSettingsInjectionPayload named struct with drift test - Add channel_monitor_default_interval_seconds to SSR injection - Add image_output_price to SupportedModelChip - Simplify AppSidebar buildSelfNavItems (admins see available channels) - Add gateway WARN logs for 503 no-available-accounts branches - Wire ChannelMonitorRunner into provideCleanup for graceful shutdown - Add migrations 130/131 (CC template userid fix + mimicry field cleanup) - Clean up fork-only features (sora, claude max simulation, client affinity) - Remove ~320 obsolete i18n keys - Add codexUsage utility, WechatServiceButton, BulkEditAccountModal - Tidy go.sum
-
- 09 Apr, 2026 1 commit
-
-
IanShaw027 authored
-
- 27 Mar, 2026 1 commit
-
-
Wang Lvyuan authored
-
- 23 Mar, 2026 3 commits
-
-
qingyuzhang authored
-
Ethan0x0000 authored
Show endpoint, model mapping, and request type in the ops error log table and detail modal: - Endpoint column with inbound/upstream tooltip - Model column showing requested→upstream mapping with arrow - Request type badge (sync/stream/ws) in status column - New detail cards for inbound endpoint, upstream endpoint, request type
-
Ethan0x0000 authored
-
- 22 Mar, 2026 1 commit
-
-
Ethan0x0000 authored
-
- 15 Mar, 2026 1 commit
-
-
erio authored
- Add 5th error filter switch IgnoreInsufficientBalanceErrors to suppress upstream insufficient balance / insufficient_quota errors from ops log - Extract hardcoded error strings into package-level constants for shouldSkipOpsErrorLog, normalizeOpsErrorType, classifyOpsPhase, and classifyOpsIsBusinessLimited - Define ErrNoAvailableAccounts sentinel error and replace all errors.New("no available accounts") call sites - Update tests to use require.ErrorIs with the sentinel error
-
- 14 Mar, 2026 1 commit
-
-
shaw authored
后端默认 alert.enabled=true 但 recipients 为空,前端验证将其视为 错误并阻断保存按钮。移除该阻断性验证,改为保存时自动禁用无收件人 的邮件通知配置。
-
- 13 Mar, 2026 1 commit
-
-
Peter authored
-
- 12 Mar, 2026 1 commit
-
-
Peter authored
-
- 04 Mar, 2026 1 commit
-
-
xvhuan authored
-
- 03 Mar, 2026 1 commit
-
-
zqq61 authored
-
- 12 Feb, 2026 4 commits
-
-
yangjianbo authored
解析 extra 字段(status_code/latency_ms/method/path 等)并拼成普通文本\n表格改为 3 列并固定时间/级别宽度,详情列填满后自动换行 Co-Authored-By:Claude Opus 4.6 <noreply@anthropic.com>
-
yangjianbo authored
-
yangjianbo authored
-
yangjianbo authored
- 新增管理端接口 /api/v1/admin/ops/dashboard/openai-token-stats,按模型聚合统计 gpt% 请求 - 支持 time_range=30m|1h|1d|15d|30d(默认 30d),支持 platform/group_id 过滤 - 支持分页(page/page_size)或 TopN(top_n)互斥查询 - 前端运维监控页新增统计表卡片,包含空态/错误态与分页/TopN 交互 - 补齐后端与前端测试
-
- 09 Feb, 2026 1 commit
-
-
erio authored
Merge functional changes from develop branch: - Remove AntigravityQuotaScope system (claude/gemini_text/gemini_image) - Replace with per-model rate limiting using resolveAntigravityModelKey - Remove model load statistics (IncrModelCallCount/GetModelLoadBatch) - Simplify account selection to unified priority→load→LRU algorithm - Remove SetAntigravityQuotaScopeLimit from AccountRepository - Clean up scope-related UI indicators and API fields
-
- 07 Feb, 2026 1 commit
-
-
erio authored
Key changes: - Upgrade model mapping: Opus 4.5 → Opus 4.6-thinking with precise matching - Unified rate limiting: scope-level → model-level with Redis snapshot sync - Load-balanced scheduling by call count with smart retry mechanism - Force cache billing support - Model identity injection in prompts with leak prevention - Thinking mode auto-handling (max_tokens/budget_tokens fix) - Frontend: whitelist mode toggle, model mapping validation, status indicators - Gemini session fallback with Redis Trie O(L) matching - Ops: enhanced concurrency monitoring, account availability, retry logic - Migration scripts: 049-051 for model mapping unification
-
- 03 Feb, 2026 1 commit
-
-
liuxiongfeng authored
在运维监控的并发/排队卡片中,为 Antigravity 平台账号显示各 scope (claude/gemini_text/gemini_image) 的限流数量统计,便于管理员了解 哪些 scope 正在被限流。 Cherry-picked from slovx2/sub2api: 08d6dc52
-
- 02 Feb, 2026 2 commits
-
-
song authored
-
Zero Clover authored
新增 IgnoreInvalidApiKeyErrors 开关,启用后 INVALID_API_KEY 和 API_KEY_REQUIRED 错误将被完全跳过,不写入 Ops 错误日志。 这些错误由用户错误配置导致,与服务质量无关。
-
- 29 Jan, 2026 1 commit
-
-
yangjianbo authored
新增功能: - 新增 Sora 账号管理和 OAuth 认证 - 新增 Sora 视频/图片生成 API 网关 - 新增 Sora 任务调度和缓存机制 - 新增 Sora 使用统计和计费支持 - 前端增加 Sora 平台配置界面 安全修复(代码审核): - [SEC-001] 限制媒体下载响应体大小(图片 20MB、视频 200MB),防止 DoS 攻击 - [SEC-002] 限制 SDK API 响应大小(1MB),防止内存耗尽 - [SEC-003] 修复 SSRF 风险,添加 URL 验证并强制使用代理配置 BUG 修复(代码审核): - [BUG-001] 修复 for 循环内 defer 累积导致的资源泄漏 - [BUG-002] 修复图片并发槽位获取失败时已持有锁未释放的永久泄漏 性能优化(代码审核): - [PERF-001] 添加 Sentinel Token 缓存(3 分钟有效期),减少 PoW 计算开销 技术细节: - 使用 io.LimitReader 限制所有外部输入的大小 - 添加 urlvalidator 验证防止 SSRF 攻击 - 使用 sync.Map 实现线程安全的包级缓存 - 优化并发槽位管理,添加 releaseAll 模式防止泄漏 影响范围: - 后端:新增 Sora 相关数据模型、服务、网关和管理接口 - 前端:新增 Sora 平台配置、账号管理和监控界面 - 配置:新增 Sora 相关配置项和环境变量 Co-Authored-By:Claude Sonnet 4.5 <noreply@anthropic.com>
-
- 27 Jan, 2026 1 commit
-
-
song authored
在运维监控的并发/排队卡片中,为 Antigravity 平台账号显示各 scope (claude/gemini_text/gemini_image) 的限流数量统计,便于管理员了解 哪些 scope 正在被限流。
-
- 23 Jan, 2026 1 commit
-
-
song authored
-
- 15 Jan, 2026 6 commits
-
-
IanShaw027 authored
- 合并双定时器为单一倒计时定时器 - 倒计时归零时触发数据刷新 - 添加自定义时间范围的安全回退
-
IanShaw027 authored
后端改动: - 添加 ops_job_heartbeats.last_result 字段记录任务执行结果 - 优化告警评估器统计信息(规则数/事件数/邮件数) - 统一各定时任务的心跳记录格式 前端改动: - 重构 OpsConcurrencyCard 使用父组件统一控制刷新节奏 - 移除独立的 5 秒刷新定时器,改用 refreshToken 机制 - 修复 TypeScript 类型错误
-
IanShaw027 authored
- 移除请求时长卡片详情按钮的 min_duration_ms 参数限制 - 现在点击详情会显示所有请求,按时长倒序排列 - 不再只显示 P99 以上的请求
-
IanShaw027 authored
功能特性: - 在时间段选择器中增加"自定义"选项 - 点击后弹出对话框,支持选择任意时间范围 - 使用 HTML5 datetime-local 输入框,体验友好 - 自定义时显示格式化的时间范围标签(MM-DD HH:mm ~ MM-DD HH:mm) - 默认初始化为最近1小时 技术实现: - 扩展 TimeRange 类型支持 'custom' - 添加 customStartTime 和 customEndTime 状态管理 - 创建 buildApiParams 辅助函数统一处理 API 参数 - 当选择自定义时,使用 start_time 和 end_time 参数替代 time_range - 更新所有相关 API 调用支持自定义时间范围 国际化: - 添加"自定义"、"开始时间"、"结束时间"翻译
-
IanShaw027 authored
阈值检查系统优化: - 引入三级阈值系统(normal/warning/critical) - 统一阈值判断逻辑,支持警告和严重两个级别 - 移除硬编码的 TTFT 颜色判断,改用阈值配置 - 新增 getThresholdColorClass 统一颜色映射 布局优化: - 优化详细指标在卡片内的响应式布局 - 改进宽屏下的卡片布局显示 - 优化指标数值的对齐和间距
-
yangjianbo authored
-
- 14 Jan, 2026 7 commits
-
-
IanShaw027 authored
- 修复错误列表中用户列显示 \n 的问题 - 上游错误显示账号(account),请求错误显示用户(user) - 错误详情模态框同步调整显示逻辑 - 添加 accountId 国际化翻译
-
IanShaw027 authored
- 在错误日志表格中将账号列替换为用户列 - 在错误详情模态框中将账号信息替换为用户信息 - 显示用户邮箱而不是账号名称 - 上游错误的账号信息保留在上游错误上下文中
-
IanShaw027 authored
- 添加 fullscreen 属性支持,适配全屏模式 - 优化骨架屏布局,更好地匹配实际看板结构 - 改进加载动画效果,提升用户体验
-
IanShaw027 authored
- 新增 GetErrorLogByID 接口用于获取单个错误日志详情 - 优化 GetErrorLogs 过滤逻辑,简化参数处理 - 简化前端错误详情模态框代码,提升可维护性 - 更新相关 API 接口和 i18n 翻译
-
IanShaw027 authored
- 重构OpsErrorDetailModal.vue代码格式,提升可读性 - 添加上游错误tab显示功能 - 完善i18n翻译(upstream_http) - 优化其他ops组件代码格式
-
IanShaw027 authored
将技术术语的i18n翻译键替换为硬编码文本: - ms (P99) - 毫秒和百分位数标识 - TTFT - Time To First Token缩写 这些是通用技术术语,不需要国际化。
-
IanShaw027 authored
- 移除i18n文件中未使用的翻译键(cpu, redis, qps, ttft等) - 将技术术语改为硬编码(QPS, CPU, TPS等不需要翻译) - 简化OpsDashboardHeader、OpsErrorDetailModal等组件的i18n调用
-