Skip to content

Releases: bentwnghk/lobe-chat

v1.0.0

01 Jan 08:41
Compare
Choose a tag to compare

Version 1.0.0

Released on 2024-01-01

♻ Code Refactoring

  • agent-market: Refactor desktop and mobile to improve mobile performance.
  • layout: Refactor layout, Refactor settings layout, Refactor ssc layout.
  • migration: Next.js app router.
  • plugin: 重构 plugin Store 组织结构,便于开发与迭代维护.
  • share: Use modern-screenshot.
  • misc: Fefactor index url fetch, GetStaticPaths, mirgrate openai-edge to openai, move component folder, move dir from page to app and remove .page suffix, move the conversation and chatInput to features folder, refactor / route to reduce page js size, refactor AgentSettings, refactor and clean global store and chat store, Refactor antd locale file to useSWR, refactor chain, Refactor ChatList, Refactor ChatList onActionsClick, refactor global and share service, Refactor Image components, refactor OpenAIStreamPayload with chat name, refactor plugin api with @lobehub/chat-plugins-gateway, refactor plugin dev modal and improve plugin store, refactor plugin request, Refactor settings page and mobile ux, refactor settings page entry, refactor settingsSelectors to globalSelectors, refactor the api router to app route handlers, refactor the ChatMessage type, refactor the input area to suit the files upload feature, refactor the selectors import, refactor the settings layout to rsc, refactor to ChatErrorType, refactor with new market index url, refactor with new market url, refactor with new plugin implement with dexie db, refactor with OpenAPIConvertor, refactor zustand usage with v4.4, remove langchain, remove no need i18n, Replace cdn, Simplify index page component and remove internationalization configuration, Update configurations, remove unused files, and adjust components and selectors, Use hook to check PWA env, 优化 edit 代码结构, 优化 Inbox 会话的实现逻辑, 优化 plugin 文件夹命名以支持 standalone 类型的插件, 优化 setting Layout 实现, 优化代码, 优化新会话的创建逻辑 session, 将 chat 中的功能模型拆分到 features 中, 将 message reducer 提取到独立文件夹中, 将 sessionStore 默认 equalFn 改为 shallow, 将 settingStore 默认 equalFn 改为 shallow, 将 useSettings 更名为 useGlobalStore, 将原本的 settings 更名为 global, 将网关实现代码集成进 Chat 本体, 抽取插件为独立 store, 收敛切换 SideBar 方法为 useSwitchSideBarOnInit, 清理无用代码实现, 重构 openai 接口调用逻辑,将插件 schema 开启关闭逻辑与接口解耦, 重构 organizeChats 方法, 重构 selector 文件组织, 重构 session 相关实现,移除循环依赖, 重构 settings store 代码写法, 重构 settings 相关类型, 重构优化 hydrated 的判断逻辑, 重构优化 selectors 实现, 重构并优化文档抓取插件能力, 重构插件列表获取逻辑,进而完全移除 plugins 目录, 重构需本地缓存的状态为 preference.

