fix(web): code review pass — scroll watch, SSE same-origin, store concurrency, modal reset, admin validation

This commit is contained in:
2026-05-04 20:58:48 +08:00
parent ff283013da
commit b8d29d8ea7
11 changed files with 145 additions and 85 deletions
+1 -11
View File
@@ -1,4 +1,4 @@
import { request } from './client'
import { buildQuery, request } from './client'
export type LLMProvider = 'anthropic' | 'openai' | 'gemini'
@@ -79,16 +79,6 @@ export interface AdminUsageItem {
const enc = (v: string) => encodeURIComponent(v)
function buildQuery(params: object): string {
const q = new URLSearchParams()
for (const [k, v] of Object.entries(params)) {
if (v === undefined || v === null || v === '') continue
q.set(k, String(v))
}
const s = q.toString()
return s ? '?' + s : ''
}
export const llmAdminApi = {
// ===== Endpoints =====
listEndpoints: () =>