Session stats panel: "Usage" shows context-window fill, not account usage — misleading when the free limit is reached
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ó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 76/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend, internationalization
Hướng nghiên cứu
Bắt đầu với gui-plugins/src/context/tab.tsx và theo dõi cách các nhãn thống kê phiên được hiển thị; issue nêu các giá trị và nội dung thay thế được đề xuất. Kiểm tra các bản dịch tiếng Nga trong app/src/runtime/i18n/ru.ts để tìm các mục command.usage.view còn thiếu. Hoàn tất khi thống kê phân biệt mức sử dụng ngữ cảnh với hạn mức tài khoản và lệnh usage có nhãn tiếng Nga.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Description
The Context tab session stats panel uses labels that look like account limits, but they
measure the model's context window.
For opencode/deepseek-v4.1-flash-free it shows:
Лимит контекста (Context limit): 200 000
Всего токенов (Total tokens): 70 442
Использование (Usage): 35 %
while requests fail at the same time with "Free usage limit reached ... subscribe to
OpenCode Go", so it reads as if most of the allowance is still left.
Cause: gui-plugins/src/context/tab.tsx (SessionContextTab) computes
total = input + output + reasoning + cache.read + cache.write for the last assistant
message, then usage = round(total / model.limit.context * 100). The math is correct,
but "Total tokens" is the current context size, not the session total (97 messages,
70 442 tokens), and "Usage" is context-window fill, not quota.
Suggested renames: "Usage" -> "Context fill", "Total tokens" -> "Last turn tokens",
"Context limit" -> "Model context window".
Same area, minor: command.usage.view and command.usage.view.description are missing from
app/src/runtime/i18n/ru.ts, so the command stays English in the palette, while
dialog.usageExceeded.freeTier.* is translated ("Достигнут бесплатный лимит" — "Free limit
reached").
Note: the free allowance isn't available to the panel anyway — GET
/api/experimental/usage/limits returns only the Console workspace and budgets: [].
Plugins
OpenCode version
OpenCode version: 2.2.5 (Desktop)
Steps to reproduce
- OpenCode Desktop 2.2.5, UI language Russian
- Open a session using opencode/deepseek-v4.1-flash-free
- Open the Context tab -> session stats
- Exhaust the free allowance so requests fail with "Free usage limit reached"
- The stats panel still shows "Использование 35 %" ("Usage 35 %")
Screenshot
Operating System
Windows 10
Terminal
OpenCode Desktop (GUI, not a terminal)
- Ngôn ngữ chính
- TypeScript
- Star
- 224k
- Fork
- 30k
- Merge trung bình
- 4 giờ 44 phút
- Pull request đã merge (30 ngày)
- 513
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
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 anomalyco/opencode
-
pending close triaging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
anomalyco/opencode#62582 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
reproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
anomalyco/opencode#62516 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
pending close triaging
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
anomalyco/opencode#62403 · 3 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 78/100
anomalyco/opencode#62362 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
reproduced
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 63/100
anomalyco/opencode#62343 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của anomalyco/opencode
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Maintainer thường phản hồi trong vòng 1 ngày
-
feature request
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
callstack/react-native-paper#5189 ·
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 68/100
live-codes/livecodes#1079 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Add: ESP 2 ROĐang mởapproved check:passed streams:add
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
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 68/100
Maintainer thường phản hồi trong vòng 1 ngày