feat: anillo de uso del GLM Coding Plan de z.ai
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 48/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- rust, typescript
Hướng nghiên cứu
Read the existing provider implementations, especially cursor.rs, and follow their registration through mod.rs, config.rs, secrets.rs, and Settings.tsx. Check how provider tests use JSON fixtures and how settings test connections. Done means the GLM Coding Plan quota and reset data appear in usage rings, the plan level is shown, and the API key can be saved and checked; first verify the endpoint and any weekly limit behavior.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Pre-flight checks
- Busqué en las issues existentes y en el roadmap (#45): sin duplicados ni solapamiento (la «ventana GLM de NaN» en candidatos no priorizados es otro tema).
- Entiendo que esta propuesta requiere revisión de producto antes de implementarse.
Problem to solve
quorb muestra anillos de Claude, Codex, Gemini, Cursor, Copilot, OpenRouter y NaN, pero no del GLM Coding Plan de z.ai, cada vez más usado con agentes de código vía el endpoint Anthropic-compatible (api.z.ai/api/anthropic). Quien lo tiene no ve en el widget la cuota de 5h ni el resto del consumo.
Proposed solution
Provider zai (Kind::Subscription), mismo patrón de archivo único que el resto:
GET https://api.z.ai/api/monitor/usage/quota/limitconAuthorization: Bearer <API key de z.ai>(creada en z.ai/manage-apikey).- La response trae
data.level(plan lite/pro/max) ylimits[]:TOKENS_LIMIT— cuota de coding con ventana de 5h:usage/number,percentage,nextResetTime(unix ms) y desglose pormodelCode.TIME_LIMIT— cuota mensual de web search/reader.
- Meter principal (ventana 5h,
resets_at) + secundario; nivel de plan en el label del anillo. - API key en Windows Credential Manager (
secrets::ZAI_API_KEY); sección en Ajustes con comprobar conexión. - Piezas:
src-tauri/src/providers/zai.rs+ registro enmod.rs,config.rs,secrets.rsySettings.tsx; tests deterministas de parseo con fixture JSON (sin red).
Nota de riesgo: el endpoint no está documentado en docs.z.ai; lo usan tools comunitarias independientes (nharu-0630/zaiusage, chunnylab/agent-usage-widget). Igual que cursor.rs con su dashboard, un cambio upstream degrada a fail(Status::Error) sin romper la app.
Pendiente de verificar con una cuenta real: si el límite semanal del devpack aparece como otro type de limit (en código ajeno solo se ven TOKENS_LIMIT y TIME_LIMIT).
Affected area
Application behavior
Scope and non-goals
- Scope: GLM Coding Plan (suscripción devpack), cuenta principal y adicionales por API key como el resto de proveedores.
- Non-goals: z.ai pay-as-you-go sin devpack, leer logs locales de Claude Code, macOS.
Alternatives considered
- API oficial de usage: no existe hoy en docs.z.ai/api-reference (solo chat/agents/image/audio/video/tools).
- Estimar créditos con la fórmula del devpack desde logs locales: frágil, duplicaría el parseo de sesión de
claude.rsy no refleja el estado real de la cuota. - Esperar documentación oficial: sin fecha; el endpoint lleva tiempo estable para las tools comunitarias.
- Ngôn ngữ chính
- TypeScript
- Star
- 10
- Fork
- 2
- Merge trung bình
- 16 phút
- Pull request đã merge (30 ngày)
- 51
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của egdev6/quorb
-
status:approved type:bug
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 70/100
egdev6/quorb#109 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
odd type:feature
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
-
odd type:feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 15/100
Maintainer thường phản hồi trong vòng 1 ngày
-
odd type:feature
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 25/100
Maintainer thường phản hồi trong vòng 1 ngày
-
odd type:chore
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 22/100
egdev6/quorb#105 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
vercel/streamdown#673 · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
docs(stream-protocol): document messageMetatadata on start/finish and the message-metadata chunkĐang mởfactory-active task-identify-harness-labels-done task-identify-issue-type-done
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
vercel/ai#23375 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
agilepathway/label-checker#721 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
CLI Empathy needs triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
chromaui/chromatic-cli#1524 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày