@lobehub/lobehub 2.0.0-next.273 → 2.0.0-next.274
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 +34 -0
- package/changelog/v1.json +9 -0
- package/locales/ar/chat.json +7 -0
- package/locales/ar/models.json +2 -3
- package/locales/ar/plugin.json +22 -1
- package/locales/bg-BG/chat.json +7 -0
- package/locales/bg-BG/models.json +3 -3
- package/locales/bg-BG/plugin.json +22 -1
- package/locales/de-DE/chat.json +7 -0
- package/locales/de-DE/models.json +3 -4
- package/locales/de-DE/plugin.json +22 -1
- package/locales/en-US/chat.json +7 -0
- package/locales/en-US/models.json +5 -5
- package/locales/en-US/plugin.json +22 -1
- package/locales/es-ES/chat.json +7 -0
- package/locales/es-ES/models.json +3 -4
- package/locales/es-ES/plugin.json +22 -1
- package/locales/fa-IR/chat.json +7 -0
- package/locales/fa-IR/models.json +3 -4
- package/locales/fa-IR/plugin.json +22 -1
- package/locales/fr-FR/chat.json +7 -0
- package/locales/fr-FR/models.json +50 -3
- package/locales/fr-FR/plugin.json +22 -1
- package/locales/it-IT/chat.json +7 -0
- package/locales/it-IT/models.json +3 -3
- package/locales/it-IT/plugin.json +22 -1
- package/locales/ja-JP/chat.json +7 -0
- package/locales/ja-JP/models.json +43 -4
- package/locales/ja-JP/plugin.json +22 -1
- package/locales/ko-KR/chat.json +7 -0
- package/locales/ko-KR/models.json +3 -4
- package/locales/ko-KR/plugin.json +22 -1
- package/locales/nl-NL/chat.json +7 -0
- package/locales/nl-NL/models.json +51 -3
- package/locales/nl-NL/plugin.json +22 -1
- package/locales/pl-PL/chat.json +7 -0
- package/locales/pl-PL/models.json +3 -3
- package/locales/pl-PL/plugin.json +22 -1
- package/locales/pt-BR/chat.json +7 -0
- package/locales/pt-BR/models.json +3 -4
- package/locales/pt-BR/plugin.json +22 -1
- package/locales/ru-RU/chat.json +7 -0
- package/locales/ru-RU/models.json +3 -4
- package/locales/ru-RU/plugin.json +22 -1
- package/locales/tr-TR/chat.json +7 -0
- package/locales/tr-TR/models.json +3 -4
- package/locales/tr-TR/plugin.json +22 -1
- package/locales/vi-VN/chat.json +7 -0
- package/locales/vi-VN/models.json +3 -3
- package/locales/vi-VN/plugin.json +22 -1
- package/locales/zh-CN/chat.json +7 -0
- package/locales/zh-CN/models.json +54 -4
- package/locales/zh-CN/plugin.json +22 -1
- package/locales/zh-TW/chat.json +7 -0
- package/locales/zh-TW/models.json +43 -4
- package/locales/zh-TW/plugin.json +22 -1
- package/package.json +1 -1
- package/packages/builtin-tool-agent-builder/package.json +1 -0
- package/packages/builtin-tool-agent-builder/src/client/Inspector/GetAvailableModels/index.tsx +66 -0
- package/packages/builtin-tool-agent-builder/src/client/Inspector/InstallPlugin/index.tsx +63 -0
- package/packages/builtin-tool-agent-builder/src/client/Inspector/SearchMarketTools/index.tsx +64 -0
- package/packages/builtin-tool-agent-builder/src/client/Inspector/UpdateConfig/index.tsx +94 -0
- package/packages/builtin-tool-agent-builder/src/client/Inspector/UpdatePrompt/index.tsx +96 -0
- package/packages/builtin-tool-agent-builder/src/client/Inspector/index.ts +29 -0
- package/packages/builtin-tool-agent-builder/src/client/index.ts +13 -0
- package/packages/builtin-tool-agent-builder/src/executor.ts +132 -0
- package/packages/builtin-tool-cloud-sandbox/src/client/Inspector/ExecuteCode/index.tsx +5 -14
- package/packages/builtin-tool-cloud-sandbox/src/client/Inspector/RunCommand/index.tsx +5 -13
- package/packages/builtin-tool-group-agent-builder/package.json +7 -1
- package/packages/builtin-tool-group-agent-builder/src/ExecutionRuntime/index.ts +331 -87
- package/packages/builtin-tool-group-agent-builder/src/client/Inspector/BatchCreateAgents/index.tsx +110 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Inspector/CreateAgent/index.tsx +72 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Inspector/InviteAgent/index.tsx +57 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Inspector/RemoveAgent/index.tsx +57 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Inspector/SearchAgent/index.tsx +66 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Inspector/UpdateAgentPrompt/index.tsx +120 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Inspector/UpdateGroup/index.tsx +87 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Inspector/UpdateGroupPrompt/index.tsx +99 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Inspector/index.ts +52 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Render/BatchCreateAgents.tsx +103 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Render/UpdateAgentPrompt/index.tsx +36 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Render/UpdateGroupPrompt/index.tsx +36 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Render/index.ts +16 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Streaming/BatchCreateAgents/index.tsx +88 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Streaming/UpdateAgentPrompt/index.tsx +37 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Streaming/UpdateGroupPrompt/index.tsx +35 -0
- package/packages/builtin-tool-group-agent-builder/src/client/Streaming/index.ts +22 -0
- package/packages/builtin-tool-group-agent-builder/src/client/index.ts +26 -0
- package/packages/builtin-tool-group-agent-builder/src/executor.ts +284 -0
- package/packages/builtin-tool-group-agent-builder/src/index.ts +1 -14
- package/packages/builtin-tool-group-agent-builder/src/manifest.ts +160 -15
- package/packages/builtin-tool-group-agent-builder/src/systemRole.ts +232 -46
- package/packages/builtin-tool-group-agent-builder/src/types.ts +191 -41
- package/packages/builtin-tool-group-management/src/client/Inspector/Broadcast/index.tsx +2 -2
- package/packages/builtin-tool-group-management/src/manifest.ts +1 -1
- package/packages/builtin-tool-gtd/src/client/Inspector/ClearTodos/index.tsx +5 -11
- package/packages/builtin-tool-gtd/src/client/Inspector/CompleteTodos/index.tsx +3 -9
- package/packages/builtin-tool-gtd/src/client/Inspector/CreatePlan/index.tsx +6 -15
- package/packages/builtin-tool-gtd/src/client/Inspector/CreateTodos/index.tsx +3 -9
- package/packages/builtin-tool-gtd/src/client/Inspector/ExecTask/index.tsx +6 -17
- package/packages/builtin-tool-gtd/src/client/Inspector/RemoveTodos/index.tsx +3 -9
- package/packages/builtin-tool-gtd/src/client/Inspector/UpdatePlan/index.tsx +3 -9
- package/packages/builtin-tool-gtd/src/client/Inspector/UpdateTodos/index.tsx +3 -9
- package/packages/builtin-tool-knowledge-base/src/client/Inspector/ReadKnowledge/index.tsx +4 -16
- package/packages/builtin-tool-knowledge-base/src/client/Inspector/SearchKnowledgeBase/index.tsx +5 -16
- package/packages/builtin-tool-local-system/src/client/Inspector/EditLocalFile/index.tsx +4 -12
- package/packages/builtin-tool-local-system/src/client/Inspector/GlobLocalFiles/index.tsx +5 -13
- package/packages/builtin-tool-local-system/src/client/Inspector/GrepContent/index.tsx +5 -16
- package/packages/builtin-tool-local-system/src/client/Inspector/ListLocalFiles/index.tsx +5 -16
- package/packages/builtin-tool-local-system/src/client/Inspector/ReadLocalFile/index.tsx +5 -16
- package/packages/builtin-tool-local-system/src/client/Inspector/RenameLocalFile/index.tsx +5 -11
- package/packages/builtin-tool-local-system/src/client/Inspector/RunCommand/index.tsx +5 -13
- package/packages/builtin-tool-local-system/src/client/Inspector/SearchLocalFiles/index.tsx +5 -16
- package/packages/builtin-tool-local-system/src/client/Inspector/WriteLocalFile/index.tsx +6 -15
- package/packages/builtin-tool-notebook/src/client/Inspector/CreateDocument/index.tsx +7 -15
- package/packages/builtin-tool-page-agent/src/client/Inspector/EditTitle/index.tsx +5 -14
- package/packages/builtin-tool-page-agent/src/client/Inspector/GetPageContent/index.tsx +7 -8
- package/packages/builtin-tool-page-agent/src/client/Inspector/InitPage/index.tsx +4 -10
- package/packages/builtin-tool-page-agent/src/client/Inspector/ModifyNodes/index.tsx +3 -9
- package/packages/builtin-tool-page-agent/src/client/Inspector/ReplaceText/index.tsx +5 -11
- package/packages/builtin-tool-web-browsing/src/client/Inspector/CrawlMultiPages/index.tsx +6 -15
- package/packages/builtin-tool-web-browsing/src/client/Inspector/CrawlSinglePage/index.tsx +6 -15
- package/packages/builtin-tool-web-browsing/src/client/Inspector/Search/index.tsx +4 -15
- package/packages/database/src/models/chatGroup.ts +1 -1
- package/packages/model-bank/src/aiModels/aihubmix.ts +2 -1
- package/packages/model-bank/src/aiModels/google.ts +2 -1
- package/packages/model-bank/src/aiModels/infiniai.ts +9 -6
- package/packages/model-bank/src/aiModels/minimax.ts +9 -5
- package/packages/model-bank/src/aiModels/ollamacloud.ts +4 -2
- package/packages/model-bank/src/aiModels/vertexai.ts +2 -1
- package/packages/types/src/agentGroup/index.ts +8 -0
- package/patches/@upstash__qstash.patch +13 -1
- package/src/app/[variants]/(main)/agent/_layout/Sidebar/Header/Nav.tsx +1 -1
- package/src/app/[variants]/(main)/agent/cron/[cronId]/index.tsx +4 -3
- package/src/app/[variants]/(main)/agent/profile/features/ProfileEditor/index.tsx +1 -1
- package/src/app/[variants]/(main)/agent/profile/features/store/action.ts +18 -21
- package/src/app/[variants]/(main)/group/_layout/GroupIdSync.tsx +6 -1
- package/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/AgentProfilePopup.tsx +29 -21
- package/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/GroupMember.tsx +1 -0
- package/src/app/[variants]/(main)/group/_layout/Sidebar/GroupConfig/GroupMemberItem.tsx +35 -18
- package/src/app/[variants]/(main)/group/_layout/Sidebar/Header/AddTopicButon.tsx +2 -10
- package/src/app/[variants]/(main)/group/_layout/Sidebar/Header/Nav.tsx +10 -2
- package/src/app/[variants]/(main)/group/_layout/Sidebar/Header/index.tsx +1 -2
- package/src/app/[variants]/(main)/group/profile/features/AgentBuilder/AgentBuilderProvider.tsx +1 -0
- package/src/app/[variants]/(main)/group/profile/features/AgentBuilder/TopicSelector.tsx +15 -9
- package/src/app/[variants]/(main)/group/profile/features/AgentBuilder/index.tsx +12 -6
- package/src/app/[variants]/(main)/group/profile/features/{ProfileEditor/AgentHeader.tsx → GroupProfile/GroupHeader.tsx} +22 -29
- package/src/app/[variants]/(main)/group/profile/features/GroupProfile/index.tsx +96 -0
- package/src/app/[variants]/(main)/group/profile/features/Header/AgentBuilderToggle.tsx +3 -4
- package/src/app/[variants]/(main)/group/profile/features/Header/AutoSaveHint.tsx +11 -7
- package/src/app/[variants]/(main)/group/profile/features/Header/ChromeTabs/index.tsx +147 -0
- package/src/app/[variants]/(main)/group/profile/features/Header/index.tsx +104 -13
- package/src/app/[variants]/(main)/group/profile/features/MemberProfile/AgentHeader.tsx +222 -0
- package/src/app/[variants]/(main)/group/profile/features/MemberProfile/index.tsx +155 -0
- package/src/app/[variants]/(main)/group/profile/features/ProfileHydration.tsx +63 -5
- package/src/app/[variants]/(main)/group/profile/index.tsx +34 -37
- package/src/app/[variants]/(mobile)/(home)/_layout/SessionHydration.tsx +1 -1
- package/src/app/[variants]/(mobile)/(home)/features/SessionListContent/List/Item/index.tsx +1 -1
- package/src/features/AgentBuilder/index.tsx +16 -1
- package/src/features/Conversation/Messages/AssistantGroup/Tool/Inspector/StatusIndicator.tsx +3 -2
- package/src/features/EditorCanvas/EditorCanvas.test.tsx +206 -0
- package/src/features/EditorCanvas/EditorDataMode.tsx +53 -19
- package/src/features/EditorModal/index.tsx +2 -2
- package/src/features/NavPanel/components/SessionHydration.tsx +1 -1
- package/src/features/ShareModal/ShareImage/ChatList/index.tsx +1 -1
- package/src/features/ShareModal/SharePdf/index.tsx +1 -1
- package/src/hooks/useBidirectionalQuerySync.ts +112 -0
- package/src/locales/default/chat.ts +10 -0
- package/src/locales/default/plugin.ts +22 -1
- package/src/server/modules/AgentRuntime/RuntimeExecutors.ts +45 -45
- package/src/server/modules/KeyVaultsEncrypt/index.ts +6 -6
- package/src/server/modules/S3/index.ts +1 -1
- package/src/server/routers/lambda/agent.ts +24 -0
- package/src/server/routers/lambda/agentGroup.ts +39 -0
- package/src/services/agent.ts +22 -0
- package/src/services/chatGroup/index.ts +14 -0
- package/src/store/agent/selectors/selectors.ts +3 -0
- package/src/store/agentGroup/initialState.ts +6 -0
- package/src/store/agentGroup/selectors/byId.ts +3 -1
- package/src/store/agentGroup/selectors/current.ts +2 -2
- package/src/store/agentGroup/slices/lifecycle.ts +18 -0
- package/src/store/chat/agents/__tests__/createAgentExecutors/fixtures/mockStore.ts +1 -1
- package/src/store/chat/slices/aiAgent/actions/__tests__/agentGroup.test.ts +4 -1
- package/src/store/chat/slices/aiAgent/actions/agentGroup.ts +1 -1
- package/src/store/chat/slices/aiChat/actions/__tests__/conversationLifecycle.test.ts +65 -0
- package/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts +2 -1
- package/src/store/chat/slices/builtinTool/actions/__tests__/search.test.ts +1 -1
- package/src/store/chat/slices/builtinTool/actions/index.ts +1 -6
- package/src/store/chat/slices/message/action.test.ts +5 -5
- package/src/store/chat/slices/message/actions/publicApi.ts +5 -5
- package/src/store/chat/slices/message/initialState.ts +0 -5
- package/src/store/chat/slices/message/selectors/displayMessage.test.ts +4 -4
- package/src/store/chat/slices/plugin/action.test.ts +54 -19
- package/src/store/chat/slices/plugin/actions/pluginTypes.ts +15 -21
- package/src/store/chat/slices/topic/action.test.ts +74 -24
- package/src/store/chat/slices/topic/action.ts +21 -13
- package/src/store/chat/slices/topic/selectors.test.ts +1 -1
- package/src/store/global/initialState.ts +10 -0
- package/src/store/global/selectors/systemStatus.ts +5 -0
- package/src/store/groupProfile/action.ts +168 -0
- package/src/store/groupProfile/index.ts +16 -0
- package/src/{app/[variants]/(main)/group/profile/features/store → store/groupProfile}/initialState.ts +17 -0
- package/src/store/groupProfile/selectors.ts +13 -0
- package/src/store/tool/slices/builtin/executors/index.ts +4 -0
- package/src/styles/text.ts +16 -0
- package/src/tools/inspectors.ts +13 -0
- package/src/tools/renders.ts +3 -0
- package/src/tools/streamings.ts +8 -0
- package/src/app/[variants]/(main)/group/profile/features/EditorCanvas/TypoBar.tsx +0 -129
- package/src/app/[variants]/(main)/group/profile/features/EditorCanvas/index.tsx +0 -138
- package/src/app/[variants]/(main)/group/profile/features/EditorCanvas/useSlashItems.tsx +0 -139
- package/src/app/[variants]/(main)/group/profile/features/ProfileEditor/index.tsx +0 -82
- package/src/app/[variants]/(main)/group/profile/features/ProfileProvider.tsx +0 -20
- package/src/app/[variants]/(main)/group/profile/features/StoreUpdater.tsx +0 -24
- package/src/app/[variants]/(main)/group/profile/features/store/action.ts +0 -163
- package/src/app/[variants]/(main)/group/profile/features/store/index.ts +0 -23
- package/src/app/[variants]/(main)/group/profile/features/store/selectors.ts +0 -7
- package/src/features/EditorModal/EditorCanvas.tsx +0 -84
- package/src/features/EditorModal/Typobar.tsx +0 -139
- package/src/store/chat/slices/builtinTool/actions/agentBuilder.ts +0 -192
- package/src/store/chat/slices/builtinTool/actions/groupAgentBuilder.ts +0 -242
- package/src/tools/executionRuntimes.ts +0 -14
- /package/src/app/[variants]/(main)/group/profile/features/{ProfileEditor → MemberProfile}/AgentTool.tsx +0 -0
- /package/src/app/[variants]/(main)/group/profile/features/{ProfileEditor → MemberProfile}/MentionList/MentionDropdown.tsx +0 -0
- /package/src/app/[variants]/(main)/group/profile/features/{ProfileEditor → MemberProfile}/MentionList/index.tsx +0 -0
- /package/src/app/[variants]/(main)/group/profile/features/{ProfileEditor → MemberProfile}/MentionList/types.ts +0 -0
- /package/src/app/[variants]/(main)/group/profile/features/{ProfileEditor → MemberProfile}/MentionList/useMentionItems.tsx +0 -0
|
@@ -8,18 +8,12 @@ import { Plus } from 'lucide-react';
|
|
|
8
8
|
import { memo } from 'react';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
10
|
|
|
11
|
-
import { shinyTextStyles } from '@/styles';
|
|
11
|
+
import { oneLineEllipsis, shinyTextStyles } from '@/styles';
|
|
12
12
|
|
|
13
13
|
import type { InitDocumentState } from '../../../types';
|
|
14
14
|
import { AnimatedNumber } from '../../components/AnimatedNumber';
|
|
15
15
|
|
|
16
16
|
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
17
|
-
root: css`
|
|
18
|
-
overflow: hidden;
|
|
19
|
-
display: -webkit-box;
|
|
20
|
-
-webkit-box-orient: vertical;
|
|
21
|
-
-webkit-line-clamp: 1;
|
|
22
|
-
`,
|
|
23
17
|
title: css`
|
|
24
18
|
margin-inline-end: 8px;
|
|
25
19
|
color: ${cssVar.colorText};
|
|
@@ -43,14 +37,14 @@ export const InitPageInspector = memo<BuiltinInspectorProps<InitDocumentArgs, In
|
|
|
43
37
|
if (isArgumentsStreaming) {
|
|
44
38
|
if (!hasContent)
|
|
45
39
|
return (
|
|
46
|
-
<div className={cx(
|
|
40
|
+
<div className={cx(oneLineEllipsis, shinyTextStyles.shinyText)}>
|
|
47
41
|
<span>{t('builtins.lobe-page-agent.apiName.initPage')}</span>
|
|
48
42
|
</div>
|
|
49
43
|
);
|
|
50
44
|
|
|
51
45
|
// During streaming with content, show "creating" title with shiny effect
|
|
52
46
|
return (
|
|
53
|
-
<div className={
|
|
47
|
+
<div className={oneLineEllipsis}>
|
|
54
48
|
<span className={shinyTextStyles.shinyText}>
|
|
55
49
|
{t('builtins.lobe-page-agent.apiName.initPage.creating')}
|
|
56
50
|
</span>
|
|
@@ -74,7 +68,7 @@ export const InitPageInspector = memo<BuiltinInspectorProps<InitDocumentArgs, In
|
|
|
74
68
|
}
|
|
75
69
|
|
|
76
70
|
return (
|
|
77
|
-
<div className={
|
|
71
|
+
<div className={oneLineEllipsis}>
|
|
78
72
|
<span className={styles.title}>
|
|
79
73
|
{t('builtins.lobe-page-agent.apiName.initPage.result')}
|
|
80
74
|
</span>
|
|
@@ -8,17 +8,11 @@ import { DiffIcon, Minus, Plus } from 'lucide-react';
|
|
|
8
8
|
import { type ReactNode, memo, useMemo } from 'react';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
10
|
|
|
11
|
-
import { shinyTextStyles } from '@/styles';
|
|
11
|
+
import { oneLineEllipsis, shinyTextStyles } from '@/styles';
|
|
12
12
|
|
|
13
13
|
import type { ModifyNodesState } from '../../../types';
|
|
14
14
|
|
|
15
15
|
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
16
|
-
root: css`
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
display: -webkit-box;
|
|
19
|
-
-webkit-box-orient: vertical;
|
|
20
|
-
-webkit-line-clamp: 1;
|
|
21
|
-
`,
|
|
22
16
|
separator: css`
|
|
23
17
|
margin-inline: 2px;
|
|
24
18
|
color: ${cssVar.colorTextQuaternary};
|
|
@@ -66,7 +60,7 @@ export const ModifyNodesInspector = memo<BuiltinInspectorProps<ModifyNodesArgs,
|
|
|
66
60
|
// During streaming without operations yet, show init message
|
|
67
61
|
if (isArgumentsStreaming && !hasOperations) {
|
|
68
62
|
return (
|
|
69
|
-
<div className={cx(
|
|
63
|
+
<div className={cx(oneLineEllipsis, shinyTextStyles.shinyText)}>
|
|
70
64
|
<span>{t('builtins.lobe-page-agent.apiName.modifyNodes.init')}</span>
|
|
71
65
|
</div>
|
|
72
66
|
);
|
|
@@ -100,7 +94,7 @@ export const ModifyNodesInspector = memo<BuiltinInspectorProps<ModifyNodesArgs,
|
|
|
100
94
|
}
|
|
101
95
|
|
|
102
96
|
return (
|
|
103
|
-
<div className={cx(
|
|
97
|
+
<div className={cx(oneLineEllipsis, isArgumentsStreaming && shinyTextStyles.shinyText)}>
|
|
104
98
|
<span className={styles.title}>{t('builtins.lobe-page-agent.apiName.modifyNodes')}</span>
|
|
105
99
|
{statsParts.length > 0 && (
|
|
106
100
|
<>
|
|
@@ -8,7 +8,7 @@ import { ArrowRight } from 'lucide-react';
|
|
|
8
8
|
import { memo } from 'react';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
10
|
|
|
11
|
-
import { highlightTextStyles, shinyTextStyles } from '@/styles';
|
|
11
|
+
import { highlightTextStyles, inspectorTextStyles, shinyTextStyles } from '@/styles';
|
|
12
12
|
|
|
13
13
|
import type { ReplaceTextState } from '../../../types';
|
|
14
14
|
|
|
@@ -21,14 +21,6 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
21
21
|
color: ${cssVar.colorTextSecondary};
|
|
22
22
|
text-decoration: line-through;
|
|
23
23
|
`,
|
|
24
|
-
root: css`
|
|
25
|
-
overflow: hidden;
|
|
26
|
-
display: -webkit-box;
|
|
27
|
-
-webkit-box-orient: vertical;
|
|
28
|
-
-webkit-line-clamp: 1;
|
|
29
|
-
|
|
30
|
-
color: ${cssVar.colorTextSecondary};
|
|
31
|
-
`,
|
|
32
24
|
title: css`
|
|
33
25
|
margin-inline-end: 8px;
|
|
34
26
|
color: ${cssVar.colorText};
|
|
@@ -45,7 +37,7 @@ export const ReplaceTextInspector = memo<BuiltinInspectorProps<ReplaceTextArgs,
|
|
|
45
37
|
// During streaming without searchText yet, show init message
|
|
46
38
|
if (isArgumentsStreaming && !from) {
|
|
47
39
|
return (
|
|
48
|
-
<div className={cx(
|
|
40
|
+
<div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
|
|
49
41
|
<span>{t('builtins.lobe-page-agent.apiName.replaceText.init')}</span>
|
|
50
42
|
</div>
|
|
51
43
|
);
|
|
@@ -55,7 +47,9 @@ export const ReplaceTextInspector = memo<BuiltinInspectorProps<ReplaceTextArgs,
|
|
|
55
47
|
const hasResult = from && to !== undefined;
|
|
56
48
|
|
|
57
49
|
return (
|
|
58
|
-
<div
|
|
50
|
+
<div
|
|
51
|
+
className={cx(inspectorTextStyles.root, isArgumentsStreaming && shinyTextStyles.shinyText)}
|
|
52
|
+
>
|
|
59
53
|
<span className={styles.title}>{t('builtins.lobe-page-agent.apiName.replaceText')}</span>
|
|
60
54
|
{hasResult && (
|
|
61
55
|
<>
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { type BuiltinInspectorProps } from '@lobechat/types';
|
|
4
|
-
import {
|
|
4
|
+
import { cx } from 'antd-style';
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
8
|
-
import { highlightTextStyles, shinyTextStyles } from '@/styles';
|
|
9
|
-
|
|
10
|
-
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
11
|
-
root: css`
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
display: -webkit-box;
|
|
14
|
-
-webkit-box-orient: vertical;
|
|
15
|
-
-webkit-line-clamp: 1;
|
|
16
|
-
|
|
17
|
-
color: ${cssVar.colorTextSecondary};
|
|
18
|
-
`,
|
|
19
|
-
}));
|
|
8
|
+
import { highlightTextStyles, inspectorTextStyles, shinyTextStyles } from '@/styles';
|
|
20
9
|
|
|
21
10
|
interface CrawlMultiPagesParams {
|
|
22
11
|
urls: string[];
|
|
@@ -42,14 +31,16 @@ export const CrawlMultiPagesInspector = memo<BuiltinInspectorProps<CrawlMultiPag
|
|
|
42
31
|
|
|
43
32
|
if (isArgumentsStreaming && !displayText) {
|
|
44
33
|
return (
|
|
45
|
-
<div className={cx(
|
|
34
|
+
<div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
|
|
46
35
|
<span>{t('builtins.lobe-web-browsing.apiName.crawlMultiPages')}</span>
|
|
47
36
|
</div>
|
|
48
37
|
);
|
|
49
38
|
}
|
|
50
39
|
|
|
51
40
|
return (
|
|
52
|
-
<div
|
|
41
|
+
<div
|
|
42
|
+
className={cx(inspectorTextStyles.root, isArgumentsStreaming && shinyTextStyles.shinyText)}
|
|
43
|
+
>
|
|
53
44
|
<span>{t('builtins.lobe-web-browsing.apiName.crawlMultiPages')}: </span>
|
|
54
45
|
{displayText && <span className={highlightTextStyles.gold}>{displayText}</span>}
|
|
55
46
|
</div>
|
|
@@ -1,22 +1,11 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import type { BuiltinInspectorProps } from '@lobechat/types';
|
|
4
|
-
import {
|
|
4
|
+
import { cx } from 'antd-style';
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
import { useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
8
|
-
import { highlightTextStyles, shinyTextStyles } from '@/styles';
|
|
9
|
-
|
|
10
|
-
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
11
|
-
root: css`
|
|
12
|
-
overflow: hidden;
|
|
13
|
-
display: -webkit-box;
|
|
14
|
-
-webkit-box-orient: vertical;
|
|
15
|
-
-webkit-line-clamp: 1;
|
|
16
|
-
|
|
17
|
-
color: ${cssVar.colorTextSecondary};
|
|
18
|
-
`,
|
|
19
|
-
}));
|
|
8
|
+
import { highlightTextStyles, inspectorTextStyles, shinyTextStyles } from '@/styles';
|
|
20
9
|
|
|
21
10
|
interface CrawlSinglePageParams {
|
|
22
11
|
url: string;
|
|
@@ -30,14 +19,16 @@ export const CrawlSinglePageInspector = memo<BuiltinInspectorProps<CrawlSinglePa
|
|
|
30
19
|
|
|
31
20
|
if (isArgumentsStreaming && !url) {
|
|
32
21
|
return (
|
|
33
|
-
<div className={cx(
|
|
22
|
+
<div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
|
|
34
23
|
<span>{t('builtins.lobe-web-browsing.apiName.crawlSinglePage')}</span>
|
|
35
24
|
</div>
|
|
36
25
|
);
|
|
37
26
|
}
|
|
38
27
|
|
|
39
28
|
return (
|
|
40
|
-
<div
|
|
29
|
+
<div
|
|
30
|
+
className={cx(inspectorTextStyles.root, isArgumentsStreaming && shinyTextStyles.shinyText)}
|
|
31
|
+
>
|
|
41
32
|
<span>{t('builtins.lobe-web-browsing.apiName.crawlSinglePage')}: </span>
|
|
42
33
|
{url && <span className={highlightTextStyles.gold}>{url}</span>}
|
|
43
34
|
</div>
|
|
@@ -6,22 +6,11 @@ import {
|
|
|
6
6
|
type UniformSearchResponse,
|
|
7
7
|
} from '@lobechat/types';
|
|
8
8
|
import { Text } from '@lobehub/ui';
|
|
9
|
-
import {
|
|
9
|
+
import { cssVar, cx } from 'antd-style';
|
|
10
10
|
import { memo } from 'react';
|
|
11
11
|
import { useTranslation } from 'react-i18next';
|
|
12
12
|
|
|
13
|
-
import { highlightTextStyles, shinyTextStyles } from '@/styles';
|
|
14
|
-
|
|
15
|
-
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
16
|
-
root: css`
|
|
17
|
-
overflow: hidden;
|
|
18
|
-
display: -webkit-box;
|
|
19
|
-
-webkit-box-orient: vertical;
|
|
20
|
-
-webkit-line-clamp: 1;
|
|
21
|
-
|
|
22
|
-
color: ${cssVar.colorTextSecondary};
|
|
23
|
-
`,
|
|
24
|
-
}));
|
|
13
|
+
import { highlightTextStyles, inspectorTextStyles, shinyTextStyles } from '@/styles';
|
|
25
14
|
|
|
26
15
|
export const SearchInspector = memo<BuiltinInspectorProps<SearchQuery, UniformSearchResponse>>(
|
|
27
16
|
({ args, partialArgs, isArgumentsStreaming, isLoading, pluginState }) => {
|
|
@@ -33,7 +22,7 @@ export const SearchInspector = memo<BuiltinInspectorProps<SearchQuery, UniformSe
|
|
|
33
22
|
|
|
34
23
|
if (isArgumentsStreaming && !query) {
|
|
35
24
|
return (
|
|
36
|
-
<div className={cx(
|
|
25
|
+
<div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
|
|
37
26
|
<span>{t('builtins.lobe-web-browsing.apiName.search')}</span>
|
|
38
27
|
</div>
|
|
39
28
|
);
|
|
@@ -42,7 +31,7 @@ export const SearchInspector = memo<BuiltinInspectorProps<SearchQuery, UniformSe
|
|
|
42
31
|
return (
|
|
43
32
|
<div
|
|
44
33
|
className={cx(
|
|
45
|
-
|
|
34
|
+
inspectorTextStyles.root,
|
|
46
35
|
(isArgumentsStreaming || isLoading) && shinyTextStyles.shinyText,
|
|
47
36
|
)}
|
|
48
37
|
>
|
|
@@ -115,7 +115,7 @@ export class ChatGroupModel {
|
|
|
115
115
|
async update(id: string, value: Partial<ChatGroupItem>): Promise<ChatGroupItem> {
|
|
116
116
|
const [result] = await this.db
|
|
117
117
|
.update(chatGroups)
|
|
118
|
-
.set(
|
|
118
|
+
.set(value)
|
|
119
119
|
.where(and(eq(chatGroups.id, id), eq(chatGroups.userId, this.userId)))
|
|
120
120
|
.returning();
|
|
121
121
|
|
|
@@ -1155,7 +1155,8 @@ const aihubmixModels: AIChatModelCard[] = [
|
|
|
1155
1155
|
vision: true,
|
|
1156
1156
|
},
|
|
1157
1157
|
contextWindowTokens: 1_048_576 + 65_536,
|
|
1158
|
-
description:
|
|
1158
|
+
description:
|
|
1159
|
+
'Gemini 3 Flash is the smartest model built for speed, combining cutting-edge intelligence with excellent search grounding.',
|
|
1159
1160
|
displayName: 'Gemini 3 Flash Preview',
|
|
1160
1161
|
enabled: true,
|
|
1161
1162
|
id: 'gemini-3-flash-preview',
|
|
@@ -182,7 +182,8 @@ const googleChatModels: AIChatModelCard[] = [
|
|
|
182
182
|
vision: true,
|
|
183
183
|
},
|
|
184
184
|
contextWindowTokens: 1_048_576 + 65_536,
|
|
185
|
-
description:
|
|
185
|
+
description:
|
|
186
|
+
'Gemini 3 Flash is the smartest model built for speed, combining cutting-edge intelligence with excellent search grounding.',
|
|
186
187
|
displayName: 'Gemini 3 Flash Preview',
|
|
187
188
|
enabled: true,
|
|
188
189
|
id: 'gemini-3-flash-preview',
|
|
@@ -91,7 +91,8 @@ const infiniaiChatModels: AIChatModelCard[] = [
|
|
|
91
91
|
reasoning: true,
|
|
92
92
|
},
|
|
93
93
|
contextWindowTokens: 131_072,
|
|
94
|
-
description:
|
|
94
|
+
description:
|
|
95
|
+
'GLM-4.7 is the latest large language model launched by Zhipu AI, with enhanced reasoning and generation capabilities.',
|
|
95
96
|
displayName: 'GLM-4.7',
|
|
96
97
|
enabled: true,
|
|
97
98
|
id: 'glm-4.7',
|
|
@@ -114,7 +115,8 @@ const infiniaiChatModels: AIChatModelCard[] = [
|
|
|
114
115
|
reasoning: true,
|
|
115
116
|
},
|
|
116
117
|
contextWindowTokens: 131_072,
|
|
117
|
-
description:
|
|
118
|
+
description:
|
|
119
|
+
'GLM-4.6 is the latest large language model launched by Zhipu AI, with enhanced reasoning and generation capabilities.',
|
|
118
120
|
displayName: 'GLM-4.6',
|
|
119
121
|
id: 'glm-4.6',
|
|
120
122
|
maxOutput: 4096,
|
|
@@ -136,7 +138,8 @@ const infiniaiChatModels: AIChatModelCard[] = [
|
|
|
136
138
|
reasoning: true,
|
|
137
139
|
},
|
|
138
140
|
contextWindowTokens: 131_072,
|
|
139
|
-
description:
|
|
141
|
+
description:
|
|
142
|
+
'DeepSeek-V3.2-Exp is an experimental DeepSeek LLM with stronger reasoning and generation.',
|
|
140
143
|
displayName: 'DeepSeek V3.2 Exp',
|
|
141
144
|
id: 'deepseek-v3.2-exp',
|
|
142
145
|
maxOutput: 65_536,
|
|
@@ -301,7 +304,8 @@ const infiniaiChatModels: AIChatModelCard[] = [
|
|
|
301
304
|
vision: true,
|
|
302
305
|
},
|
|
303
306
|
contextWindowTokens: 131_072,
|
|
304
|
-
description:
|
|
307
|
+
description:
|
|
308
|
+
'GLM-4.5V is a multimodal model from Zhipu AI for vision understanding and reasoning.',
|
|
305
309
|
displayName: 'GLM-4.5V',
|
|
306
310
|
id: 'glm-4.5v',
|
|
307
311
|
maxOutput: 4096,
|
|
@@ -400,8 +404,7 @@ const infiniaiChatModels: AIChatModelCard[] = [
|
|
|
400
404
|
functionCall: true,
|
|
401
405
|
},
|
|
402
406
|
contextWindowTokens: 131_072,
|
|
403
|
-
description:
|
|
404
|
-
'Kimi K2 Instruct is a Moonshot AI LLM with ultra-long context handling.',
|
|
407
|
+
description: 'Kimi K2 Instruct is a Moonshot AI LLM with ultra-long context handling.',
|
|
405
408
|
displayName: 'Kimi K2 Instruct',
|
|
406
409
|
id: 'kimi-k2-instruct',
|
|
407
410
|
maxOutput: 32_768,
|
|
@@ -7,7 +7,8 @@ const minimaxChatModels: AIChatModelCard[] = [
|
|
|
7
7
|
reasoning: true,
|
|
8
8
|
},
|
|
9
9
|
contextWindowTokens: 204_800,
|
|
10
|
-
description:
|
|
10
|
+
description:
|
|
11
|
+
'Powerful multilingual programming capabilities, comprehensively upgraded programming experience',
|
|
11
12
|
displayName: 'MiniMax M2.1',
|
|
12
13
|
enabled: true,
|
|
13
14
|
id: 'MiniMax-M2.1',
|
|
@@ -30,7 +31,8 @@ const minimaxChatModels: AIChatModelCard[] = [
|
|
|
30
31
|
reasoning: true,
|
|
31
32
|
},
|
|
32
33
|
contextWindowTokens: 204_800,
|
|
33
|
-
description:
|
|
34
|
+
description:
|
|
35
|
+
'Powerful multilingual programming capabilities, comprehensively upgraded programming experience. Faster and more efficient.',
|
|
34
36
|
displayName: 'MiniMax M2.1 Lightning',
|
|
35
37
|
id: 'MiniMax-M2.1-Lightning',
|
|
36
38
|
maxOutput: 131_072,
|
|
@@ -52,7 +54,7 @@ const minimaxChatModels: AIChatModelCard[] = [
|
|
|
52
54
|
reasoning: true,
|
|
53
55
|
},
|
|
54
56
|
contextWindowTokens: 204_800,
|
|
55
|
-
description: '
|
|
57
|
+
description: 'Built specifically for efficient coding and Agent workflows',
|
|
56
58
|
displayName: 'MiniMax M2',
|
|
57
59
|
id: 'MiniMax-M2',
|
|
58
60
|
maxOutput: 131_072,
|
|
@@ -74,7 +76,8 @@ const minimaxChatModels: AIChatModelCard[] = [
|
|
|
74
76
|
reasoning: true,
|
|
75
77
|
},
|
|
76
78
|
contextWindowTokens: 204_800,
|
|
77
|
-
description:
|
|
79
|
+
description:
|
|
80
|
+
'Built for efficient coding and agent workflows, with higher concurrency for commercial use.',
|
|
78
81
|
displayName: 'MiniMax M2 Stable',
|
|
79
82
|
id: 'MiniMax-M2-Stable',
|
|
80
83
|
maxOutput: 131_072,
|
|
@@ -136,7 +139,8 @@ const minimaxChatModels: AIChatModelCard[] = [
|
|
|
136
139
|
|
|
137
140
|
const minimaxImageModels: AIImageModelCard[] = [
|
|
138
141
|
{
|
|
139
|
-
description:
|
|
142
|
+
description:
|
|
143
|
+
'A new image generation model with fine detail, supporting text-to-image and image-to-image.',
|
|
140
144
|
displayName: 'Image 01',
|
|
141
145
|
enabled: true,
|
|
142
146
|
id: 'image-01',
|
|
@@ -45,7 +45,8 @@ const ollamaCloudModels: AIChatModelCard[] = [
|
|
|
45
45
|
vision: true,
|
|
46
46
|
},
|
|
47
47
|
contextWindowTokens: 1_048_576,
|
|
48
|
-
description:
|
|
48
|
+
description:
|
|
49
|
+
'Gemini 3 Flash is the smartest model built for speed, combining cutting-edge intelligence with excellent search grounding.',
|
|
49
50
|
displayName: 'Gemini 3 Flash Preview',
|
|
50
51
|
id: 'gemini-3-flash-preview',
|
|
51
52
|
releasedAt: '2025-12-17',
|
|
@@ -68,7 +69,8 @@ const ollamaCloudModels: AIChatModelCard[] = [
|
|
|
68
69
|
reasoning: true,
|
|
69
70
|
},
|
|
70
71
|
contextWindowTokens: 204_800,
|
|
71
|
-
description:
|
|
72
|
+
description:
|
|
73
|
+
'MiniMax M2 is an efficient large language model built specifically for coding and agent workflows.',
|
|
72
74
|
displayName: 'MiniMax M2',
|
|
73
75
|
id: 'minimax-m2',
|
|
74
76
|
type: 'chat',
|
|
@@ -72,7 +72,8 @@ const vertexaiChatModels: AIChatModelCard[] = [
|
|
|
72
72
|
vision: true,
|
|
73
73
|
},
|
|
74
74
|
contextWindowTokens: 1_048_576 + 65_536,
|
|
75
|
-
description:
|
|
75
|
+
description:
|
|
76
|
+
'Gemini 3 Flash is the smartest model built for speed, combining cutting-edge intelligence with excellent search grounding.',
|
|
76
77
|
displayName: 'Gemini 3 Flash Preview',
|
|
77
78
|
enabled: true,
|
|
78
79
|
id: 'gemini-3-flash-preview',
|
|
@@ -5,6 +5,8 @@ import { TaskDetail, UIChatMessage } from '../message';
|
|
|
5
5
|
import { ChatTopic } from '../topic';
|
|
6
6
|
|
|
7
7
|
export interface LobeChatGroupMetaConfig {
|
|
8
|
+
avatar?: string;
|
|
9
|
+
backgroundColor?: string;
|
|
8
10
|
description: string;
|
|
9
11
|
title: string;
|
|
10
12
|
}
|
|
@@ -75,6 +77,8 @@ export interface NewChatGroupAgent {
|
|
|
75
77
|
|
|
76
78
|
// New Chat Group type for creating groups (independent from schema)
|
|
77
79
|
export interface NewChatGroup {
|
|
80
|
+
avatar?: string | null;
|
|
81
|
+
backgroundColor?: string | null;
|
|
78
82
|
clientId?: string | null;
|
|
79
83
|
config?: LobeChatGroupConfig | null;
|
|
80
84
|
description?: string | null;
|
|
@@ -88,10 +92,14 @@ export interface NewChatGroup {
|
|
|
88
92
|
// Chat Group Item type (independent from schema)
|
|
89
93
|
export interface ChatGroupItem {
|
|
90
94
|
accessedAt?: Date;
|
|
95
|
+
avatar?: string | null;
|
|
96
|
+
backgroundColor?: string | null;
|
|
91
97
|
clientId?: string | null;
|
|
92
98
|
config?: LobeChatGroupConfig | null;
|
|
99
|
+
content?: string | null;
|
|
93
100
|
createdAt: Date;
|
|
94
101
|
description?: string | null;
|
|
102
|
+
editorData?: Record<string, any> | null;
|
|
95
103
|
groupId?: string | null;
|
|
96
104
|
id: string;
|
|
97
105
|
pinned?: boolean | null;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
diff --git a/chunk-RQPZUJXG.mjs b/chunk-RQPZUJXG.mjs
|
|
2
|
-
index d1a9b4a460efc59304ec30e6bc63a127f1aac6d6..
|
|
2
|
+
index d1a9b4a460efc59304ec30e6bc63a127f1aac6d6..4303089796e63297f79926fc9f9bd976029b1a8e 100644
|
|
3
3
|
--- a/chunk-RQPZUJXG.mjs
|
|
4
4
|
+++ b/chunk-RQPZUJXG.mjs
|
|
5
5
|
@@ -326,6 +326,20 @@ var HttpClient = class {
|
|
@@ -23,3 +23,15 @@ index d1a9b4a460efc59304ec30e6bc63a127f1aac6d6..6653a61b539aaf91253300436a8072c6
|
|
|
23
23
|
throw new QstashError(
|
|
24
24
|
body.length > 0 ? body : `Error: status=${response.status}`,
|
|
25
25
|
response.status
|
|
26
|
+
@@ -1841,8 +1855,10 @@ var AutoExecutor = class _AutoExecutor {
|
|
27
|
+
if (error instanceof QStashWorkflowAbort) {
|
|
28
|
+
throw error;
|
|
29
|
+
}
|
|
30
|
+
+
|
|
31
|
+
+ const errorMessage = error instanceof Error ? error.message : typeof error === "object" ? JSON.stringify(error) : String(error);
|
|
32
|
+
throw new QStashWorkflowError(
|
|
33
|
+
- `Error submitting steps to QStash in partial parallel step execution: ${error}`
|
|
34
|
+
+ `Error submitting steps to QStash in partial parallel step execution: ${errorMessage}`
|
|
35
|
+
);
|
|
36
|
+
}
|
|
37
|
+
break;
|
|
@@ -55,7 +55,7 @@ const Nav = memo(() => {
|
|
|
55
55
|
active={isProfileActive}
|
|
56
56
|
icon={BotPromptIcon}
|
|
57
57
|
onClick={() => {
|
|
58
|
-
switchTopic(
|
|
58
|
+
switchTopic(null, { skipRefreshMessage: true });
|
|
59
59
|
router.push(urlJoin('/agent', agentId!, 'profile'));
|
|
60
60
|
}}
|
|
61
61
|
title={t('tab.profile')}
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
ReactMathPlugin,
|
|
12
12
|
ReactTablePlugin,
|
|
13
13
|
} from '@lobehub/editor';
|
|
14
|
-
import { Editor, useEditor } from '@lobehub/editor/react';
|
|
14
|
+
import { Editor, useEditor, useEditorState } from '@lobehub/editor/react';
|
|
15
15
|
import { ActionIcon, Flexbox, Icon, Input, Tag, Text } from '@lobehub/ui';
|
|
16
16
|
import { useDebounceFn } from 'ahooks';
|
|
17
17
|
import { App, Card, Checkbox, Empty, InputNumber, Select, Switch, TimePicker, message } from 'antd';
|
|
@@ -33,7 +33,7 @@ import useSWR from 'swr';
|
|
|
33
33
|
import AutoSaveHint from '@/components/Editor/AutoSaveHint';
|
|
34
34
|
import Loading from '@/components/Loading/BrandTextLoading';
|
|
35
35
|
import type { ExecutionConditions, UpdateAgentCronJobData } from '@/database/schemas/agentCronJob';
|
|
36
|
-
import
|
|
36
|
+
import { InlineToolbar } from '@/features/EditorCanvas';
|
|
37
37
|
import NavHeader from '@/features/NavHeader';
|
|
38
38
|
import WideScreenContainer from '@/features/WideScreenContainer';
|
|
39
39
|
import { useQueryRoute } from '@/hooks/useQueryRoute';
|
|
@@ -142,6 +142,7 @@ const CronJobDetailPage = memo(() => {
|
|
|
142
142
|
const router = useQueryRoute();
|
|
143
143
|
const { modal } = App.useApp();
|
|
144
144
|
const editor = useEditor();
|
|
145
|
+
const editorState = useEditorState(editor);
|
|
145
146
|
const enableRichRender = useUserStore(labPreferSelectors.enableInputMarkdown);
|
|
146
147
|
const [editorReady, setEditorReady] = useState(false);
|
|
147
148
|
|
|
@@ -628,7 +629,7 @@ const CronJobDetailPage = memo(() => {
|
|
|
628
629
|
style={{ borderRadius: 12, overflow: 'hidden' }}
|
|
629
630
|
styles={{ body: { padding: 0 } }}
|
|
630
631
|
>
|
|
631
|
-
{enableRichRender && <
|
|
632
|
+
{enableRichRender && <InlineToolbar editor={editor} editorState={editorState} />}
|
|
632
633
|
<Flexbox padding={16} style={{ minHeight: 220 }}>
|
|
633
634
|
<Editor
|
|
634
635
|
content={''}
|
|
@@ -88,7 +88,7 @@ const ProfileEditor = memo(() => {
|
|
|
88
88
|
onClick={() => {
|
|
89
89
|
if (!agentId) return;
|
|
90
90
|
// Clear topicId before navigating to prevent stale state
|
|
91
|
-
switchTopic(
|
|
91
|
+
switchTopic(null, { skipRefreshMessage: true });
|
|
92
92
|
router.push(urlJoin('/agent', agentId));
|
|
93
93
|
}}
|
|
94
94
|
type={'primary'}
|
|
@@ -28,26 +28,25 @@ export interface Action {
|
|
|
28
28
|
|
|
29
29
|
export type Store = State & Action;
|
|
30
30
|
|
|
31
|
-
//
|
|
32
|
-
|
|
33
|
-
get: () => Store,
|
|
34
|
-
updateConfig: (payload: SaveConfigPayload) => Promise<void>,
|
|
35
|
-
) =>
|
|
36
|
-
debounce(
|
|
37
|
-
async (payload: SaveConfigPayload) => {
|
|
38
|
-
try {
|
|
39
|
-
await updateConfig(payload);
|
|
40
|
-
} catch (error) {
|
|
41
|
-
console.error('[ProfileEditor] Failed to save:', error);
|
|
42
|
-
}
|
|
43
|
-
},
|
|
44
|
-
EDITOR_DEBOUNCE_TIME,
|
|
45
|
-
{ leading: false, maxWait: EDITOR_MAX_WAIT, trailing: true },
|
|
46
|
-
);
|
|
31
|
+
// Store the latest updateConfig reference to avoid stale closures
|
|
32
|
+
let updateConfigRef: ((payload: SaveConfigPayload) => Promise<void>) | null = null;
|
|
47
33
|
|
|
48
34
|
export const store: (initState?: Partial<State>) => StateCreator<Store> =
|
|
49
35
|
(initState) => (set, get) => {
|
|
50
|
-
|
|
36
|
+
// Create debounced save that uses the latest callback reference
|
|
37
|
+
const debouncedSave = debounce(
|
|
38
|
+
async (payload: SaveConfigPayload) => {
|
|
39
|
+
try {
|
|
40
|
+
if (updateConfigRef) {
|
|
41
|
+
await updateConfigRef(payload);
|
|
42
|
+
}
|
|
43
|
+
} catch (error) {
|
|
44
|
+
console.error('[ProfileEditor] Failed to save:', error);
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
EDITOR_DEBOUNCE_TIME,
|
|
48
|
+
{ leading: false, maxWait: EDITOR_MAX_WAIT, trailing: true },
|
|
49
|
+
);
|
|
51
50
|
|
|
52
51
|
return {
|
|
53
52
|
...initialState,
|
|
@@ -115,10 +114,8 @@ export const store: (initState?: Partial<State>) => StateCreator<Store> =
|
|
|
115
114
|
const { editor } = get();
|
|
116
115
|
if (!editor) return;
|
|
117
116
|
|
|
118
|
-
//
|
|
119
|
-
|
|
120
|
-
debouncedSave = createDebouncedSave(get, updateConfig);
|
|
121
|
-
}
|
|
117
|
+
// Always update ref to use the latest callback
|
|
118
|
+
updateConfigRef = updateConfig;
|
|
122
119
|
|
|
123
120
|
try {
|
|
124
121
|
const markdownContent = (editor.getDocument('markdown') as unknown as string) || '';
|
|
@@ -2,6 +2,7 @@ import { useUnmount } from 'ahooks';
|
|
|
2
2
|
import { useParams } from 'react-router-dom';
|
|
3
3
|
import { createStoreUpdater } from 'zustand-utils';
|
|
4
4
|
|
|
5
|
+
import { useQueryRoute } from '@/hooks/useQueryRoute';
|
|
5
6
|
import { useAgentGroupStore } from '@/store/agentGroup';
|
|
6
7
|
import { useChatStore } from '@/store/chat';
|
|
7
8
|
|
|
@@ -9,14 +10,18 @@ const GroupIdSync = () => {
|
|
|
9
10
|
const useAgentGroupStoreUpdater = createStoreUpdater(useAgentGroupStore);
|
|
10
11
|
const useChatStoreUpdater = createStoreUpdater(useChatStore);
|
|
11
12
|
const params = useParams<{ gid?: string }>();
|
|
13
|
+
const router = useQueryRoute();
|
|
12
14
|
|
|
13
15
|
// Sync groupId to agentGroupStore and chatStore
|
|
14
16
|
useAgentGroupStoreUpdater('activeGroupId', params.gid);
|
|
15
17
|
useChatStoreUpdater('activeGroupId', params.gid);
|
|
16
18
|
|
|
19
|
+
// Inject router to agentGroupStore for navigation
|
|
20
|
+
useAgentGroupStoreUpdater('router', router);
|
|
21
|
+
|
|
17
22
|
// Clear activeGroupId when unmounting (leaving group page)
|
|
18
23
|
useUnmount(() => {
|
|
19
|
-
useAgentGroupStore.setState({ activeGroupId: undefined });
|
|
24
|
+
useAgentGroupStore.setState({ activeGroupId: undefined, router: undefined });
|
|
20
25
|
useChatStore.setState({ activeGroupId: undefined, activeTopicId: undefined });
|
|
21
26
|
});
|
|
22
27
|
|