- Cache initial config using useRef to prevent repeated loadConfig() calls - Fix useEffect dependencies to only trigger on actual config changes - Modify debouncedSaveConfig dependency from function reference to actual config values - Update handleConfigReset to use DEFAULT_CONFIG directly instead of reloading - Prevent excessive console logging during chat interactions and frequent re-renders This resolves the issue where console was flooded with: "配置已从本地存储加载" and "配置已保存到本地存储" messages, especially during active chat sessions where logs appeared every second. Fixes: Frequent config load/save operations causing performance issues
React Template
Basic Usages
# Runs the app in the development mode
npm start
# Builds the app for production to the `build` folder
npm run build
If you want to change the default server, please set REACT_APP_SERVER environment variables before build,
for example: REACT_APP_SERVER=http://your.domain.com.
Before you start editing, make sure your Actions on Save options have Optimize imports & Run Prettier enabled.