MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getApiClient

Function getApiClient

cli/src/utils/codebuff-api.ts:571–578  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

569 * the auth token changes.
570 */
571export function getApiClient(): CodebuffApiClient {
572 // Recreate client if it doesn't exist or if the token has changed since creation
573 if (!sharedClient || clientCreatedWithToken !== sharedAuthToken) {
574 sharedClient = createCodebuffApiClient({ authToken: sharedAuthToken })
575 clientCreatedWithToken = sharedAuthToken
576 }
577 return sharedClient
578}
579
580/**
581 * Set the auth token for the shared API client.

Callers 7

FeedbackContainerFunction · 0.90
logoutUserFunction · 0.90
fetchAndUpdateUsageFunction · 0.90
publishAgentTemplatesFunction · 0.90
useUpdatePreferenceFunction · 0.90
fetchSubscriptionDataFunction · 0.90
fetchUserDetailsFunction · 0.90

Calls 1

createCodebuffApiClientFunction · 0.85

Tested by

no test coverage detected