mirror of
https://github.com/ChatGPTNextWeb/ChatGPT-Next-Web.git
synced 2025-10-09 03:26:38 +08:00
1.为了解决缓存问题,更新了调用apikey使用额度接口的方法。由于nextjs的fetch默认会缓存同样参数的请求,需要针对fetch加入cache: 'no-store' 的参数修复以避免这一现象。(https://beta.nextjs.org/docs/data-fetching/fetching#dynamic-data-fetching) 2.为了提升用户体验,引入了usageStore,该存储库能够在有数据的情况下,优先使用缓存数据来加载apikey使用额度的信息。只有当重新检查的按钮被点击时,才会再次调用apikey使用额度接口更新usageStore数据,并且在页面上显示最新的更新数据。通过实现这种操作,我们能够避免在进入setting页面时频繁地调用apikey使用额度接口,从而进一步提升响应速度和用户体验。 |
||
---|---|---|
.. | ||
button.module.scss | ||
button.tsx | ||
chat-list.tsx | ||
chat.module.scss | ||
chat.tsx | ||
error.tsx | ||
home.module.scss | ||
home.tsx | ||
input-range.module.scss | ||
input-range.tsx | ||
markdown.tsx | ||
settings.module.scss | ||
settings.tsx | ||
ui-lib.module.scss | ||
ui-lib.tsx | ||
window.scss |