File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1238,7 +1238,7 @@ function App() {
12381238 </ div >
12391239
12401240 { /* User Statistics Summary */ }
1241- < div className = "grid grid-cols-2 md:grid-cols-4 gap-4 mb-6" >
1241+ < div className = "grid grid-cols-2 md:grid-cols-5 gap-4 mb-6" >
12421242 < div >
12431243 < div className = "text-sm text-muted-foreground" > Total Requests</ div >
12441244 < div className = "text-lg font-bold" > { userAnalysisData . totalRequests . toLocaleString ( ) } </ div >
@@ -1257,6 +1257,12 @@ function App() {
12571257 { userAnalysisData . exceedsFreeBudget ? 'Yes' : 'No' }
12581258 </ div >
12591259 </ div >
1260+ < div >
1261+ < div className = "text-sm text-muted-foreground" > Expected Cost (No Limit)</ div >
1262+ < div className = { `text-lg font-bold ${ userAnalysisData . expectedCostWithoutLimit > 0 ? 'text-orange-600' : 'text-green-600' } ` } >
1263+ ${ userAnalysisData . expectedCostWithoutLimit . toLocaleString ( undefined , { minimumFractionDigits : 2 , maximumFractionDigits : 2 } ) }
1264+ </ div >
1265+ </ div >
12601266 </ div >
12611267
12621268 { /* Weekly Breakdown */ }
@@ -1972,7 +1978,7 @@ function App() {
19721978 </ div >
19731979
19741980 { /* Bar Chart - Requests per Model per Day (Top 5 Models) */ }
1975- < div className = "flex justify-between items-center mb-2" >
1981+ < div className = "flex justify-between items-center mb-2 mt-8 " >
19761982 < h2 className = "text-2xl font-semibold" >
19771983 Requests per Model per Day (Top 5 Models)
19781984 { selectedSearchUser && (
Original file line number Diff line number Diff line change @@ -200,8 +200,6 @@ export function getModelUsageSummary(data: CopilotUsageData[]): ModelUsageSummar
200200 const multiplier = getModelMultiplier ( item . model ) ;
201201 const displayName = isDefaultModel ( item . model ) ? 'Default' : item . model ;
202202
203- console . log ( `Processing model: ${ item . model } ; Multiplier: ${ multiplier } ; Display Name: ${ displayName } ` ) ;
204-
205203 summary [ item . model ] = {
206204 model : item . model ,
207205 displayName,
@@ -942,6 +940,7 @@ export interface UserAnalysisData {
942940 compliantRequests : number ;
943941 exceedingRequests : number ;
944942 exceedsFreeBudget : boolean ;
943+ expectedCostWithoutLimit : number ;
945944 uniqueModels : string [ ] ;
946945 weeklyBreakdown : UserWeeklyData [ ] ;
947946 dailyAverage : number ;
@@ -1147,6 +1146,7 @@ export function getUserAnalysisData(data: CopilotUsageData[], username: string):
11471146 . filter ( item => item . exceedsQuota )
11481147 . reduce ( ( sum , item ) => sum + item . requestsUsed , 0 ) ;
11491148 const exceedsFreeBudget = exceedingRequests > 0 ;
1149+ const expectedCostWithoutLimit = getExpectedExcessCost ( userData ) ;
11501150 const uniqueModels = Array . from ( new Set ( userData . map ( item => item . model ) ) ) ;
11511151
11521152 // Calculate date range
@@ -1215,6 +1215,7 @@ export function getUserAnalysisData(data: CopilotUsageData[], username: string):
12151215 compliantRequests,
12161216 exceedingRequests,
12171217 exceedsFreeBudget,
1218+ expectedCostWithoutLimit,
12181219 uniqueModels,
12191220 weeklyBreakdown,
12201221 dailyAverage,
You can’t perform that action at this time.
0 commit comments