Title: feat: add /usage slash command for DeepSeek API balance by al4xdev · Pull Request #216 · lessweb/deepcode-cli · GitHub
Open Graph Title: feat: add /usage slash command for DeepSeek API balance by al4xdev · Pull Request #216 · lessweb/deepcode-cli
X Title: feat: add /usage slash command for DeepSeek API balance by al4xdev · Pull Request #216 · lessweb/deepcode-cli
Description: Summary Add a /usage slash command that queries the DeepSeek API (GET /user/balance) and displays the user's credit balance and availability status in a dedicated bordered view. Motivation DeepSeek API users with prepaid credits have to visit the DeepSeek website to check their balance. This command brings that information directly into the CLI. Design The command opens a bordered view (same pattern as /mcp status). Press Esc to return to chat. Provider detection baseURL.includes("api.deepseek.com") → calls GET https://api.deepseek.com/user/balance Any other provider → shows error with current base URL Error handling Scenario Behavior Non-DeepSeek provider setErrorLine with base URL No API key configured setErrorLine HTTP error from API setErrorLine with status Network error setErrorLine with message Files Changed File Description packages/cli/src/ui/views/UsageView.tsx New -- bordered view component (+59) packages/cli/src/ui/core/slash-commands.ts +7 -- "usage" kind + built-in entry packages/cli/src/ui/views/App.tsx +49/-2 -- handleUsage callback + view routing packages/cli/src/ui/views/PromptInput.tsx +6/-1 -- command union type + handler packages/cli/src/tests/slash-commands.test.ts +1 -- built-in names assertion Verification npm run check -- typecheck 0 errors, lint 0 errors, format clean npm test -- all tests pass npm run build -- successful
Open Graph Description: Summary Add a /usage slash command that queries the DeepSeek API (GET /user/balance) and displays the user's credit balance and availability status in a dedicated bordered view. Motivation Deep...
X Description: Summary Add a /usage slash command that queries the DeepSeek API (GET /user/balance) and displays the user's credit balance and availability status in a dedicated bordered view. Motivation ...
Opengraph URL: https://github.com/lessweb/deepcode-cli/pull/216
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:0240234d-1a13-9c64-0494-7cbc0da00361 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 875C:31A9ED:EAF4B6:14327A3:6A4DED29 |
| html-safe-nonce | 98a026bdf547620147e16b35e3207b667caa56fc2c7adbb5b34392ef270c85e5 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NzVDOjMxQTlFRDpFQUY0QjY6MTQzMjdBMzo2QTRERUQyOSIsInZpc2l0b3JfaWQiOiI4MDc2NDMyNzE5MTAwMTEyMTY5IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | bd17196dc9fd03b8478141b7296ac3ac4e9b8c8f374b23154f5a2d11c8c0d141 |
| hovercard-subject-tag | pull_request:3967442980 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/lessweb/deepcode-cli/pull/216/files |
| twitter:image | https://avatars.githubusercontent.com/u/76815370?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/76815370?s=400&v=4 |
| og:image:alt | Summary Add a /usage slash command that queries the DeepSeek API (GET /user/balance) and displays the user's credit balance and availability status in a dedicated bordered view. Motivation Deep... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 06b8a6144231bf3a234f1c2e9993861e07ce98a905912b114aa386c2d7e84b33 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/lessweb/deepcode-cli git https://github.com/lessweb/deepcode-cli.git |
| octolytics-dimension-user_id | 118287711 |
| octolytics-dimension-user_login | lessweb |
| octolytics-dimension-repository_id | 1223512305 |
| octolytics-dimension-repository_nwo | lessweb/deepcode-cli |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 1223512305 |
| octolytics-dimension-repository_network_root_nwo | lessweb/deepcode-cli |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 1d344bdb7547fe6bca17a59bb2b8aac3dc9532a0 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width