Skip to content

Commit

Permalink
refactor: refactor zustand to improve performance
Browse files Browse the repository at this point in the history
  • Loading branch information
Peek-A-Booo committed Jul 23, 2023
1 parent b5ba0ee commit 2582586
Show file tree
Hide file tree
Showing 308 changed files with 9,382 additions and 18,490 deletions.
19 changes: 19 additions & 0 deletions CHANGE_LOG.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# L-GPT Change Log

## v0.8.0

> 2023-07-23
### Add

- Added the introduction of @ltopx/lx-ui component library to further unify the global style.

### Fixed

- Fixed the problem of incorrect deduction of fees under different models (previously, a lot of fees were deducted).

### Changed

- Remove @vercel/analytics
- Remove sentry
- Temporarily remove prompt market, refactor and go online before next weekend
- Refactor most of the logic related to zustand status, greatly reduce the number of renders, and improve the overall performance.

## v0.7.4

> 2023-07-04
Expand Down
19 changes: 19 additions & 0 deletions CHANGE_LOG.zh_CN.md
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# L-GPT 更新日志

## v0.8.0

> 2023-07-23
### 新增

- 新增引入 @ltopx/lx-ui 组件库,进一步统一全局风格样式

### 修复

- 修复不同模型下费用扣除不正确的问题(之前少扣了不少费用)

### 调整

- 移除 @vercel/analytics
- 移除 sentry
- 暂时移除 prompt market,下周末之前重构好上线
- 重构 zustand 状态相关的大部分逻辑,极大的减少 render 次数,提升整体性能

## v0.7.4

> 2023-07-04
Expand Down
Empty file modified LICENSE
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion README.md
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ English / [简体中文](./README_CN.md)

Help Documentation https://docs.ltopx.com

L-GPT is an open-source project that integrates various large language models' open APIs to provide users with highly aggregated and helpful AI services. It not only supports basic conversation functions but will also support more features such as text-to-speech, speech input, file parsing, plugins, etc. in the future. It can improve learning, work, and life efficiency in many ways. [Demo](https://chat.ltopx.com)
L-GPT is an open-source project that integrates various large language models' open APIs to provide users with highly aggregated and helpful AI services. It not only supports basic conversation functions but will also support more features such as text-to-speech, speech input, file parsing, plugins, etc. in the future. It can improve learning, work, and life efficiency in many ways. [Demo](https://gpt.ltopx.com)

