]> git.99rst.org Git - sgasser-llm-shield.git/commit
Track browser-extension requests separately in the dashboard (#107)
authorStefan Gasser <redacted>
Tue, 23 Jun 2026 07:31:37 +0000 (09:31 +0200)
committerGitHub <redacted>
Tue, 23 Jun 2026 07:31:37 +0000 (09:31 +0200)
commita395fc1a00d0fdb660a0162de4655edf45debe7f
treeb0efedbb8220445007ed29106420d6d5033d0cb0
parent86f1e0cbd1f6a3894bcfd9ebc24e85bd4b9c6f7d
Track browser-extension requests separately in the dashboard (#107)

Add a `source` column to request logs so `/api/mask` calls sent with the
`X-PasteGuard-Source: browser-extension` header are counted and badged
separately from direct API calls and provider-proxied requests.

- Backfill `source` from `provider` for existing rows via migration
- Split stats into api_requests vs browser_extension_requests
- Replace the route-only Provider column with a unified Source column
- Add an Extension stat card
docs/api-reference/dashboard-api.mdx
docs/api-reference/mask.mdx
src/routes/api.test.ts
src/routes/api.ts
src/routes/utils.ts
src/services/logger.test.ts [new file with mode: 0644]
src/services/logger.ts
src/views/dashboard/page.tsx
git clone https://git.99rst.org/PROJECT