mirror of
https://github.com/mark3labs/kit.git
synced 2026-06-14 03:30:26 +00:00
427675eed8
The 'is the active Anthropic credential a stored OAuth token' check was copy-pasted at 5 sites, all prefix-matching the magic string 'stored OAuth' produced in internal/auth. Now: - internal/auth: new CredentialSourceOAuth constant + IsAnthropicOAuth() - internal/ui: new UpdateUsageTrackerForModel(); CreateUsageTracker and SetupCLI share lookupTrackableModel (SetupCLI no longer re-inlines the tracker construction) - cmd/root.go + cmd/extension_context.go: verbatim-duplicated tracker refresh blocks replaced with ui.UpdateUsageTrackerForModel - pkg/kit isAnthropicOAuth delegates to auth.IsAnthropicOAuth - internal/models compares source against the constant