Welcome to:[Telegram](https://t.me/+7fLJJoGV_bJhYTk1)

Expand Down
Empty file modified README_CN.md
100644 → 100755
Empty file.
114 changes: 114 additions & 0 deletions lx-ui-preset.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
// lx-ui tailwindcss preset
module.exports = {
theme: {
extend: {
backgroundColor: {
"lx-color-fill-2": "rgb(242,243,245)",
"lx-color-fill-2-dark": "hsla(0,0%,100%,0.08)",
"lx-color-fill-3": "rgb(229,230,235)",
"lx-color-fill-3-dark": "hsla(0,0%,100%,0.12)",
"lx-color-fill-4-dark": "hsla(0,0%,100%,0.16)",
},
colors: {
"lx-color-text-1": "#1D2129",
"lx-color-text-1-dark": "hsla(0,0%,100%,0.9)",
"lx-color-text-3": "#86909C",
"lx-color-text-4": "#C9CDD4",
"lx-color-text-4-dark": "hsla(0,0%,100%,0.3)",
"lx-color-border-3-dark": "hsla(0,0%,100%,0.12)",
},
keyframes: {
"lx-select-open": {
"0%": { transform: "translate3d(0,-10%,0)", opacity: "0" },
"100%": { transform: "translateZ(0)", opacity: "1" },
},
"lx-select-closed": {
"0%": { transform: "translateZ(0)", opacity: "1" },
"100%": { transform: "translate3d(0,-10%,0)", opacity: "0" },
},
"lx-dropdown-open-top": {
"0%": { transform: "translate3d(0,10%,0)", opacity: "0" },
"100%": { transform: "translateZ(0)", opacity: "1" },
},
"lx-dropdown-open-down": {
"0%": { transform: "translate3d(0,-10%,0)", opacity: "0" },
"100%": { transform: "translateZ(0)", opacity: "1" },
},
"lx-fade-in": {
"0%": { opacity: "0" },
"100%": { opacity: "1" },
},
"lx-fade-out": {
"0%": { opacity: "1" },
"100%": { opacity: "0" },
},
"lx-modal-fade-in-up": {
"0%": {
transform: "translateX(-50%) translateY(-50%) translate3d(0,8%,0)",
opacity: "0",
},
"100%": {
transform: "translateX(-50%) translateY(-50%) translateZ(0)",
opacity: "1",
},
},
"lx-modal-fade-out-down": {
"0%": {
transform: "translateX(-50%) translateY(-50%) translateZ(0)",
opacity: "1",
},
"100%": {
transform: "translateX(-50%) translateY(-50%) translate3d(0,8%,0)",
opacity: "0",
},
},
"lx-dialog-show-left": {
"0%": { transform: "translate3d(-100%,0,0)", opacity: "0.8" },
"100%": { transform: "translateZ(0)", opacity: "1" },
},
"lx-dialog-hide-left": {
"0%": { transform: "translateZ(0)", opacity: "1" },
"100%": { transform: "translate3d(-100%,0,0)", opacity: "0.8" },
},
"lx-dialog-show-right": {
"0%": { transform: "translate3d(100%,0,0)", opacity: "0.8" },
"100%": { transform: "translateZ(0)", opacity: "1" },
},
"lx-dialog-hide-right": {
"0%": { transform: "translateZ(0)", opacity: "1" },
"100%": { transform: "translate3d(100%,0,0)", opacity: "0.8" },
},
"lx-accordion-down": {
from: { height: 0 },
to: { height: "var(--radix-accordion-content-height)" },
},
"lx-accordion-up": {
from: { height: "var(--radix-accordion-content-height)" },
to: { height: 0 },
},
},
animation: {
"lx-select-open": "lx-select-open 0.2s ease-in-out",
"lx-select-closed": "lx-select-closed 0.2s ease-in-out",
"lx-dropdown-open-top": "lx-dropdown-open-top 0.2s ease-in-out",
"lx-dropdown-open-down": "lx-dropdown-open-down 0.2s ease-in-out",
"lx-fade-in": "lx-fade-in 0.2s ease-in-out",
"lx-fade-out": "lx-fade-out 0.2s ease-in-out",
"lx-modal-fade-in-up": "lx-modal-fade-in-up 0.2s ease-in-out",
"lx-modal-fade-out-down": "lx-modal-fade-out-down 0.2s ease-in-out",
"lx-dialog-show-left":
"lx-dialog-show-left 0.3s cubic-bezier(0.19, 1, 0.22, 1)",
"lx-dialog-hide-left":
"lx-dialog-hide-left 0.3s cubic-bezier(0.19, 1, 0.22, 1)",
"lx-dialog-show-right":
"lx-dialog-show-right 0.3s cubic-bezier(0.19, 1, 0.22, 1)",
"lx-dialog-hide-right":
"lx-dialog-hide-right 0.3s cubic-bezier(0.19, 1, 0.22, 1)",
"lx-accordion-down":
"lx-accordion-down 300ms cubic-bezier(0.87, 0, 0.13, 1)",
"lx-accordion-up":
"lx-accordion-up 300ms cubic-bezier(0.87, 0, 0.13, 1)",
},
},
},
};
12 changes: 0 additions & 12 deletions next.config.js
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
// This file sets a custom webpack configuration to use your Next.js app
// with Sentry.
// https://nextjs.org/docs/api-reference/next.config.js/introduction
// https://docs.sentry.io/platforms/javascript/guides/nextjs/manual-setup/
const { withSentryConfig } = require("@sentry/nextjs");

/** @type {import('next').NextConfig} */
const nextConfig = {
webpack(config, { isServer }) {
Expand Down Expand Up @@ -32,9 +26,3 @@ const nextConfig = {
};

module.exports = nextConfig;

module.exports = withSentryConfig(
module.exports,
{ silent: true },
{ hideSourceMaps: true }
);
Loading

1 comment on commit 2582586

@vercel
Copy link

@vercel vercel bot commented on 2582586 Jul 23, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.