Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
bentwnghk committed Jan 19, 2024
2 parents f369035 + afc2e13 commit cd462e2
Show file tree
Hide file tree
Showing 18 changed files with 90 additions and 82 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,14 @@ Our marketplace is not just a showcase platform but also a collaborative space.
<!-- AGENT LIST -->

| Recent Submits | Description |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AE Script Development Expert](https://chat-preview.lobehub.com/market?agent=ae-script-development)<br/><sup>By **[Wutpeach](https://github.com/Wutpeach)** on **2024-01-18**</sup> | An expert in AE script development, proficient in JavaScript programming, understanding of AE software principles, capable of debugging and optimizing scripts.<br/>`script-development` `programmer` `adobe-after-effects` `java-script` `algorithm-design` `debugging` `optimization` `coding-standards` `user-communication` `script-usage-instructions` |
| [Code Companion](https://chat-preview.lobehub.com/market?agent=code-companion)<br/><sup>By **[110rever](https://github.com/110rever)** on **2024-01-18**</sup> | The best companion for programmers<br/>`code` `dev` `program` |
| [William](https://chat-preview.lobehub.com/market?agent=unreal-engine-development-engineer)<br/><sup>By **[Wutpeach](https://github.com/Wutpeach)** on **2024-01-16**</sup> | Unreal Engine expert, proficient in C++ programming, rendering, memory, thread and other pipeline architectures, UE application on Android platform, comprehensive artistic cognition, familiar with Shader writing, proficient in 3D art asset production process and tools.<br/>`unreal-engine` `c-programming` `rendering-pipeline` `memory-management` `thread-architecture` |
| [Chad](https://chat-preview.lobehub.com/market?agent=chad)<br/><sup>By **[HerIsDia](https://github.com/HerIsDia)** on **2024-01-15**</sup> | Just chad<br/>`humor` `funny` |

> 📊 Total agents: [<kbd>**101**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
| Recent Submits | Description |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PromptGPT](https://chat-preview.lobehub.com/market?agent=prompt-gpt)<br/><sup>By **[110rever](https://github.com/110rever)** on **2024-01-19**</sup> | A customized GPT model named PromptGPT. My aim is to generate high-performance prompts based on the topics input by users.<br/>`generation` `artificial-intelligence` `interaction` `customized-experience` `feedback-mechanism` `best-practices` `step-by-step-guidance` `language-flexibility` `boundaries` |
| [Tech Explorer AI](https://chat-preview.lobehub.com/market?agent=tech-explorer-ai)<br/><sup>By **[110rever](https://github.com/110rever)** on **2024-01-19**</sup> | Technology exploration AI capability: - Conduct comprehensive technical research - Provide predictive insights based on statistical data and trend analysis - Optimize research methodology - Maintain data accuracy and completeness - Infer limitations in the absence of complete data: - Only answer questions related to technology - Do not provide general purchasing advice - Provide product technology discussion through step-by-step guidance User interaction: - Provide clear and concise dialogue - Provide multilingual options Support objective: To provide accurate information and analyze predictions to deepen the understanding of technology among users.<br/>`technical-research` `data-analysis` `research-methods` `data-accuracy` `inference` `user-interaction` |
| [AE Script Development Expert](https://chat-preview.lobehub.com/market?agent=ae-script-development)<br/><sup>By **[Wutpeach](https://github.com/Wutpeach)** on **2024-01-18**</sup> | An expert in AE script development, proficient in JavaScript programming, understanding of AE software principles, capable of debugging and optimizing scripts.<br/>`script-development` `programmer` `adobe-after-effects` `java-script` `algorithm-design` `debugging` `optimization` `coding-standards` `user-communication` `script-usage-instructions` |
| [Code Companion](https://chat-preview.lobehub.com/market?agent=code-companion)<br/><sup>By **[110rever](https://github.com/110rever)** on **2024-01-18**</sup> | The best companion for programmers<br/>`code` `dev` `program` |

> 📊 Total agents: [<kbd>**103**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
<!-- AGENT LIST -->

Expand Down
16 changes: 8 additions & 8 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -203,14 +203,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
<!-- AGENT LIST -->

| 最近新增 | 助手说明 |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [AE 脚本开发专家](https://chat-preview.lobehub.com/market?agent=ae-script-development)<br/><sup>By **[Wutpeach](https://github.com/Wutpeach)** on **2024-01-18**</sup> | AE 脚本开发专家,精通 JavaScript 编程,理解 AE 软件工作原理,能够调试和优化脚本。<br/>`脚本开发` `程序员` `adobe-after-effects` `java-script` `算法设计` `调试` `优化` `编程规范` `用户沟通` `脚本使用说明` |
| [Code Companion](https://chat-preview.lobehub.com/market?agent=code-companion)<br/><sup>By **[110rever](https://github.com/110rever)** on **2024-01-18**</sup> | 程序员的最佳伴侣<br/>`code` `dev` `program` |
| [William](https://chat-preview.lobehub.com/market?agent=unreal-engine-development-engineer)<br/><sup>By **[Wutpeach](https://github.com/Wutpeach)** on **2024-01-16**</sup> | 虚幻引擎专家,精通 C++ 编程,渲染、内存、线程等管线架构,UE 在安卓平台应用,全面的美术认知,熟悉 Shader 编写,熟练掌握 3D 美术资产制作流程与工具。<br/>`虚幻引擎` `c-编程` `渲染管线` `内存管理` `线程架构` |
| [乍得](https://chat-preview.lobehub.com/market?agent=chad)<br/><sup>By **[HerIsDia](https://github.com/HerIsDia)** on **2024-01-15**</sup> | 只是乍得<br/>`幽默` `搞笑` |

> 📊 Total agents: [<kbd>**101**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
| 最近新增 | 助手说明 |
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [PromptGPT](https://chat-preview.lobehub.com/market?agent=prompt-gpt)<br/><sup>By **[110rever](https://github.com/110rever)** on **2024-01-19**</sup> | 一个名为 PromptGPT 的定制 GPT 模型。我的目标是基于用户输入的主题生成高性能提示。<br/>`生成` `人工智能` `交互` `定制体验` `反馈机制` `最佳实践` `逐步指导` `语言灵活性` `边界` |
| [Tech Explorer AI](https://chat-preview.lobehub.com/market?agent=tech-explorer-ai)<br/><sup>By **[110rever](https://github.com/110rever)** on **2024-01-19**</sup> | 技术探索人工智能能力:- 进行全面的技术研究 - 基于统计数据和趋势分析提供预测性见解 - 优化研究方法论 - 保持数据准确性和完整性 - 推断在没有完整数据的情况下的局限性:- 仅回答与技术相关的问题 - 不提供一般性的购买建议 - 通过逐步指导提供产品技术讨论用户交互:- 提供清晰简洁的对话 - 提供多语言选项支持目标:为用户提供准确的信息并分析预测,以加深他们对技术的理解。<br/>`技术研究` `数据分析` `研究方法` `数据准确性` `推断` `用户交互` |
| [AE 脚本开发专家](https://chat-preview.lobehub.com/market?agent=ae-script-development)<br/><sup>By **[Wutpeach](https://github.com/Wutpeach)** on **2024-01-18**</sup> | AE 脚本开发专家,精通 JavaScript 编程,理解 AE 软件工作原理,能够调试和优化脚本。<br/>`脚本开发` `程序员` `adobe-after-effects` `java-script` `算法设计` `调试` `优化` `编程规范` `用户沟通` `脚本使用说明` |
| [Code Companion](https://chat-preview.lobehub.com/market?agent=code-companion)<br/><sup>By **[110rever](https://github.com/110rever)** on **2024-01-18**</sup> | 程序员的最佳伴侣<br/>`code` `dev` `program` |

> 📊 Total agents: [<kbd>**103**</kbd> ](https://github.com/lobehub/lobe-chat-agents)
<!-- AGENT LIST -->

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -112,41 +112,31 @@ LobeChat SessionStore
└── store.ts
```

根据您提供的 LobeChat SessionStore 的目录结构,我们可以更新前面的文档,并将示例转换为 LobeChat 的 SessionStore 的实现案例。以下是转换后的文档部分:

### LobeChat SessionStore 目录结构最佳实践

在 LobeChat 应用中,由于会话管理是一个复杂的功能模块,因此我们采用了 Slice 模式来组织数据流。下面是 LobeChat SessionStore 的目录结构,其中每个目录和文件都有其特定的用途:
在 LobeChat 应用中,由于会话管理是一个复杂的功能模块,因此我们采用了 [slice 模式](https://github.com/pmndrs/zustand/blob/main/docs/guides/slices-pattern.md) 来组织数据流。下面是 LobeChat SessionStore 的目录结构,其中每个目录和文件都有其特定的用途:

```bash
```fish
src/store/session
├── helpers.ts # 辅助函数
├── hooks # 自定义 React 钩子
│   ├── index.ts # 钩子的出口文件
│   ├── useEffectAfterHydrated.ts # 会话加载后的效果钩子
│   ├── useOnFinishHydrationSession.ts # 会话水合完成钩子
│   ├── useSessionChatInit.ts # 会话聊天初始化钩子
│   └── useSessionHydrated.ts # 会话水合状态钩子
├── index.ts # SessionStore 的聚合导出文件
├── initialState.ts # 聚合了所有 slice 的 initialState
├── selectors.ts # 从各个 slices 导出的 selector
├── slices # 分离的功能模块
│   ├── agent # 代理相关的状态和操作
│   │   ├── action.ts # 代理相关的 action 定义
│   │   ├── index.ts # 代理 slice 的入口文件
│   │   ├── selectors.test.ts # 代理相关 selector 的测试
│   │   └── selectors.ts # 代理相关的 selector 定义
│   └── session # 会话相关的状态和操作
│   ├── action.test.ts # 会话相关 action 的测试
│   ├── action.ts # 会话相关的 action 定义
│   ├── helpers.ts # 会话相关的辅助函数
│   ├── initialState.ts # 会话 slice 的 initialState
│   └── selectors # 会话相关的 selector 与其测试
│   ├── export.ts # 会话 selector 的聚合导出
│   ├── index.ts # 会话 selector 的入口文件
│   ├── list.test.ts # 列表 selector 的测试
│   └── list.ts # 列表相关的 selector 定义
└── store.ts # SessionStore 的创建和使用
├── store.ts # SessionStore 的创建和使用
├── helpers.ts # 辅助函数
└── slices # 各个独立的功能切片
   ├── agent # 助理 Slice
   │   ├── action.ts
   │   ├── index.ts
   │   └── selectors.ts
   └── session # 会话 Slice
      ├── action.ts
      ├── helpers.ts
      ├── initialState.ts
      └── selectors
         ├── export.ts
         ├── list.ts
         └── index.ts
```

## SessionStore 的实现
Expand Down
Loading

0 comments on commit cd462e2

Please sign in to comment.