Commit ad91c38
Mcowger/virtual provider (#1487)
* Initial selection and settings.
* Add usage tracker class, getModel and createMessage passthroughs
* Fix uneeded import
* Confirmed changing active handler.
* consumption tracking
* removing debugging statements.
* Working rollovers.
* Fix unused import
* Add use of feature flag
* Unused import
* Write and commit tests
* Update extension state test.
* Add changeset
* refactor: pre-code review cleanup for virtual provider
- Fix typo in provider-settings.ts comment (defintition -> definition)
- Remove debug console logging from virtual.ts (11 statements)
- Replace 'any' type with proper 'Event' type in Virtual.tsx
- Improve type safety and code cleanliness
* refactor: remove virtualQuotaFallbackProvider experiment
The virtualQuotaFallbackProvider experiment has been removed. The functionality is now always available and no longer controlled by an experiment flag.
This commit removes all references to `virtualQuotaFallbackProvider` from experiment definitions, configurations, and related tests. The `ApiOptions` component in the webview UI has been updated to reflect that the virtual quota fallback provider is always available.
* Final cleanup changes
* refactor(virtual-quota-fallback): Rename providers to profiles
Renames all instances of "provider" to "profile" within the virtual quota fallback system. This includes:
- Renaming `providers` array to `profiles` in configuration and types.
- Updating variable names like `providerId` to `profileId` and `providerLimits` to `profileLimits`.
- Adjusting related test cases and internal logic to reflect the new terminology.
This change improves clarity and consistency by aligning the terminology with the concept of managing API profiles rather than generic providers.
* refactor(ui): streamline profile manipulation in virtual quota fallback
Refactor `VirtualQuotaFallbackProvider` to introduce a `swapProfiles` utility function. This change simplifies the `moveProfileUp` and `moveProfileDown` callbacks by abstracting the profile array manipulation logic. Also, removed redundant comments to improve code readability.
* final
* Fix strings provider -> profile
---------
Co-authored-by: Chris Hasson <[email protected]>1 parent 6f5c825 commit ad91c38
File tree
59 files changed
+1919
-47
lines changed- .changeset
- apps/storybook/stories
- packages/types/src
- src
- api
- providers
- __tests__
- core
- config
- webview
- utils
- webview-ui/src
- components/settings
- providers
- i18n/locales
- ar
- ca
- cs
- de
- en
- es
- fr
- hi
- id
- it
- ja
- ko
- nl
- pl
- pt-BR
- ru
- th
- tr
- uk
- vi
- zh-CN
- zh-TW
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
59 files changed
+1919
-47
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
Lines changed: 137 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
239 | 240 | | |
240 | 241 | | |
241 | 242 | | |
242 | | - | |
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
248 | 247 | | |
249 | 248 | | |
250 | 249 | | |
251 | 250 | | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
252 | 268 | | |
253 | 269 | | |
254 | 270 | | |
| |||
282 | 298 | | |
283 | 299 | | |
284 | 300 | | |
| 301 | + | |
285 | 302 | | |
286 | 303 | | |
287 | 304 | | |
| |||
314 | 331 | | |
315 | 332 | | |
316 | 333 | | |
| 334 | + | |
317 | 335 | | |
318 | 336 | | |
319 | 337 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
| 32 | + | |
32 | 33 | | |
33 | 34 | | |
34 | 35 | | |
| |||
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| 118 | + | |
| 119 | + | |
117 | 120 | | |
118 | 121 | | |
119 | 122 | | |
| |||
0 commit comments