feat(api): 单次上传上限改为 context_max_bytes 可配,Cloudflare 边缘后默认 95Mi,新增 GET /me/submissions/limits 供面板预检

This commit is contained in:
Lemon-miaow committed 2026-09-25 18:31:10 +08:00
1 parent e7326e6315
commit 87dee3e5a5
10 files changed
+158 -2

No files matched your search

+3
View File
@@ -384,6 +384,9 @@ type Manager struct {
IDGen func() string
}
// ContextLimit is the effective cap on one uploaded context.
func (m *Manager) ContextLimit() int64 { return m.maxContextBytes() }
func (m *Manager) maxContextBytes() int64 {
if m.MaxContextBytes > 0 {
return m.MaxContextBytes