Skip to content

feat(logs): show consumed points under Tokens in request history - #177

Merged
caigee-cmd merged 1 commit into
mainfrom
feat/logs-tokens-points
Sep 16, 2026
Merged

caigee-cmd merged 1 commit into
mainfrom
feat/logs-tokens-points

Conversation

@caigee-cmd

Copy link
Copy Markdown
Owner

Summary

  • Show provider-reported consumed points as optional green secondary text under the Tokens column in request history (no new column; hide when missing).
  • Dual-write the same value onto request_logs.credits again so list queries can render without opening detail.
  • Fall back to request_usage_details for rows that only stored credits in the detail table during the earlier window.

Test plan

  • go test ./internal/api/ ./internal/accounts/
  • cd frontend && npm run sync
  • Open Logs → Request history and confirm rows with points show green N pts / N 点 under Tokens
  • Confirm rows without points still show only in/out tokens
  • Open a detail modal and confirm usage detail still shows consumed points

Render reported credits as optional green secondary text under the Tokens
column, dual-write the value onto request_logs for list queries, and fall
back to request_usage_details for rows that only stored it in detail.
@caigee-cmd
caigee-cmd merged commit 01ed60a into main Sep 16, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant