@lobehub/lobehub 2.0.0-next.260 → 2.0.0-next.262
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +8 -8
- package/README.zh-CN.md +8 -8
- package/changelog/v1.json +14 -0
- package/package.json +1 -1
- package/packages/types/src/agent/chatConfig.ts +1 -1
- package/packages/types/src/agent/item.ts +10 -10
- package/packages/types/src/agentRuntime.ts +1 -1
- package/packages/types/src/clientDB.ts +2 -2
- package/packages/types/src/topic/topic.ts +2 -2
- package/src/app/(backend)/api/workflows/memory-user-memory/pipelines/chat-topic/process-topics/route.ts +18 -2
- package/src/app/(backend)/api/workflows/memory-user-memory/pipelines/chat-topic/process-user-topics/route.ts +16 -2
- package/src/app/(backend)/api/workflows/memory-user-memory/pipelines/chat-topic/process-users/route.ts +16 -2
- package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Body.tsx +1 -1
- package/src/app/[variants]/(main)/{chat → agent}/_layout/index.tsx +1 -1
- package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/AgentWelcome/OpeningQuestions.tsx +1 -1
- package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/Tags/index.tsx +1 -4
- package/src/app/[variants]/(main)/{chat → agent}/features/Portal/_layout/Desktop.tsx +1 -3
- package/src/app/[variants]/(main)/{chat → agent}/features/Portal/features/PortalPanel.tsx +3 -2
- package/src/app/[variants]/(main)/{chat → agent}/features/Portal/index.tsx +3 -2
- package/src/app/[variants]/(main)/group/features/Conversation/AgentWelcome/ToolAuthAlert.tsx +1 -1
- package/src/app/[variants]/(main)/group/features/Portal/index.tsx +2 -2
- package/src/app/[variants]/(mobile)/chat/_layout/index.tsx +1 -1
- package/src/app/[variants]/(mobile)/chat/features/ChatHeader/index.tsx +1 -1
- package/src/app/[variants]/(mobile)/chat/features/Topic/index.tsx +1 -1
- package/src/app/[variants]/(mobile)/chat/index.tsx +4 -4
- package/src/app/[variants]/(mobile)/chat/settings/features/SettingButton.tsx +1 -1
- package/src/app/[variants]/router/desktopRouter.config.tsx +4 -4
- package/src/store/chat/slices/builtinTool/actions/__tests__/search.test.ts +0 -1
- package/src/store/chat/slices/builtinTool/initialState.ts +0 -10
- package/src/store/chat/slices/builtinTool/selectors.test.ts +0 -63
- package/src/store/chat/slices/builtinTool/selectors.ts +0 -7
- package/src/app/[variants]/(main)/chat/features/Conversation/Header/Tags/HistoryLimitTags.tsx +0 -25
- package/src/app/[variants]/(main)/group/features/Conversation/Header/Tags/HistoryLimitTags.tsx +0 -25
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/AgentIdSync.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/RegisterHotkeys.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Header/AddTopicButon.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Header/Agent/SwitchPanel.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Header/Agent/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Header/Nav.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Header/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/Actions.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/AllTopicsDrawer/Content.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/AllTopicsDrawer/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/CronTopicList/CronTopicGroup.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/CronTopicList/CronTopicItem.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/CronTopicList/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/List/Item/Actions.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/List/Item/Editing.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/List/Item/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/List/Item/useDropdownMenu.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/List/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/ByTimeMode/GroupItem.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/ByTimeMode/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/FlatMode/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/SearchResult/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Actions.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/Editing.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/ThreadList/ThreadItem/useDropdownMenu.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/ThreadList/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicSearchBar/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/hooks/useThreadNavigation.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/hooks/useTopicNavigation.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/useDropdownMenu.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/_layout/style.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/cron/[cronId]/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/ChangelogModal.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/AgentWelcome/AddButton.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/AgentWelcome/ToolAuthAlert.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/AgentWelcome/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/ChatHydration/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/ConversationArea.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/HeaderActions/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/HeaderActions/useMenu.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/NotebookButton/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/ShareButton/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/Tags/KnowledgeTag.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/Tags/MemberCountTag.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/Tags/SearchTags.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/WorkingDirectory/WorkingDirectoryContent.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/WorkingDirectory/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/MainChatInput/MessageFromUrl.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/MainChatInput/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/MainChatInput/useSendMenuItems.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/ThreadHydration.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/useActionsBarConfig.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/useAgentContext.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/PageTitle/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Portal/_layout/Mobile.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Portal/features/Body.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/Portal/features/Portal.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/features/TelemetryNotification.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/AgentCronJobs/CronJobCards.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/AgentCronJobs/CronJobForm.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/AgentCronJobs/CronJobList.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/AgentCronJobs/hooks/useAgentCronJobs.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/AgentCronJobs/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/EditorCanvas/TypoBar.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/EditorCanvas/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/EditorCanvas/useSlashItems.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/Header/AgentPublishButton/ForkConfirmModal.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/Header/AgentPublishButton/PublishButton.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/Header/AgentPublishButton/PublishResultModal.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/Header/AgentPublishButton/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/Header/AgentPublishButton/types.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/Header/AgentPublishButton/useMarketPublish.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/Header/AgentPublishButton/utils.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/Header/AutoSaveHint.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/Header/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/AgentHeader.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/AgentTool.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/MentionList/MentionDropdown.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/MentionList/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/MentionList/types.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/MentionList/useMentionItems.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/PluginTag.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/index.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileHydration.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileProvider.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/StoreUpdater.tsx +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/constants.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/store/action.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/store/index.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/store/initialState.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/features/store/selectors.ts +0 -0
- /package/src/app/[variants]/(main)/{chat → agent}/profile/index.tsx +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,56 @@
|
|
|
2
2
|
|
|
3
3
|
# Changelog
|
|
4
4
|
|
|
5
|
+
## [Version 2.0.0-next.262](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.261...v2.0.0-next.262)
|
|
6
|
+
|
|
7
|
+
<sup>Released on **2026-01-11**</sup>
|
|
8
|
+
|
|
9
|
+
#### ♻ Code Refactoring
|
|
10
|
+
|
|
11
|
+
- **misc**: Rename chat folder to agent.
|
|
12
|
+
|
|
13
|
+
<br/>
|
|
14
|
+
|
|
15
|
+
<details>
|
|
16
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
17
|
+
|
|
18
|
+
#### Code refactoring
|
|
19
|
+
|
|
20
|
+
- **misc**: Rename chat folder to agent, closes [#11409](https://github.com/lobehub/lobe-chat/issues/11409) ([7cfb1a3](https://github.com/lobehub/lobe-chat/commit/7cfb1a3))
|
|
21
|
+
|
|
22
|
+
</details>
|
|
23
|
+
|
|
24
|
+
<div align="right">
|
|
25
|
+
|
|
26
|
+
[](#readme-top)
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
|
|
30
|
+
## [Version 2.0.0-next.261](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.260...v2.0.0-next.261)
|
|
31
|
+
|
|
32
|
+
<sup>Released on **2026-01-10**</sup>
|
|
33
|
+
|
|
34
|
+
#### ✨ Features
|
|
35
|
+
|
|
36
|
+
- **userMemories**: Support to use customized Qstash client with extra header for workflows.
|
|
37
|
+
|
|
38
|
+
<br/>
|
|
39
|
+
|
|
40
|
+
<details>
|
|
41
|
+
<summary><kbd>Improvements and Fixes</kbd></summary>
|
|
42
|
+
|
|
43
|
+
#### What's improved
|
|
44
|
+
|
|
45
|
+
- **userMemories**: Support to use customized Qstash client with extra header for workflows, closes [#11378](https://github.com/lobehub/lobe-chat/issues/11378) ([3417af4](https://github.com/lobehub/lobe-chat/commit/3417af4))
|
|
46
|
+
|
|
47
|
+
</details>
|
|
48
|
+
|
|
49
|
+
<div align="right">
|
|
50
|
+
|
|
51
|
+
[](#readme-top)
|
|
52
|
+
|
|
53
|
+
</div>
|
|
54
|
+
|
|
5
55
|
## [Version 2.0.0-next.260](https://github.com/lobehub/lobe-chat/compare/v2.0.0-next.259...v2.0.0-next.260)
|
|
6
56
|
|
|
7
57
|
<sup>Released on **2026-01-10**</sup>
|
package/README.md
CHANGED
|
@@ -345,14 +345,14 @@ In addition, these plugins are not limited to news aggregation, but can also ext
|
|
|
345
345
|
|
|
346
346
|
<!-- PLUGIN LIST -->
|
|
347
347
|
|
|
348
|
-
| Recent Submits
|
|
349
|
-
|
|
|
350
|
-
| [
|
|
351
|
-
| [
|
|
352
|
-
| [
|
|
353
|
-
| [
|
|
354
|
-
|
|
355
|
-
> 📊 Total plugins: [<kbd>**
|
|
348
|
+
| Recent Submits | Description |
|
|
349
|
+
| ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
350
|
+
| [Video Captions](https://lobechat.com/discover/plugin/VideoCaptions)<br/><sup>By **maila** on **2025-12-13**</sup> | Convert Youtube links into transcribed text, enable asking questions, create chapters, and summarize its content.<br/>`video-to-text` `youtube` |
|
|
351
|
+
| [WeatherGPT](https://lobechat.com/discover/plugin/WeatherGPT)<br/><sup>By **steven-tey** on **2025-12-13**</sup> | Get current weather information for a specific location.<br/>`weather` |
|
|
352
|
+
| [Git OSS Stats](https://lobechat.com/discover/plugin/gitUserRepoStats)<br/><sup>By **yunwei37** on **2025-12-13**</sup> | Dynamically generate and analyze stats and history for OSS repos and developers.<br/>`github` `oss` |
|
|
353
|
+
| [Questmate Forms](https://lobechat.com/discover/plugin/questmate)<br/><sup>By **questmate** on **2025-12-13**</sup> | Create forms, checklists and workflows (we call 'em Quests!) that you can assign, schedule or make public.<br/>`forms` `checklists` `productivity` |
|
|
354
|
+
|
|
355
|
+
> 📊 Total plugins: [<kbd>**38**</kbd>](https://lobechat.com/discover/plugins)
|
|
356
356
|
|
|
357
357
|
<!-- PLUGIN LIST -->
|
|
358
358
|
|
package/README.zh-CN.md
CHANGED
|
@@ -338,14 +338,14 @@ LobeChat 的插件生态系统是其核心功能的重要扩展,它极大地
|
|
|
338
338
|
|
|
339
339
|
<!-- PLUGIN LIST -->
|
|
340
340
|
|
|
341
|
-
| 最近新增
|
|
342
|
-
|
|
|
343
|
-
| [
|
|
344
|
-
| [
|
|
345
|
-
| [
|
|
346
|
-
| [
|
|
347
|
-
|
|
348
|
-
> 📊 Total plugins: [<kbd>**
|
|
341
|
+
| 最近新增 | 描述 |
|
|
342
|
+
| ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
|
|
343
|
+
| [视频字幕](https://lobechat.com/discover/plugin/VideoCaptions)<br/><sup>By **maila** on **2025-12-13**</sup> | 将 Youtube 链接转换为转录文本,使其能够提问,创建章节,并总结其内容。<br/>`视频转文字` `you-tube` |
|
|
344
|
+
| [天气 GPT](https://lobechat.com/discover/plugin/WeatherGPT)<br/><sup>By **steven-tey** on **2025-12-13**</sup> | 获取特定位置的当前天气信息。<br/>`天气` |
|
|
345
|
+
| [Git OSS Stats](https://lobechat.com/discover/plugin/gitUserRepoStats)<br/><sup>By **yunwei37** on **2025-12-13**</sup> | 动态生成和分析开源软件仓库和开发者的统计数据和历史记录。<br/>`github` `oss` |
|
|
346
|
+
| [Questmate Forms](https://lobechat.com/discover/plugin/questmate)<br/><sup>By **questmate** on **2025-12-13**</sup> | 创建表单、清单和工作流程(我们称之为任务!),您可以分配、安排或公开。<br/>`表单` `清单` `生产力` |
|
|
347
|
+
|
|
348
|
+
> 📊 Total plugins: [<kbd>**38**</kbd>](https://lobechat.com/discover/plugins)
|
|
349
349
|
|
|
350
350
|
<!-- PLUGIN LIST -->
|
|
351
351
|
|
package/changelog/v1.json
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
[
|
|
2
|
+
{
|
|
3
|
+
"children": {
|
|
4
|
+
"improvements": [
|
|
5
|
+
"Rename chat folder to agent."
|
|
6
|
+
]
|
|
7
|
+
},
|
|
8
|
+
"date": "2026-01-11",
|
|
9
|
+
"version": "2.0.0-next.262"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
"children": {},
|
|
13
|
+
"date": "2026-01-10",
|
|
14
|
+
"version": "2.0.0-next.261"
|
|
15
|
+
},
|
|
2
16
|
{
|
|
3
17
|
"children": {},
|
|
4
18
|
"date": "2026-01-10",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lobehub/lobehub",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.262",
|
|
4
4
|
"description": "LobeHub - an open-source,comprehensive AI Agent framework that supports speech synthesis, multimodal, and extensible Function Call plugin system. Supports one-click free deployment of your private ChatGPT/LLM web application.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"framework",
|
|
@@ -12,8 +12,8 @@ export interface LobeAgentConfig {
|
|
|
12
12
|
chatConfig: LobeAgentChatConfig;
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
16
|
-
*
|
|
15
|
+
* Editor content (JSON format)
|
|
16
|
+
* Used to save the complete state of the rich text editor, including special nodes like mention
|
|
17
17
|
*/
|
|
18
18
|
editorData?: any;
|
|
19
19
|
enableAgentMode?: boolean;
|
|
@@ -26,41 +26,41 @@ export interface LobeAgentConfig {
|
|
|
26
26
|
*/
|
|
27
27
|
knowledgeBases?: KnowledgeBaseItem[];
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Language model used by the agent
|
|
30
30
|
* @default gpt-4o-mini
|
|
31
31
|
*/
|
|
32
32
|
model: string;
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* Opening message
|
|
36
36
|
*/
|
|
37
37
|
openingMessage?: string;
|
|
38
38
|
/**
|
|
39
|
-
*
|
|
39
|
+
* Opening questions
|
|
40
40
|
*/
|
|
41
41
|
openingQuestions?: string[];
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
|
-
*
|
|
44
|
+
* Language model parameters
|
|
45
45
|
*/
|
|
46
46
|
params: LLMParams;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* Enabled plugins
|
|
49
49
|
*/
|
|
50
50
|
plugins?: string[];
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
|
-
*
|
|
53
|
+
* Model provider
|
|
54
54
|
*/
|
|
55
55
|
provider?: string;
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
|
-
*
|
|
58
|
+
* System role
|
|
59
59
|
*/
|
|
60
60
|
systemRole: string;
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
|
-
*
|
|
63
|
+
* Text-to-speech service
|
|
64
64
|
*/
|
|
65
65
|
tts: LobeAgentTTSConfig;
|
|
66
66
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable sort-keys-fix/sort-keys-fix */
|
|
2
2
|
// ******* Runtime Biz Error ******* //
|
|
3
3
|
export const AgentRuntimeErrorType = {
|
|
4
|
-
AgentRuntimeError: 'AgentRuntimeError', // Agent Runtime
|
|
4
|
+
AgentRuntimeError: 'AgentRuntimeError', // Agent Runtime module runtime error
|
|
5
5
|
LocationNotSupportError: 'LocationNotSupportError',
|
|
6
6
|
|
|
7
7
|
QuotaLimitReached: 'QuotaLimitReached',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
//
|
|
1
|
+
// Define loading state types
|
|
2
2
|
export enum DatabaseLoadingState {
|
|
3
3
|
Error = 'error',
|
|
4
4
|
Finished = 'finished',
|
|
@@ -19,7 +19,7 @@ export const ClientDatabaseInitStages = [
|
|
|
19
19
|
DatabaseLoadingState.Finished,
|
|
20
20
|
];
|
|
21
21
|
|
|
22
|
-
//
|
|
22
|
+
// Define progress callback interface
|
|
23
23
|
export interface ClientDBLoadingProgress {
|
|
24
24
|
costTime?: number;
|
|
25
25
|
phase: 'wasm' | 'dependencies';
|
|
@@ -43,8 +43,8 @@ export interface ChatTopicMetadata {
|
|
|
43
43
|
userMemoryExtractRunState?: TopicUserMemoryExtractRunState;
|
|
44
44
|
userMemoryExtractStatus?: 'pending' | 'completed' | 'failed';
|
|
45
45
|
/**
|
|
46
|
-
* Local System
|
|
47
|
-
*
|
|
46
|
+
* Local System working directory (desktop only)
|
|
47
|
+
* Priority is higher than Agent-level settings
|
|
48
48
|
*/
|
|
49
49
|
workingDirectory?: string;
|
|
50
50
|
}
|
|
@@ -12,6 +12,10 @@ import {
|
|
|
12
12
|
type MemoryExtractionPayloadInput,
|
|
13
13
|
normalizeMemoryExtractionPayload,
|
|
14
14
|
} from '@/server/services/memory/userMemory/extract';
|
|
15
|
+
import { Client } from '@upstash/qstash'
|
|
16
|
+
import { parseMemoryExtractionConfig } from '@/server/globalConfig/parseMemoryExtractionConfig';
|
|
17
|
+
|
|
18
|
+
const { upstashWorkflowExtraHeaders } = parseMemoryExtractionConfig();
|
|
15
19
|
|
|
16
20
|
const CEP_LAYERS: LayersEnum[] = [LayersEnum.Context, LayersEnum.Experience, LayersEnum.Preference];
|
|
17
21
|
const IDENTITY_LAYERS: LayersEnum[] = [LayersEnum.Identity];
|
|
@@ -136,5 +140,17 @@ export const { POST } = serve<MemoryExtractionPayloadInput>((context) =>
|
|
|
136
140
|
span.end();
|
|
137
141
|
}
|
|
138
142
|
},
|
|
139
|
-
),
|
|
140
|
-
)
|
|
143
|
+
), {
|
|
144
|
+
// NOTICE(@nekomeowww): Here as scenarios like Vercel Deployment Protection,
|
|
145
|
+
// intermediate context.run(...) won't offer customizable headers like context.trigger(...) / client.trigger(...)
|
|
146
|
+
// for passing additional headers, we have to provide a custom QStash client with the required headers here.
|
|
147
|
+
//
|
|
148
|
+
// Refer to the doc for more details:
|
|
149
|
+
// https://upstash.com/docs/workflow/troubleshooting/vercel#step-2-pass-header-when-triggering
|
|
150
|
+
qstashClient: new Client({
|
|
151
|
+
headers: {
|
|
152
|
+
...upstashWorkflowExtraHeaders,
|
|
153
|
+
},
|
|
154
|
+
token: process.env.QSTASH_TOKEN!
|
|
155
|
+
})
|
|
156
|
+
});
|
|
@@ -10,13 +10,14 @@ import {
|
|
|
10
10
|
import { forEachBatchSequential } from '@/server/services/memory/userMemory/topicBatching';
|
|
11
11
|
import { MemorySourceType } from '@lobechat/types';
|
|
12
12
|
import { parseMemoryExtractionConfig } from '@/server/globalConfig/parseMemoryExtractionConfig';
|
|
13
|
+
import { Client } from '@upstash/qstash'
|
|
13
14
|
|
|
14
15
|
const TOPIC_PAGE_SIZE = 50;
|
|
15
16
|
const TOPIC_BATCH_SIZE = 4;
|
|
16
17
|
|
|
17
|
-
|
|
18
|
-
const { upstashWorkflowExtraHeaders } = parseMemoryExtractionConfig();
|
|
18
|
+
const { upstashWorkflowExtraHeaders } = parseMemoryExtractionConfig();
|
|
19
19
|
|
|
20
|
+
export const { POST } = serve<MemoryExtractionPayloadInput>(async (context) => {
|
|
20
21
|
const params = normalizeMemoryExtractionPayload(context.requestPayload || {});
|
|
21
22
|
if (!params.userIds.length) {
|
|
22
23
|
return { message: 'No user ids provided for topic processing.' };
|
|
@@ -125,4 +126,17 @@ export const { POST } = serve<MemoryExtractionPayloadInput>(async (context) => {
|
|
|
125
126
|
}
|
|
126
127
|
|
|
127
128
|
return { processedUsers: params.userIds.length };
|
|
129
|
+
}, {
|
|
130
|
+
// NOTICE(@nekomeowww): Here as scenarios like Vercel Deployment Protection,
|
|
131
|
+
// intermediate context.run(...) won't offer customizable headers like context.trigger(...) / client.trigger(...)
|
|
132
|
+
// for passing additional headers, we have to provide a custom QStash client with the required headers here.
|
|
133
|
+
//
|
|
134
|
+
// Refer to the doc for more details:
|
|
135
|
+
// https://upstash.com/docs/workflow/troubleshooting/vercel#step-2-pass-header-when-triggering
|
|
136
|
+
qstashClient: new Client({
|
|
137
|
+
headers: {
|
|
138
|
+
...upstashWorkflowExtraHeaders,
|
|
139
|
+
},
|
|
140
|
+
token: process.env.QSTASH_TOKEN!
|
|
141
|
+
})
|
|
128
142
|
});
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { serve } from '@upstash/workflow/nextjs';
|
|
2
2
|
import { chunk } from 'es-toolkit/compat';
|
|
3
|
+
import { Client } from '@upstash/qstash'
|
|
3
4
|
|
|
4
5
|
import {
|
|
5
6
|
MemoryExtractionExecutor,
|
|
@@ -13,9 +14,9 @@ import { parseMemoryExtractionConfig } from '@/server/globalConfig/parseMemoryEx
|
|
|
13
14
|
const USER_PAGE_SIZE = 50;
|
|
14
15
|
const USER_BATCH_SIZE = 10;
|
|
15
16
|
|
|
16
|
-
|
|
17
|
-
const { upstashWorkflowExtraHeaders } = parseMemoryExtractionConfig();
|
|
17
|
+
const { upstashWorkflowExtraHeaders } = parseMemoryExtractionConfig();
|
|
18
18
|
|
|
19
|
+
export const { POST } = serve<MemoryExtractionPayloadInput>(async (context) => {
|
|
19
20
|
const params = normalizeMemoryExtractionPayload(context.requestPayload || {});
|
|
20
21
|
if (params.sources.length === 0) {
|
|
21
22
|
return { message: 'No sources provided, skip memory extraction.' };
|
|
@@ -73,4 +74,17 @@ export const { POST } = serve<MemoryExtractionPayloadInput>(async (context) => {
|
|
|
73
74
|
nextCursor: cursor ? cursor.id : null,
|
|
74
75
|
processedUsers: ids.length,
|
|
75
76
|
};
|
|
77
|
+
}, {
|
|
78
|
+
// NOTICE(@nekomeowww): Here as scenarios like Vercel Deployment Protection,
|
|
79
|
+
// intermediate context.run(...) won't offer customizable headers like context.trigger(...) / client.trigger(...)
|
|
80
|
+
// for passing additional headers, we have to provide a custom QStash client with the required headers here.
|
|
81
|
+
//
|
|
82
|
+
// Refer to the doc for more details:
|
|
83
|
+
// https://upstash.com/docs/workflow/troubleshooting/vercel#step-2-pass-header-when-triggering
|
|
84
|
+
qstashClient: new Client({
|
|
85
|
+
headers: {
|
|
86
|
+
...upstashWorkflowExtraHeaders,
|
|
87
|
+
},
|
|
88
|
+
token: process.env.QSTASH_TOKEN!
|
|
89
|
+
})
|
|
76
90
|
});
|
|
@@ -2,7 +2,7 @@ import { Flexbox } from '@lobehub/ui';
|
|
|
2
2
|
import { type FC } from 'react';
|
|
3
3
|
import { Outlet } from 'react-router-dom';
|
|
4
4
|
|
|
5
|
-
import AgentIdSync from '@/app/[variants]/(main)/
|
|
5
|
+
import AgentIdSync from '@/app/[variants]/(main)/agent/_layout/AgentIdSync';
|
|
6
6
|
import { isDesktop } from '@/const/version';
|
|
7
7
|
import ProtocolUrlHandler from '@/features/ProtocolUrlHandler';
|
|
8
8
|
import { useInitAgentConfig } from '@/hooks/useInitAgentConfig';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { Block, Flexbox } from '@lobehub/ui';
|
|
4
|
-
import { createStaticStyles
|
|
4
|
+
import { createStaticStyles, responsive } from 'antd-style';
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
|
package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/Tags/index.tsx
RENAMED
|
@@ -8,13 +8,12 @@ import PluginTag from '@/features/PluginTag';
|
|
|
8
8
|
import { useAgentEnableSearch } from '@/hooks/useAgentEnableSearch';
|
|
9
9
|
import { useModelSupportToolUse } from '@/hooks/useModelSupportToolUse';
|
|
10
10
|
import { useAgentStore } from '@/store/agent';
|
|
11
|
-
import {
|
|
11
|
+
import { agentSelectors } from '@/store/agent/selectors';
|
|
12
12
|
import { useSessionStore } from '@/store/session';
|
|
13
13
|
import { sessionSelectors } from '@/store/session/selectors';
|
|
14
14
|
import { useUserStore } from '@/store/user';
|
|
15
15
|
import { authSelectors } from '@/store/user/selectors';
|
|
16
16
|
|
|
17
|
-
import HistoryLimitTags from './HistoryLimitTags';
|
|
18
17
|
import KnowledgeTag from './KnowledgeTag';
|
|
19
18
|
import MemberCountTag from './MemberCountTag';
|
|
20
19
|
import SearchTags from './SearchTags';
|
|
@@ -29,7 +28,6 @@ const TitleTags = memo(() => {
|
|
|
29
28
|
|
|
30
29
|
const plugins = useAgentStore(agentSelectors.displayableAgentPlugins, isEqual);
|
|
31
30
|
const enabledKnowledge = useAgentStore(agentSelectors.currentEnabledKnowledge, isEqual);
|
|
32
|
-
const enableHistoryCount = useAgentStore(agentChatConfigSelectors.enableHistoryCount);
|
|
33
31
|
|
|
34
32
|
const showPlugin = useModelSupportToolUse(model, provider);
|
|
35
33
|
const isLogin = useUserStore(authSelectors.isLogin);
|
|
@@ -55,7 +53,6 @@ const TitleTags = memo(() => {
|
|
|
55
53
|
{isAgentEnableSearch && <SearchTags />}
|
|
56
54
|
{showPlugin && plugins?.length > 0 && <PluginTag plugins={plugins} />}
|
|
57
55
|
{hasKnowledge && <KnowledgeTag data={enabledKnowledge} />}
|
|
58
|
-
{enableHistoryCount && <HistoryLimitTags />}
|
|
59
56
|
</Flexbox>
|
|
60
57
|
);
|
|
61
58
|
});
|
|
@@ -3,9 +3,7 @@ import { PortalContent } from '@/features/Portal/router';
|
|
|
3
3
|
import Body from '../features/Body';
|
|
4
4
|
|
|
5
5
|
const Layout = () => {
|
|
6
|
-
return (
|
|
7
|
-
<PortalContent renderBody={(body) => <Body>{body}</Body>} />
|
|
8
|
-
);
|
|
6
|
+
return <PortalContent renderBody={(body) => <Body>{body}</Body>} />;
|
|
9
7
|
};
|
|
10
8
|
|
|
11
9
|
export default Layout;
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Suspense, memo } from 'react';
|
|
2
2
|
|
|
3
|
-
import DesktopLayout from '@/app/[variants]/(main)/chat/features/Portal/_layout/Desktop';
|
|
4
|
-
import MobileLayout from '@/app/[variants]/(main)/chat/features/Portal/_layout/Mobile';
|
|
5
3
|
import Loading from '@/components/Loading/BrandTextLoading';
|
|
6
4
|
|
|
5
|
+
import DesktopLayout from '../_layout/Desktop';
|
|
6
|
+
import MobileLayout from '../_layout/Mobile';
|
|
7
|
+
|
|
7
8
|
interface PortalPanelProps {
|
|
8
9
|
mobile?: boolean;
|
|
9
10
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Suspense } from 'react';
|
|
2
2
|
|
|
3
|
-
import Portal from '@/app/[variants]/(main)/chat/features/Portal/features/Portal';
|
|
4
|
-
import PortalPanel from '@/app/[variants]/(main)/chat/features/Portal/features/PortalPanel';
|
|
5
3
|
import Loading from '@/components/Loading/BrandTextLoading';
|
|
6
4
|
|
|
5
|
+
import Portal from './features/Portal';
|
|
6
|
+
import PortalPanel from './features/PortalPanel';
|
|
7
|
+
|
|
7
8
|
const ChatPortal = () => {
|
|
8
9
|
return (
|
|
9
10
|
<Portal>
|
package/src/app/[variants]/(main)/group/features/Conversation/AgentWelcome/ToolAuthAlert.tsx
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// Re-export from chat version to avoid code duplication
|
|
2
|
-
export { default } from '@/app/[variants]/(main)/
|
|
2
|
+
export { default } from '@/app/[variants]/(main)/agent/features/Conversation/AgentWelcome/ToolAuthAlert';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Suspense } from 'react';
|
|
2
2
|
|
|
3
|
-
import Portal from '@/app/[variants]/(main)/
|
|
4
|
-
import PortalPanel from '@/app/[variants]/(main)/
|
|
3
|
+
import Portal from '@/app/[variants]/(main)/agent/features/Portal/features/Portal';
|
|
4
|
+
import PortalPanel from '@/app/[variants]/(main)/agent/features/Portal/features/PortalPanel';
|
|
5
5
|
import Loading from '@/components/Loading/BrandTextLoading';
|
|
6
6
|
|
|
7
7
|
const ChatPortal = () => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { type FC } from 'react';
|
|
4
4
|
import { Outlet } from 'react-router-dom';
|
|
5
5
|
|
|
6
|
-
import AgentIdSync from '@/app/[variants]/(main)/
|
|
6
|
+
import AgentIdSync from '@/app/[variants]/(main)/agent/_layout/AgentIdSync';
|
|
7
7
|
import ChatHeader from '@/app/[variants]/(mobile)/chat/features/ChatHeader';
|
|
8
8
|
import MobileContentLayout from '@/components/server/MobileNavLayout';
|
|
9
9
|
import { useInitAgentConfig } from '@/hooks/useInitAgentConfig';
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
import { ChatHeader } from '@lobehub/ui/mobile';
|
|
4
4
|
import { memo, useState } from 'react';
|
|
5
5
|
|
|
6
|
-
import ShareButton from '@/app/[variants]/(main)/
|
|
6
|
+
import ShareButton from '@/app/[variants]/(main)/agent/features/Conversation/Header/ShareButton';
|
|
7
7
|
import { INBOX_SESSION_ID } from '@/const/session';
|
|
8
8
|
import { useQueryRoute } from '@/hooks/useQueryRoute';
|
|
9
9
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Flexbox } from '@lobehub/ui';
|
|
2
2
|
|
|
3
|
-
import TopicSearchBar from '@/app/[variants]/(main)/
|
|
3
|
+
import TopicSearchBar from '@/app/[variants]/(main)/agent/_layout/Sidebar/Topic/TopicSearchBar';
|
|
4
4
|
|
|
5
5
|
import TopicModal from './features/TopicModal';
|
|
6
6
|
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
import { memo } from 'react';
|
|
4
4
|
|
|
5
|
-
import ConversationArea from '@/app/[variants]/(main)/
|
|
6
|
-
import
|
|
5
|
+
import ConversationArea from '@/app/[variants]/(main)/agent/features/Conversation/ConversationArea';
|
|
6
|
+
import PageTitle from '@/app/[variants]/(main)/agent/features/PageTitle';
|
|
7
|
+
import PortalPanel from '@/app/[variants]/(main)/agent/features/Portal/features/PortalPanel';
|
|
8
|
+
import TelemetryNotification from '@/app/[variants]/(main)/agent/features/TelemetryNotification';
|
|
7
9
|
import MainInterfaceTracker from '@/components/Analytics/MainInterfaceTracker';
|
|
8
10
|
|
|
9
|
-
import PageTitle from '../../(main)/chat/features/PageTitle';
|
|
10
|
-
import TelemetryNotification from '../../(main)/chat/features/TelemetryNotification';
|
|
11
11
|
import Topic from './features/Topic';
|
|
12
12
|
|
|
13
13
|
const MobileChatPage = memo(() => {
|
|
@@ -15,7 +15,7 @@ import { useUserStore } from '@/store/user';
|
|
|
15
15
|
import { settingsSelectors } from '@/store/user/selectors';
|
|
16
16
|
import { HotkeyEnum } from '@/types/hotkey';
|
|
17
17
|
|
|
18
|
-
const AgentSettingsEditor = dynamic(() => import('
|
|
18
|
+
const AgentSettingsEditor = dynamic(() => import('@/app/[variants]/(main)/agent/profile'), {
|
|
19
19
|
ssr: false,
|
|
20
20
|
});
|
|
21
21
|
|
|
@@ -9,7 +9,7 @@ import { ErrorBoundary, type RouteConfig, dynamicElement, redirectElement } from
|
|
|
9
9
|
|
|
10
10
|
import DesktopOnboarding from '../(desktop)/desktop-onboarding';
|
|
11
11
|
import DesktopMainLayout from '../(main)/_layout';
|
|
12
|
-
import DesktopChatLayout from '../(main)/
|
|
12
|
+
import DesktopChatLayout from '../(main)/agent/_layout';
|
|
13
13
|
import DesktopGroupLayout from '../(main)/group/_layout';
|
|
14
14
|
import DesktopImageLayout from '../(main)/image/_layout';
|
|
15
15
|
import DesktopMemoryLayout from '../(main)/memory/_layout';
|
|
@@ -29,19 +29,19 @@ export const desktopRoutes: RouteConfig[] = [
|
|
|
29
29
|
{
|
|
30
30
|
children: [
|
|
31
31
|
{
|
|
32
|
-
element: dynamicElement(() => import('../(main)/
|
|
32
|
+
element: dynamicElement(() => import('../(main)/agent'), 'Desktop > Chat'),
|
|
33
33
|
index: true,
|
|
34
34
|
},
|
|
35
35
|
{
|
|
36
36
|
element: dynamicElement(
|
|
37
|
-
() => import('../(main)/
|
|
37
|
+
() => import('../(main)/agent/profile'),
|
|
38
38
|
'Desktop > Chat > Profile',
|
|
39
39
|
),
|
|
40
40
|
path: 'profile',
|
|
41
41
|
},
|
|
42
42
|
{
|
|
43
43
|
element: dynamicElement(
|
|
44
|
-
() => import('../(main)/
|
|
44
|
+
() => import('../(main)/agent/cron/[cronId]'),
|
|
45
45
|
'Desktop > Chat > Cron Detail',
|
|
46
46
|
),
|
|
47
47
|
path: 'cron/:cronId',
|
|
@@ -32,7 +32,6 @@ describe('search actions', () => {
|
|
|
32
32
|
useChatStore.setState({
|
|
33
33
|
activeAgentId: 'session-id',
|
|
34
34
|
activeTopicId: 'topic-id',
|
|
35
|
-
searchLoading: {},
|
|
36
35
|
messageOperationMap: {},
|
|
37
36
|
optimisticUpdateMessageContent: vi.fn(),
|
|
38
37
|
optimisticUpdateMessagePluginError: vi.fn(),
|
|
@@ -2,19 +2,9 @@ import { type FileItem } from '@/types/files';
|
|
|
2
2
|
|
|
3
3
|
export interface ChatToolState {
|
|
4
4
|
activePageContentUrl?: string;
|
|
5
|
-
codeInterpreterExecuting: Record<string, boolean>;
|
|
6
5
|
codeInterpreterImageMap: Record<string, FileItem>;
|
|
7
|
-
dalleImageLoading: Record<string, boolean>;
|
|
8
|
-
dalleImageMap: Record<string, FileItem>;
|
|
9
|
-
localFileLoading: Record<string, boolean>;
|
|
10
|
-
searchLoading: Record<string, boolean>;
|
|
11
6
|
}
|
|
12
7
|
|
|
13
8
|
export const initialToolState: ChatToolState = {
|
|
14
|
-
codeInterpreterExecuting: {},
|
|
15
9
|
codeInterpreterImageMap: {},
|
|
16
|
-
dalleImageLoading: {},
|
|
17
|
-
dalleImageMap: {},
|
|
18
|
-
localFileLoading: {},
|
|
19
|
-
searchLoading: {},
|
|
20
10
|
};
|
|
@@ -10,69 +10,6 @@ describe('chatToolSelectors', () => {
|
|
|
10
10
|
useChatStore.setState(useChatStore.getInitialState());
|
|
11
11
|
});
|
|
12
12
|
|
|
13
|
-
describe('isDallEImageGenerating', () => {
|
|
14
|
-
it('should return true when DALL-E image is generating for message', () => {
|
|
15
|
-
const { result } = renderHook(() => useChatStore());
|
|
16
|
-
|
|
17
|
-
act(() => {
|
|
18
|
-
useChatStore.setState({
|
|
19
|
-
dalleImageLoading: {
|
|
20
|
-
msg1: true,
|
|
21
|
-
msg2: false,
|
|
22
|
-
},
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
expect(chatToolSelectors.isDallEImageGenerating('msg1')(result.current)).toBe(true);
|
|
27
|
-
expect(chatToolSelectors.isDallEImageGenerating('msg2')(result.current)).toBe(false);
|
|
28
|
-
});
|
|
29
|
-
|
|
30
|
-
it('should return undefined when message not in loading state', () => {
|
|
31
|
-
const { result } = renderHook(() => useChatStore());
|
|
32
|
-
|
|
33
|
-
expect(chatToolSelectors.isDallEImageGenerating('msg1')(result.current)).toBeUndefined();
|
|
34
|
-
});
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
describe('isGeneratingDallEImage', () => {
|
|
38
|
-
it('should return true when any DALL-E image is generating', () => {
|
|
39
|
-
const { result } = renderHook(() => useChatStore());
|
|
40
|
-
|
|
41
|
-
act(() => {
|
|
42
|
-
useChatStore.setState({
|
|
43
|
-
dalleImageLoading: {
|
|
44
|
-
msg1: false,
|
|
45
|
-
msg2: true,
|
|
46
|
-
msg3: false,
|
|
47
|
-
},
|
|
48
|
-
});
|
|
49
|
-
});
|
|
50
|
-
|
|
51
|
-
expect(chatToolSelectors.isGeneratingDallEImage(result.current)).toBe(true);
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
it('should return false when no DALL-E images are generating', () => {
|
|
55
|
-
const { result } = renderHook(() => useChatStore());
|
|
56
|
-
|
|
57
|
-
act(() => {
|
|
58
|
-
useChatStore.setState({
|
|
59
|
-
dalleImageLoading: {
|
|
60
|
-
msg1: false,
|
|
61
|
-
msg2: false,
|
|
62
|
-
},
|
|
63
|
-
});
|
|
64
|
-
});
|
|
65
|
-
|
|
66
|
-
expect(chatToolSelectors.isGeneratingDallEImage(result.current)).toBe(false);
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
it('should return false when dalleImageLoading is empty', () => {
|
|
70
|
-
const { result } = renderHook(() => useChatStore());
|
|
71
|
-
|
|
72
|
-
expect(chatToolSelectors.isGeneratingDallEImage(result.current)).toBe(false);
|
|
73
|
-
});
|
|
74
|
-
});
|
|
75
|
-
|
|
76
13
|
describe('isInterpreterExecuting', () => {
|
|
77
14
|
it('should return true when interpreter is executing for message', () => {
|
|
78
15
|
const { result } = renderHook(() => useChatStore());
|
|
@@ -1,10 +1,5 @@
|
|
|
1
1
|
import { type ChatStoreState } from '@/store/chat';
|
|
2
2
|
|
|
3
|
-
const isDallEImageGenerating = (id: string) => (s: ChatStoreState) => s.dalleImageLoading[id];
|
|
4
|
-
|
|
5
|
-
const isGeneratingDallEImage = (s: ChatStoreState) =>
|
|
6
|
-
Object.values(s.dalleImageLoading).some(Boolean);
|
|
7
|
-
|
|
8
3
|
const isInterpreterExecuting = (id: string) => (s: ChatStoreState) => {
|
|
9
4
|
// Check if there's a running builtinToolInterpreter operation for this message
|
|
10
5
|
const operationId = s.messageOperationMap[id];
|
|
@@ -33,8 +28,6 @@ const isSearchingLocalFiles = (id: string) => (s: ChatStoreState) => {
|
|
|
33
28
|
};
|
|
34
29
|
|
|
35
30
|
export const chatToolSelectors = {
|
|
36
|
-
isDallEImageGenerating,
|
|
37
|
-
isGeneratingDallEImage,
|
|
38
31
|
isInterpreterExecuting,
|
|
39
32
|
isSearXNGSearching,
|
|
40
33
|
isSearchingLocalFiles,
|
package/src/app/[variants]/(main)/chat/features/Conversation/Header/Tags/HistoryLimitTags.tsx
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Flexbox, Icon, Tag, Tooltip } from '@lobehub/ui';
|
|
2
|
-
import { HistoryIcon } from 'lucide-react';
|
|
3
|
-
import { memo } from 'react';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
|
|
6
|
-
import { useAgentStore } from '@/store/agent';
|
|
7
|
-
import { agentChatConfigSelectors } from '@/store/agent/selectors';
|
|
8
|
-
|
|
9
|
-
const SearchTag = memo(() => {
|
|
10
|
-
const { t } = useTranslation('chat');
|
|
11
|
-
const historyCount = useAgentStore(agentChatConfigSelectors.historyCount);
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<Tooltip title={t('history.title', { count: historyCount })}>
|
|
15
|
-
<Flexbox height={22}>
|
|
16
|
-
<Tag>
|
|
17
|
-
<Icon icon={HistoryIcon} />
|
|
18
|
-
<span>{historyCount}</span>
|
|
19
|
-
</Tag>
|
|
20
|
-
</Flexbox>
|
|
21
|
-
</Tooltip>
|
|
22
|
-
);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export default SearchTag;
|
package/src/app/[variants]/(main)/group/features/Conversation/Header/Tags/HistoryLimitTags.tsx
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Flexbox, Icon, Tag, Tooltip } from '@lobehub/ui';
|
|
2
|
-
import { HistoryIcon } from 'lucide-react';
|
|
3
|
-
import { memo } from 'react';
|
|
4
|
-
import { useTranslation } from 'react-i18next';
|
|
5
|
-
|
|
6
|
-
import { useAgentStore } from '@/store/agent';
|
|
7
|
-
import { agentChatConfigSelectors } from '@/store/agent/selectors';
|
|
8
|
-
|
|
9
|
-
const SearchTag = memo(() => {
|
|
10
|
-
const { t } = useTranslation('chat');
|
|
11
|
-
const historyCount = useAgentStore(agentChatConfigSelectors.historyCount);
|
|
12
|
-
|
|
13
|
-
return (
|
|
14
|
-
<Tooltip title={t('history.title', { count: historyCount })}>
|
|
15
|
-
<Flexbox height={22}>
|
|
16
|
-
<Tag>
|
|
17
|
-
<Icon icon={HistoryIcon} />
|
|
18
|
-
<span>{historyCount}</span>
|
|
19
|
-
</Tag>
|
|
20
|
-
</Flexbox>
|
|
21
|
-
</Tooltip>
|
|
22
|
-
);
|
|
23
|
-
});
|
|
24
|
-
|
|
25
|
-
export default SearchTag;
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Header/Agent/SwitchPanel.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/AllTopicsDrawer/Content.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/AllTopicsDrawer/index.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/CronTopicList/index.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/List/Item/Actions.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/List/Item/Editing.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicListContent/index.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/TopicSearchBar/index.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/hooks/useThreadNavigation.ts
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/_layout/Sidebar/Topic/hooks/useTopicNavigation.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/AgentWelcome/AddButton.tsx
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/AgentWelcome/index.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/ChatHydration/index.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/ConversationArea.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/ShareButton/index.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/Tags/KnowledgeTag.tsx
RENAMED
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/Header/Tags/SearchTags.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/MainChatInput/index.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/features/Conversation/useActionsBarConfig.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/profile/features/AgentCronJobs/CronJobCards.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/profile/features/AgentCronJobs/CronJobForm.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/profile/features/AgentCronJobs/CronJobList.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/profile/features/EditorCanvas/useSlashItems.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/AgentHeader.tsx
RENAMED
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/AgentTool.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/src/app/[variants]/(main)/{chat → agent}/profile/features/ProfileEditor/PluginTag.tsx
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|