You've already forked agentic-coding-workflow
fix(web): code review pass — scroll watch, SSE same-origin, store concurrency, modal reset, admin validation
This commit is contained in:
@@ -75,3 +75,15 @@ export async function request<T>(path: string, opts: RequestOptions = {}): Promi
|
||||
clearTimeout(timer)
|
||||
}
|
||||
}
|
||||
|
||||
// buildQuery 把任意对象拼成 "?k=v&..." 形式;undefined / null / '' 跳过;
|
||||
// 数组与对象用 String() 退化(业务侧目前没有数组 query 需求)。
|
||||
export 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 : ''
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user