id: 1 unit: public void Apply() file: src/dotnet/AzureAI.Proxy/ReverseProxy/OpenAIChargebackTransformProvider.cs start line: 43 end line: 169 size: 98 LOC McCabe index: 17 number of parameters: 1 id: 2 unit: private DestinationState PickOneDestination() file: src/dotnet/AzureAI.Proxy/ReverseProxy/RetryMiddleware.cs start line: 62 end line: 117 size: 44 LOC McCabe index: 7 number of parameters: 1 id: 3 unit: public IReadOnlyList GetClusters() file: src/dotnet/AzureAI.Proxy/ReverseProxy/ProxyConfiguration.cs start line: 46 end line: 93 size: 38 LOC McCabe index: 3 number of parameters: 0 id: 4 unit: export function ThemeToggle() file: src/azurechat/features/theme/theme-toggle.tsx start line: 8 end line: 40 size: 33 LOC McCabe index: 1 number of parameters: 0 id: 5 unit: userId: await userHashedId() file: src/azurechat/features/chat/chat-services/chat-thread-service.ts start line: 185 end line: 223 size: 32 LOC McCabe index: 1 number of parameters: 0 id: 6 unit: id: uniqueId() file: src/azurechat/features/chat/chat-services/chat-thread-service.ts start line: 186 end line: 223 size: 31 LOC McCabe index: 1 number of parameters: 0 id: 7 unit: private DefaultAzureCredentialOptions GetDefaultAzureCredentialOptions() file: src/dotnet/AzureAI.Proxy/Services/ManagedIdentityService.cs start line: 24 end line: 54 size: 26 LOC McCabe index: 4 number of parameters: 0 id: 8 unit: function toast() file: src/azurechat/components/ui/use-toast.ts start line: 143 end line: 170 size: 25 LOC McCabe index: 2 number of parameters: 1 id: 9 unit: public void RequestProxied() file: src/dotnet/AzureAI.Proxy/ReverseProxy/ThrottlingHealthPolicy.cs start line: 18 end line: 43 size: 23 LOC McCabe index: 11 number of parameters: 3 id: 10 unit: public async Task InvokeAsync() file: src/dotnet/AzureAI.Proxy/ReverseProxy/RetryMiddleware.cs start line: 20 end line: 50 size: 23 LOC McCabe index: 4 number of parameters: 1 id: 11 unit: export async function middleware() file: src/azurechat/middleware.ts start line: 8 end line: 35 size: 20 LOC McCabe index: 5 number of parameters: 1 id: 12 unit: private constructor() file: src/azurechat/features/common/cosmos.ts start line: 31 end line: 50 size: 18 LOC McCabe index: 1 number of parameters: 1 id: 13 unit: id: uniqueId() file: src/azurechat/features/chat/chat-services/chat-document-service.ts start line: 177 end line: 198 size: 18 LOC McCabe index: 5 number of parameters: 0 id: 14 unit: id: uniqueId() file: src/azurechat/features/chat/chat-services/cosmosdb/cosmosdb.ts start line: 40 end line: 59 size: 18 LOC McCabe index: 1 number of parameters: 0 id: 15 unit: public IReadOnlyList GetRoutes() file: src/dotnet/AzureAI.Proxy/ReverseProxy/ProxyConfiguration.cs start line: 22 end line: 44 size: 18 LOC McCabe index: 2 number of parameters: 0 id: 16 unit: function useToast() file: src/azurechat/components/ui/use-toast.ts start line: 172 end line: 190 size: 17 LOC McCabe index: 2 number of parameters: 0 id: 17 unit: userId: await userHashedId() file: src/azurechat/features/chat/chat-services/chat-document-service.ts start line: 178 end line: 198 size: 17 LOC McCabe index: 5 number of parameters: 0 id: 18 unit: public async Task LogAsync() file: src/dotnet/AzureAI.Proxy/Services/LogIngestionService.cs start line: 29 end line: 51 size: 17 LOC McCabe index: 2 number of parameters: 1 id: 19 unit: export default async function Home() file: src/azurechat/app/chat/[id]/page.tsx start line: 10 end line: 28 size: 16 LOC McCabe index: 2 number of parameters: 1 id: 20 unit: public static LogAnalyticsRecord CalculateChatInputTokens() file: src/dotnet/AzureAI.Proxy/OpenAIHandlers/Tokens.cs start line: 20 end line: 46 size: 16 LOC McCabe index: 2 number of parameters: 2 id: 21 unit: export default async function Home() file: src/azurechat/app/change-log/page.tsx start line: 9 end line: 23 size: 15 LOC McCabe index: 1 number of parameters: 0 id: 22 unit: export default async function NotFound() file: src/azurechat/app/chat/[id]/not-found.tsx start line: 4 end line: 18 size: 15 LOC McCabe index: 1 number of parameters: 0 id: 23 unit: id: uniqueId() file: src/azurechat/features/chat/chat-services/chat-service.ts start line: 42 end line: 58 size: 15 LOC McCabe index: 1 number of parameters: 0 id: 24 unit: export function chunkDocumentWithOverlap() file: src/azurechat/features/chat/chat-services/text-chunk.ts start line: 4 end line: 24 size: 15 LOC McCabe index: 3 number of parameters: 1 id: 25 unit: public static void Handle() file: src/dotnet/AzureAI.Proxy/OpenAIHandlers/Usage.cs start line: 8 end line: 23 size: 15 LOC McCabe index: 2 number of parameters: 2 id: 26 unit: async addMessage() file: src/azurechat/features/chat/chat-services/cosmosdb/cosmosdb.ts start line: 38 end line: 52 size: 14 LOC McCabe index: 1 number of parameters: 2 id: 27 unit: function isVersionGreater() file: src/azurechat/features/change-log/app-version.ts start line: 18 end line: 32 size: 13 LOC McCabe index: 4 number of parameters: 2 id: 28 unit: async authorize() file: src/azurechat/features/auth/auth-api.ts start line: 66 end line: 81 size: 13 LOC McCabe index: 2 number of parameters: 2 id: 29 unit: async onCompletion() file: src/azurechat/features/chat/chat-services/chat-api-data.ts start line: 89 end line: 102 size: 13 LOC McCabe index: 1 number of parameters: 1 id: 30 unit: public static void Handle() file: src/dotnet/AzureAI.Proxy/OpenAIHandlers/ChatCompletionChunck.cs start line: 7 end line: 21 size: 12 LOC McCabe index: 2 number of parameters: 2 id: 31 unit: export default async function Home() file: src/azurechat/app/page.tsx start line: 8 end line: 18 size: 11 LOC McCabe index: 2 number of parameters: 0 id: 32 unit: export default async function Home() file: src/azurechat/app/unauthorized/page.tsx start line: 3 end line: 12 size: 10 LOC McCabe index: 1 number of parameters: 0 id: 33 unit: function mapOpenAIChatMessages() file: src/azurechat/features/chat/chat-services/cosmosdb/cosmosdb.ts start line: 55 end line: 64 size: 10 LOC McCabe index: 1 number of parameters: 1 id: 34 unit: export default function ListDeployments() file: src/azurechat/features/chat/chat-ui/chat-empty-state/chat-deployment-selector.tsx start line: 11 end line: 21 size: 10 LOC McCabe index: 1 number of parameters: 1 id: 35 unit: public async static Task GetAccessTokenAsync() file: src/dotnet/AzureAI.Proxy/OpenAIHandlers/OpenAIAccessToken.cs start line: 10 end line: 20 size: 10 LOC McCabe index: 1 number of parameters: 2 id: 36 unit: public OpenAIChargebackTransformProvider() file: src/dotnet/AzureAI.Proxy/ReverseProxy/OpenAIChargebackTransformProvider.cs start line: 26 end line: 37 size: 10 LOC McCabe index: 1 number of parameters: 3 id: 37 unit: public LogIngestionService() file: src/dotnet/AzureAI.Proxy/Services/LogIngestionService.cs start line: 17 end line: 27 size: 10 LOC McCabe index: 1 number of parameters: 3 id: 38 unit: partitionKey: await userHashedId() file: src/azurechat/features/chat/chat-services/chat-thread-service.ts start line: 47 end line: 58 size: 9 LOC McCabe index: 1 number of parameters: 0 id: 39 unit: export default function ListDepartments() file: src/azurechat/features/chat/chat-ui/chat-empty-state/chat-department-selector.tsx start line: 13 end line: 23 size: 9 LOC McCabe index: 1 number of parameters: 1 id: 40 unit: public static int GetTokensFromString() file: src/dotnet/AzureAI.Proxy/OpenAIHandlers/Tokens.cs start line: 9 end line: 18 size: 9 LOC McCabe index: 2 number of parameters: 2 id: 41 unit: async profile() file: src/azurechat/features/auth/auth-api.ts start line: 40 end line: 49 size: 8 LOC McCabe index: 2 number of parameters: 1 id: 42 unit: public static bool IsTokenExpired() file: src/dotnet/AzureAI.Proxy/OpenAIHandlers/OpenAIAccessToken.cs start line: 23 end line: 31 size: 8 LOC McCabe index: 1 number of parameters: 1 id: 43 unit: export default async function Home() file: src/azurechat/app/chat/page.tsx start line: 6 end line: 12 size: 7 LOC McCabe index: 1 number of parameters: 0 id: 44 unit: public static async getInstance() file: src/azurechat/features/common/cosmos.ts start line: 52 end line: 60 size: 7 LOC McCabe index: 2 number of parameters: 0 id: 45 unit: export async function GetDeployments() file: src/azurechat/features/common/appconfig.ts start line: 19 end line: 26 size: 7 LOC McCabe index: 1 number of parameters: 0 id: 46 unit: export async function GetDepartments() file: src/azurechat/features/common/appconfig.ts start line: 28 end line: 35 size: 7 LOC McCabe index: 1 number of parameters: 0 id: 47 unit: async profile() file: src/azurechat/features/auth/auth-api.ts start line: 18 end line: 24 size: 7 LOC McCabe index: 1 number of parameters: 1 id: 48 unit: initialMessages: transformCosmosToAIModel() file: src/azurechat/features/chat/chat-ui/chat-context.tsx start line: 79 end line: 85 size: 7 LOC McCabe index: 2 number of parameters: 1 id: 49 unit: await foreach() file: src/dotnet/AzureAI.Proxy.Client/Program.cs start line: 51 end line: 58 size: 7 LOC McCabe index: 3 number of parameters: 1 id: 50 unit: function dispatch() file: src/azurechat/components/ui/use-toast.ts start line: 134 end line: 139 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 51 unit: export async function GetSingleValue() file: src/azurechat/features/common/appconfig.ts start line: 37 end line: 43 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 52 unit: export async function GetAPIKey() file: src/azurechat/features/common/keyvault.ts start line: 16 end line: 21 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 53 unit: export async function GetKey() file: src/azurechat/features/common/keyvault.ts start line: 23 end line: 28 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 54 unit: action: reload ?() file: src/azurechat/features/global-message/global-message-context.tsx start line: 26 end line: 31 size: 6 LOC McCabe index: 2 number of parameters: 1 id: 55 unit: async jwt() file: src/azurechat/features/auth/auth-api.ts start line: 93 end line: 98 size: 6 LOC McCabe index: 2 number of parameters: 6 id: 56 unit: export async function initAad() file: src/azurechat/features/auth/helpers.ts start line: 50 end line: 57 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 57 unit: async onCompletion() file: src/azurechat/features/chat/chat-services/chat-api-simple.ts start line: 53 end line: 58 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 58 unit: await UpsertChat() file: src/azurechat/features/chat/chat-services/chat-service.ts start line: 58 end line: 63 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 59 unit: await UpsertChat() file: src/azurechat/features/chat/chat-services/chat-service.ts start line: 64 end line: 69 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 60 unit: onFinish: async() file: src/azurechat/features/chat/chat-ui/chat-context.tsx start line: 80 end line: 85 size: 6 LOC McCabe index: 2 number of parameters: 1 id: 61 unit: public ProxyConfiguration() file: src/dotnet/AzureAI.Proxy/ReverseProxy/ProxyConfiguration.cs start line: 14 end line: 20 size: 6 LOC McCabe index: 1 number of parameters: 1 id: 62 unit: constructor() file: src/azurechat/features/auth/helpers.ts start line: 43 end line: 47 size: 5 LOC McCabe index: 1 number of parameters: 0 id: 63 unit: async clear() file: src/azurechat/features/chat/chat-services/cosmosdb/cosmosdb.ts start line: 32 end line: 36 size: 5 LOC McCabe index: 1 number of parameters: 0 id: 64 unit: public RetryMiddleware() file: src/dotnet/AzureAI.Proxy/ReverseProxy/RetryMiddleware.cs start line: 10 end line: 14 size: 5 LOC McCabe index: 1 number of parameters: 2 id: 65 unit: public ManagedIdentityService() file: src/dotnet/AzureAI.Proxy/Services/ManagedIdentityService.cs start line: 12 end line: 16 size: 5 LOC McCabe index: 1 number of parameters: 2 id: 66 unit: public TokenCredential GetTokenCredential() file: src/dotnet/AzureAI.Proxy/Services/ManagedIdentityService.cs start line: 18 end line: 22 size: 5 LOC McCabe index: 1 number of parameters: 0 id: 67 unit: function genId() file: src/azurechat/components/ui/use-toast.ts start line: 28 end line: 31 size: 4 LOC McCabe index: 1 number of parameters: 0 id: 68 unit: export async function POST() file: src/azurechat/app/api/chat/route.ts start line: 3 end line: 6 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 69 unit: async session() file: src/azurechat/features/auth/auth-api.ts start line: 99 end line: 102 size: 4 LOC McCabe index: 1 number of parameters: 3 id: 70 unit: await fetcher() file: src/azurechat/features/chat/chat-services/azure-cog-search/azure-cog-vector-store.ts start line: 131 end line: 134 size: 4 LOC McCabe index: 1 number of parameters: 3 id: 71 unit: await fetcher() file: src/azurechat/features/chat/chat-services/azure-cog-search/azure-cog-vector-store.ts start line: 155 end line: 158 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 72 unit: await fetcher() file: src/azurechat/features/chat/chat-services/azure-cog-search/azure-cog-vector-store.ts start line: 240 end line: 243 size: 4 LOC McCabe index: 1 number of parameters: 3 id: 73 unit: content: CONTEXT_PROMPT() file: src/azurechat/features/chat/chat-services/chat-api-data.ts start line: 78 end line: 81 size: 4 LOC McCabe index: 1 number of parameters: 3 id: 74 unit: constructor() file: src/azurechat/features/chat/chat-services/cosmosdb/cosmosdb.ts start line: 22 end line: 25 size: 4 LOC McCabe index: 1 number of parameters: 2 id: 75 unit: async getMessages() file: src/azurechat/features/chat/chat-services/cosmosdb/cosmosdb.ts start line: 27 end line: 30 size: 4 LOC McCabe index: 1 number of parameters: 0 id: 76 unit: function() file: src/azurechat/features/chat/chat-ui/chat-speech/use-text-to-speech.ts start line: 67 end line: 70 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 77 unit: public static void Handle() file: src/dotnet/AzureAI.Proxy/OpenAIHandlers/Error.cs start line: 7 end line: 12 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 78 unit: public ThrottlingHealthPolicy() file: src/dotnet/AzureAI.Proxy/ReverseProxy/ThrottlingHealthPolicy.cs start line: 11 end line: 14 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 79 unit: private static int GetNumberHealthyEndpoints() file: src/dotnet/AzureAI.Proxy/ReverseProxy/RetryMiddleware.cs start line: 52 end line: 55 size: 4 LOC McCabe index: 1 number of parameters: 1 id: 80 unit: public async getContainer() file: src/azurechat/features/common/cosmos.ts start line: 62 end line: 64 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 81 unit: export function GetCredential() file: src/azurechat/features/common/managedIdentity.ts start line: 3 end line: 5 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 82 unit: value: await userHashedId() file: src/azurechat/features/chat/chat-services/chat-thread-service.ts start line: 36 end line: 38 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 83 unit: value: await userHashedId() file: src/azurechat/features/chat/chat-services/chat-thread-service.ts start line: 68 end line: 70 size: 3 LOC McCabe index: 1 number of parameters: 0 id: 84 unit: onSpeech() file: src/azurechat/features/chat/chat-ui/chat-context.tsx start line: 55 end line: 57 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 85 unit: function onError() file: src/azurechat/features/chat/chat-ui/chat-context.tsx start line: 110 end line: 112 size: 3 LOC McCabe index: 1 number of parameters: 1 id: 86 unit: export function cn() file: src/azurechat/lib/utils.ts start line: 4 end line: 6 size: 3 LOC McCabe index: 1 number of parameters: 1