✨ Features

  • agent-card: Add and modify features for agent card.
  • conversation: Add history range divider.
  • hotkeys: Compatible with SSR, display platform specific key.
  • i18n: Add i18next and lobe-i18n internationalization configuration files and update dependencies.
  • issue-template: Add templates for Bug Report, Feature Request, and Help Wanted.
  • locale: Add es-ES pt-BR de-DE tr-TR, Add fr-FR.
  • market: Add prompt token count.
  • plugin-dev: 优化 manifest 报错原因提示,并支持 id 从 manifest 自动获取.
  • share: Add screenshot.
  • sidebar: Add DraggablePanelContainer and adjust layout and styling, Add import functionality and set labels and onClick functions.
  • wip: Add setting page.
  • misc: support password auth and error, support sharing to shareGPT, Add BackToBottom to conversation, Add Welcome page, Add agent settings functionality, Add agent settings functionality, new components, and features for AgentMeta, Add agent share, Add agents market and improve UI components, Add and modify settings page, update Header styles, and improve useTranslation hook, Add and modify translations for various keys in JSON code files, Add and refactor components for chat input feature, Add and update UI elements and agent configuration, Add avatar compress, add Environment Variable for custom model name when deploying, Add fallback language, modify React suspense settings, enable strict mode, and update dependencies, Add Footer component and modify Token and index files, Add functions for generating and analyzing JSON files, generating resource files and table of contents, and formatting console output, Add hotkeys, Add i18n auto flow pnpm run i18n, Add import statement and define CSS styles for Avatar component, Add ja_JP, ko_KR and update workflow, Add Lazyload, Add mobile responsiveness, create new component, modify properties, make API calls, Add new components and features for AgentMeta, Add new components, modify import statements, and update CSS styles, Add new dependency, add Tag and PluginTag components, update HeaderTitle, Add new features and improve user experience, Add new features and improve user interface and functionality, Add new features, update URLs, customize appearance, and implement components, Add new files, modify components, and adjust layout and styling, Add new import statement and update module.exports in .i18nrc.js, Add new import statement for "Flexbox" component in "Empty" component, Add new settings for Azure OpenAI and OpenAI in locales files, Add new string, create AgentModal component, implement GridCardItem and Loading components, import AgentModal, Add new translations, update existing translations, add functionality to components, modify styling, and adjust placeholder text, add open new topic when open a topic, add openai server api, add plugin market Setting Modal, Add russian localy, Add russian localy, add several analytics sdk, Add SideBar component, new actions, and update market store state and selectors, Add SliderWithInput component, Add styles and modify layout of FolderPanel, SliderWithInput, SessionList, EditPage, ChatLayout, and SettingLayout components, Add topic empty, Add translations and new setting to "setting.json", agent profile, auto create topic when chatting, ChatList 支持操作行为, Dynamically import components using "dynamic" function, hide the password form item in the settings when there is no ACCESS_CODE env, implement responsive design for mobile devices, Implement settings and configuration functionality, Import and use constants from "meta.ts" instead of "agentConfig", Import SiOpenai icon and replace 'Tag' component in chat feature, Improve functionality and user interface of market page, Improve organization and functionality of settings and configuration features, improve pin mode about session group, Improve user experience and ensure consistency, Introduce FOLDER_WIDTH constant and update components, Introduce new features and styles for chat application, introduce plugin detail modal, introducing plugin store and refactor with tool concept, Local TTS Player, migrate localStorage to indexedDB, Modify market features components and update CSS styles, platform check utils, plugin default use iframe render, refactor the persist layer from zustand's persist to dexie ORM, refactor to url state, standalone pluginn can get more arguments on init, support add agent to chat, support Azure OpenAI, Support Azure OpenAI Deploy env, Support custom deletion, addition, and renaming of models, support custom model name, support Dall·E 3, support detect new version and upgrade action, support docker deploy, support function call at message end, support latest openai model, support markdown type plugin, support multi-language translate, support OpenAI plugin manifest, support OpenAI tool calls, support OpenAPI Authentication, support OpenAPI schema in lobe plugin, support parse openapi schema, support plugin settings env, support plugin settings modal, support plugin state and settings, support the auto create topic configuration, support translate message to current language, support TTS & STT, support upload images to chat with gpt4-vision model, support using env variable to set regions for OpenAI Edge Functions., supports setting multiple access code, Update icons and text in various components, Update localization files and add translations for different languages, Update localization paths, add new files, settings, descriptions, generate TOC, modify imports/exports, define types, Update messages, settings, error codes, plugin names, weather data display, and UI, Update Russian and English localy (LLM tab), Update styling and functionality of AgentPrompt and EditableMessage components, upgrade locale with SSR, use new plugin manifest to support plugin’s multi api, 优化 Agent 实现,支持自动补全, 优化 SideBar 实现,激活态指示更加明确, 优化保存为话题功能, 优化插件模式下的用户体验, 优化搜索引擎插件交互展示, 优化每个角色的初始引导, 优化设置页, 初步完成插件市场动态加载全链路, 增加不同模型, 增加自定义插件的增删改配置功能, 完善插件请求的错误处理, 完善自定义插件表单的校验逻辑, 完成自动添加 meta 的能力, 实现 session 导入功能, 实现 Topic 重命名功能, 实现优化重发请求功能, 实现会话展示模式切换,并优化默认创建角色的配置, 实现单个会话和角色的导出功能, 实现插件组件的动态加载, 实现清空所有会话消息, 实现自定义历史消息数功能, 实现话题删除功能, 实现话题模块, 实现配置导出功能, 展示模型类型, 支持 inbox 消息导出, 支持 inbox 的会话功能, 支持 pwa 模式, 支持会话置顶, 支持使用全局助手的设置作为默认助手的创建角色, 支持使用自定义 OpenAI Key, 支持修改与记录插件的配置, 支持停止生成消息, 支持切换语言, 支持发送插件配置信息, 支持复制与编辑会话消息, 支持多轮的插件意图识别, 支持展示 token 使用量, 支持展示插件插件状态, 支持展示来自模型的标记信息, 支持快捷配置模型、温度, 支持快速刷新与预览 manifest, 支持持久化隐藏 Topic 功能, 支持插件 i18n 模式展示, 支持插件 manifest 加载失败后重试, 支持插件列表 与 基于 Serpapi 的搜索引擎插件, 支持本地插件侧的请求与错误呈现, 支持本地插件自定义 gateway, 支持查询天气, 支持模型设置, 支持渲染 manifest 中的 settings, 支持缓存角色面板的展开折叠状态, 支持网页抓取, 支持自动跳转到第一条会话, 支持自定义 OpenAI 代理地址, 支持设置不正确时进行插件的配置, 支持超过4k的会话使用 16k 总结标题, 支持输入模板预处理, 支持选择 Emoji, 数据结构层完成 topic 模型改造, 新增 inbox 数据模型, 新增 inbox 模块入口, 新增插件请求状态的错误处理, 新增插件配置 Dev 弹窗, 新增自动滚动, 绑定本地插件的增删改逻辑, 补充 token 详情, 表单配置支持设定各项高级参数, 适配插件 i18n 方案.

🐛 Bug Fixes

  • docker: Improve config to reduce unnecessary env and change default PORT.
  • plugin-dev: 修正编辑模式下预览展示问题和 id 重复校验问题.
  • plugin: Fix plugin can't get settings from lobe-chat, 修正开启插件后会话无效的问题.
  • settings: Fix settings route.
  • vercel: Fix deploy.
  • misc: Add apikey form when there is no default api key in env, add cancel button text i18n for delete assistant modal, add deps, add some env to Dockerfile, Agent details sidebar and market page height overflow, Change topic-deletion hotkey, ChatInput should have maxHeight, clean up gpt-3.5 model, fallback agent market index to en when not find correct locale, ...
Read more