@@ -31,7 +31,7 @@ export const ManagedAgentsConsumption: FC<ManagedAgentsConsumptionProps> = ({
31
31
endDate,
32
32
enabled = true ,
33
33
} ) => {
34
- // If feature is disabled, show disabled state
34
+
35
35
if ( ! enabled ) {
36
36
return (
37
37
< div css = { styles . disabledRoot } >
@@ -52,7 +52,6 @@ export const ManagedAgentsConsumption: FC<ManagedAgentsConsumptionProps> = ({
52
52
) ;
53
53
}
54
54
55
- // Calculate percentages for the progress bar
56
55
const usagePercentage = Math . min ( ( usage / limit ) * 100 , 100 ) ;
57
56
const includedPercentage = Math . min ( ( included / limit ) * 100 , 100 ) ;
58
57
const remainingPercentage = Math . max ( 100 - includedPercentage , 0 ) ;
@@ -88,16 +87,15 @@ export const ManagedAgentsConsumption: FC<ManagedAgentsConsumptionProps> = ({
88
87
` }
89
88
>
90
89
< p >
91
- Managed agents are counted based on active agent connections during the billing period.
92
- Each unique agent that connects to your deployment consumes one managed agent seat.
90
+ Managed agents are counted based on the amount of started workspaces with an AI agent.
93
91
</ p >
94
92
< ul >
95
93
< li className = "flex items-center gap-2" >
96
94
< div
97
95
className = "rounded-[2px] bg-highlight-green size-3 inline-block"
98
96
aria-label = "Legend for current usage in the chart"
99
97
/>
100
- Current usage represents active managed agents during this period .
98
+ Amount of started workspaces with an AI agent .
101
99
</ li >
102
100
< li className = "flex items-center gap-2" >
103
101
< div
@@ -113,50 +111,25 @@ export const ManagedAgentsConsumption: FC<ManagedAgentsConsumptionProps> = ({
113
111
>
114
112
< div className = "w-full border-b-1 border-t-1 border-dashed border-content-disabled" />
115
113
</ div >
116
- Total limit including any additional purchased capacity .
114
+ Total limit after which the feature will be disabled .
117
115
</ li >
118
116
</ ul >
119
- < div >
120
- You might also check:
121
- < ul >
122
- < li >
123
- < Link asChild >
124
- < RouterLink to = "/deployment/overview" >
125
- Deployment overview
126
- </ RouterLink >
127
- </ Link >
128
- </ li >
129
- < li >
130
- < Link
131
- href = { docs ( "/admin/managed-agents" ) }
132
- target = "_blank"
133
- rel = "noreferrer"
134
- >
135
- More details on managed agents
136
- </ Link >
137
- </ li >
138
- </ ul >
139
- </ div >
140
117
</ CollapsibleContent >
141
118
</ Collapsible >
142
119
</ div >
143
120
144
121
< div className = "p-6 border-0 border-t border-solid" >
145
- { /* Date range */ }
146
122
< div className = "flex justify-between text-sm text-content-secondary mb-4" >
147
123
< span > { startDate ? dayjs ( startDate ) . format ( "MMMM D, YYYY" ) : "" } </ span >
148
124
< span > { endDate ? dayjs ( endDate ) . format ( "MMMM D, YYYY" ) : "" } </ span >
149
125
</ div >
150
126
151
- { /* Progress bar container */ }
152
127
< div className = "relative h-6 bg-surface-secondary rounded overflow-hidden" >
153
- { /* Usage bar (green) */ }
154
128
< div
155
129
className = "absolute top-0 left-0 h-full bg-highlight-green transition-all duration-300"
156
130
style = { { width : `${ usagePercentage } %` } }
157
131
/>
158
132
159
- { /* Included allowance background (darker) */ }
160
133
< div
161
134
className = "absolute top-0 h-full bg-content-disabled opacity-30"
162
135
style = { {
@@ -166,16 +139,20 @@ export const ManagedAgentsConsumption: FC<ManagedAgentsConsumptionProps> = ({
166
139
/>
167
140
</ div >
168
141
169
- { /* Labels */ }
170
- < div className = "flex justify-between mt-4 text-sm" >
142
+ < div className = "relative flex justify-between mt-4 text-sm" >
171
143
< div className = "flex flex-col items-start" >
172
- < span className = "text-content-secondary" > Usage :</ span >
144
+ < span className = "text-content-secondary" > Actual :</ span >
173
145
< span className = "font-medium" > { usage . toLocaleString ( ) } </ span >
174
146
</ div >
175
- < div className = "flex flex-col items-center" >
147
+
148
+ < div
149
+ className = "absolute flex flex-col items-center transform -translate-x-1/2"
150
+ style = { { left : `${ Math . max ( Math . min ( includedPercentage , 90 ) , 10 ) } %` } }
151
+ >
176
152
< span className = "text-content-secondary" > Included:</ span >
177
153
< span className = "font-medium" > { included . toLocaleString ( ) } </ span >
178
154
</ div >
155
+
179
156
< div className = "flex flex-col items-end" >
180
157
< span className = "text-content-secondary" > Limit:</ span >
181
158
< span className = "font-medium" > { limit . toLocaleString ( ) } </ span >
0 commit comments