LibreChat/client/src/hooks
Ruben Talstra 3a62a2633d
💵 feat: Add Automatic Balance Refill (#6452)
* 🚀 feat: Add automatic refill settings to balance schema

* 🚀 feat: Refactor balance feature to use global interface configuration

* 🚀 feat: Implement auto-refill functionality for balance management

* 🚀 feat: Enhance auto-refill logic and configuration for balance management

* 🚀 chore: Bump version to 0.7.74 in package.json and package-lock.json

* 🚀 chore: Bump version to 0.0.5 in package.json and package-lock.json

* 🚀 docs: Update comment for balance settings in librechat.example.yaml

* chore: space in `.env.example`

* 🚀 feat: Implement balance configuration loading and refactor related components

* 🚀 test: Refactor tests to use custom config for balance feature

* 🚀 fix: Update balance response handling in Transaction.js to use Balance model

* 🚀 test: Update AppService tests to include balance configuration in mock setup

* 🚀 test: Enhance AppService tests with complete balance configuration scenarios

* 🚀 refactor: Rename balanceConfig to balance and update related tests for clarity

* 🚀 refactor: Remove loadDefaultBalance and update balance handling in AppService

* 🚀 test: Update AppService tests to reflect new balance structure and defaults

* 🚀 test: Mock getCustomConfig in BaseClient tests to control balance configuration

* 🚀 test: Add get method to mockCache in OpenAIClient tests for improved cache handling

* 🚀 test: Mock getCustomConfig in OpenAIClient tests to control balance configuration

* 🚀 test: Remove mock for getCustomConfig in OpenAIClient tests to streamline configuration handling

* 🚀 fix: Update balance configuration reference in config.js for consistency

* refactor: Add getBalanceConfig function to retrieve balance configuration

* chore: Comment out example balance settings in librechat.example.yaml

* refactor: Replace getCustomConfig with getBalanceConfig for balance handling

* fix: tests

* refactor: Replace getBalanceConfig call with balance from request locals

* refactor: Update balance handling to use environment variables for configuration

* refactor: Replace getBalanceConfig calls with balance from request locals

* refactor: Simplify balance configuration logic in getBalanceConfig

---------

Co-authored-by: Danny Avila <danny@librechat.ai>
2025-03-21 17:48:11 -04:00
..
Agents 🚧 chore: merge latest dev build (#4288) 2024-09-30 17:17:57 -04:00
Artifacts 🚀 feat: Artifact Editing & Downloads (#5428) 2025-01-23 18:19:04 -05:00
Assistants 🌎 i18n: React-i18next & i18next Integration (#5720) 2025-02-09 12:05:31 -05:00
Audio 🏄‍♂️ refactor: Optimize Reasoning UI & Token Streaming (#5546) 2025-01-29 19:46:58 -05:00
Chat 🪄 feat: Agent Artifacts (#5804) 2025-02-11 18:00:38 -05:00
Config 🌎 i18n: React-i18next & i18next Integration (#5720) 2025-02-09 12:05:31 -05:00
Conversations ⚙️ refactor: Enhance Logging, Navigation And Error Handling (#5910) 2025-02-16 11:47:01 -05:00
Files ⚙️ fix: File Config Handling (revisited) (#5881) 2025-02-14 11:37:41 -05:00
Generic 🚧 WIP: Merge Dev Build (#4611) 2024-11-01 18:36:39 -04:00
Input 🔼 feat: Add Auto Submit For URL Query Params (#6440) 2025-03-21 12:00:18 -04:00
Messages 🌎 i18n: React-i18next & i18next Integration (#5720) 2025-02-09 12:05:31 -05:00
Nav 🔒 chore: bump katex package to patch CVE-2025-23207 (#5383) 2025-01-20 22:02:18 -05:00
Plugins 🎉 feat: Code Interpreter API and Agents Release (#4860) 2024-12-04 15:48:13 -05:00
Prompts 🌍 fix: Enhance i18n Support & Optimize Category Handling (#5866) 2025-02-14 08:30:27 -05:00
Roles 🔗 fix: Shared Link with Markdown Code Error (#6016) 2025-02-24 22:52:54 -05:00
SSE 💵 feat: Add Automatic Balance Refill (#6452) 2025-03-21 17:48:11 -04:00
ApiErrorBoundaryContext.tsx 🌎 i18n: React-i18next & i18next Integration (#5720) 2025-02-09 12:05:31 -05:00
AuthContext.tsx 🔒feat: Enable OpenID Auto-Redirect (#6066) 2025-03-19 09:51:56 -04:00
index.ts 🌎 i18n: React-i18next & i18next Integration (#5720) 2025-02-09 12:05:31 -05:00
ScreenshotContext.tsx 🚀 fix: Resolve Google Client Issues, CDN Screenshots, Update Models (#5703) 2025-02-06 18:13:18 -05:00
ThemeContext.tsx 🎨 style: Enhance UI/UX for Font Size, Mentions, and Prompts (#3575) 2024-08-08 10:02:30 -04:00
useDelayedRender.tsx 🕑 fix: Add Suspense to Connection Error Messages (#3074) 2024-06-15 16:16:06 -04:00
useDocumentTitle.ts refactor: Settings/Presets UI Restructure, convert many files to TS (#740) 2023-08-04 13:56:44 -04:00
useGenerationsByLatest.ts 🧹 chore: Remove Deprecated BingAI Code & Address Mobile Focus (#5565) 2025-01-30 17:22:29 -05:00
useLocalize.ts 🌍 fix: Enhance i18n Support & Optimize Category Handling (#5866) 2025-02-14 08:30:27 -05:00
useLocalStorage.tsx refactor: Encrypt & Expire User Provided Keys, feat: Rate Limiting (#874) 2023-09-06 10:46:27 -04:00
useMediaQuery.tsx refactor: Settings/Presets UI Restructure, convert many files to TS (#740) 2023-08-04 13:56:44 -04:00
useNewConvo.ts 💬 feat: Temporary Chats (#5493) 2025-02-06 11:11:47 -05:00
useOnClickOutside.ts WIP: Update UI to match Official Style; Vision and Assistants 👷🏽 (#1190) 2023-11-16 10:42:24 -05:00
useScrollToRef.ts feat: Optimize Scroll Handling with Intersection Observer (#3564) 2024-08-06 16:18:15 -04:00
useTimeout.tsx 🔧 fix: URL params, package mismatch, typing, shared link redirect, and o1 (azure) (#4899) 2024-12-07 16:55:17 -05:00
useToast.ts 🔥🚀 feat: CDN (Firebase) & feat: account section (#1438) 2023-12-29 21:42:19 -05:00