@lobehub/lobehub 2.0.0-next.273 → 2.0.0-next.275
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 +59 -0
- package/changelog/v1.json +18 -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 +2 -2
- 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)/community/(detail)/features/MakedownRender.tsx +8 -6
- 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]/(main)/settings/proxy/features/ProxyForm.tsx +156 -253
- package/src/app/[variants]/(main)/settings/proxy/index.tsx +1 -3
- 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/Conversation/Messages/User/useMarkdown.tsx +1 -0
- 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/PageEditor/EditorCanvas/useAskCopilotItem.tsx +10 -6
- package/src/features/PageEditor/Header/index.tsx +12 -10
- package/src/features/PageEditor/Header/useMenu.tsx +45 -48
- package/src/features/RightPanel/ToggleRightPanelButton.tsx +3 -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/tests/mocks/lru_map.ts +40 -0
- package/vitest.config.mts +9 -1
- 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
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { UpdateAgentConfigParams } from '@lobechat/builtin-tool-agent-builder';
|
|
1
2
|
import type { MetaData } from '@lobechat/types';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -9,22 +10,29 @@ export const GroupAgentBuilderIdentifier = 'lobe-group-agent-builder';
|
|
|
9
10
|
* Group Agent Builder API Names
|
|
10
11
|
*/
|
|
11
12
|
export const GroupAgentBuilderApiName = {
|
|
13
|
+
// Group member management operations
|
|
14
|
+
batchCreateAgents: 'batchCreateAgents',
|
|
15
|
+
createAgent: 'createAgent',
|
|
16
|
+
|
|
12
17
|
// Read operations (inherited from AgentBuilder)
|
|
13
18
|
getAvailableModels: 'getAvailableModels',
|
|
19
|
+
|
|
14
20
|
// Write operations (inherited from AgentBuilder)
|
|
15
21
|
installPlugin: 'installPlugin',
|
|
16
22
|
|
|
17
|
-
// Group-specific operations
|
|
18
23
|
inviteAgent: 'inviteAgent',
|
|
19
24
|
|
|
20
25
|
removeAgent: 'removeAgent',
|
|
21
26
|
|
|
27
|
+
searchAgent: 'searchAgent',
|
|
28
|
+
|
|
22
29
|
searchMarketTools: 'searchMarketTools',
|
|
23
30
|
|
|
24
31
|
updateAgentConfig: 'updateConfig',
|
|
25
|
-
// Group
|
|
26
|
-
|
|
27
|
-
|
|
32
|
+
// Group operations
|
|
33
|
+
updateAgentPrompt: 'updateAgentPrompt',
|
|
34
|
+
updateGroup: 'updateGroup',
|
|
35
|
+
updateGroupPrompt: 'updateGroupPrompt',
|
|
28
36
|
} as const;
|
|
29
37
|
|
|
30
38
|
export type GroupAgentBuilderApiNameType =
|
|
@@ -32,79 +40,99 @@ export type GroupAgentBuilderApiNameType =
|
|
|
32
40
|
|
|
33
41
|
// ============== Group-specific Parameter Types ==============
|
|
34
42
|
|
|
35
|
-
export interface
|
|
43
|
+
export interface SearchAgentParams {
|
|
36
44
|
/**
|
|
37
|
-
*
|
|
45
|
+
* Maximum number of results to return
|
|
38
46
|
*/
|
|
39
|
-
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
export interface RemoveAgentParams {
|
|
47
|
+
limit?: number;
|
|
43
48
|
/**
|
|
44
|
-
*
|
|
49
|
+
* Search query to find agents by name or description
|
|
45
50
|
*/
|
|
46
|
-
|
|
51
|
+
query?: string;
|
|
47
52
|
}
|
|
48
53
|
|
|
49
|
-
export interface
|
|
54
|
+
export interface CreateAgentParams {
|
|
50
55
|
/**
|
|
51
|
-
*
|
|
56
|
+
* An emoji or image URL for the agent's avatar
|
|
52
57
|
*/
|
|
53
|
-
|
|
58
|
+
avatar?: string;
|
|
54
59
|
/**
|
|
55
|
-
*
|
|
60
|
+
* A brief description of what this agent does
|
|
56
61
|
*/
|
|
57
|
-
|
|
62
|
+
description?: string;
|
|
63
|
+
/**
|
|
64
|
+
* The system prompt that defines the agent's behavior
|
|
65
|
+
*/
|
|
66
|
+
systemRole: string;
|
|
67
|
+
/**
|
|
68
|
+
* The display name for the new agent
|
|
69
|
+
*/
|
|
70
|
+
title: string;
|
|
71
|
+
/**
|
|
72
|
+
* List of tool identifiers to enable for this agent.
|
|
73
|
+
* Use the same identifiers as shown in official_tools context.
|
|
74
|
+
*/
|
|
75
|
+
tools?: string[];
|
|
58
76
|
}
|
|
59
77
|
|
|
60
|
-
export interface
|
|
78
|
+
export interface InviteAgentParams {
|
|
61
79
|
/**
|
|
62
|
-
*
|
|
80
|
+
* Agent identifier to invite to the group
|
|
63
81
|
*/
|
|
64
|
-
|
|
82
|
+
agentId: string;
|
|
65
83
|
}
|
|
66
84
|
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
export interface InviteAgentState {
|
|
85
|
+
export interface RemoveAgentParams {
|
|
70
86
|
/**
|
|
71
|
-
* Agent identifier
|
|
87
|
+
* Agent identifier to remove from the group
|
|
72
88
|
*/
|
|
73
89
|
agentId: string;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export interface UpdateAgentPromptParams {
|
|
74
93
|
/**
|
|
75
|
-
*
|
|
94
|
+
* The agent ID to update
|
|
76
95
|
*/
|
|
77
|
-
|
|
96
|
+
agentId: string;
|
|
78
97
|
/**
|
|
79
|
-
*
|
|
98
|
+
* The new system prompt content (markdown format)
|
|
80
99
|
*/
|
|
81
|
-
|
|
100
|
+
prompt: string;
|
|
82
101
|
}
|
|
83
102
|
|
|
84
|
-
export interface
|
|
103
|
+
export interface UpdateAgentPromptState {
|
|
85
104
|
/**
|
|
86
|
-
*
|
|
105
|
+
* The agent ID that was updated
|
|
87
106
|
*/
|
|
88
107
|
agentId: string;
|
|
89
108
|
/**
|
|
90
|
-
*
|
|
109
|
+
* The new prompt
|
|
91
110
|
*/
|
|
92
|
-
|
|
111
|
+
newPrompt: string;
|
|
112
|
+
/**
|
|
113
|
+
* The previous prompt
|
|
114
|
+
*/
|
|
115
|
+
previousPrompt?: string;
|
|
93
116
|
/**
|
|
94
117
|
* Whether the operation was successful
|
|
95
118
|
*/
|
|
96
119
|
success: boolean;
|
|
97
120
|
}
|
|
98
121
|
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
122
|
+
/**
|
|
123
|
+
* Extended UpdateAgentConfigParams with optional agentId for group context
|
|
124
|
+
*/
|
|
125
|
+
export interface UpdateAgentConfigWithIdParams extends UpdateAgentConfigParams {
|
|
126
|
+
/**
|
|
127
|
+
* The agent ID to update. If not provided, updates the supervisor agent.
|
|
128
|
+
*/
|
|
129
|
+
agentId?: string;
|
|
103
130
|
}
|
|
104
131
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
132
|
+
/**
|
|
133
|
+
* Unified params for updating group (combines config and meta)
|
|
134
|
+
*/
|
|
135
|
+
export interface UpdateGroupParams {
|
|
108
136
|
/**
|
|
109
137
|
* Partial group configuration to update
|
|
110
138
|
*/
|
|
@@ -118,9 +146,13 @@ export interface UpdateGroupConfigParams {
|
|
|
118
146
|
*/
|
|
119
147
|
openingQuestions?: string[];
|
|
120
148
|
};
|
|
149
|
+
/**
|
|
150
|
+
* Partial metadata to update for the group
|
|
151
|
+
*/
|
|
152
|
+
meta?: Partial<Pick<MetaData, 'avatar' | 'backgroundColor' | 'description' | 'tags' | 'title'>>;
|
|
121
153
|
}
|
|
122
154
|
|
|
123
|
-
export interface
|
|
155
|
+
export interface UpdateGroupState {
|
|
124
156
|
/**
|
|
125
157
|
* Whether the operation was successful
|
|
126
158
|
*/
|
|
@@ -128,8 +160,126 @@ export interface UpdateGroupConfigState {
|
|
|
128
160
|
/**
|
|
129
161
|
* The updated configuration values
|
|
130
162
|
*/
|
|
131
|
-
updatedConfig
|
|
163
|
+
updatedConfig?: {
|
|
132
164
|
openingMessage?: string;
|
|
133
165
|
openingQuestions?: string[];
|
|
134
166
|
};
|
|
167
|
+
/**
|
|
168
|
+
* The updated metadata values
|
|
169
|
+
*/
|
|
170
|
+
updatedMeta?: Partial<
|
|
171
|
+
Pick<MetaData, 'avatar' | 'backgroundColor' | 'description' | 'tags' | 'title'>
|
|
172
|
+
>;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface UpdateGroupPromptParams {
|
|
176
|
+
/**
|
|
177
|
+
* The new shared prompt/content for the group (markdown format)
|
|
178
|
+
*/
|
|
179
|
+
prompt: string;
|
|
180
|
+
/**
|
|
181
|
+
* Whether to use streaming mode for typewriter effect
|
|
182
|
+
*/
|
|
183
|
+
streaming?: boolean;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
export interface UpdateGroupPromptState {
|
|
187
|
+
/**
|
|
188
|
+
* The new prompt
|
|
189
|
+
*/
|
|
190
|
+
newPrompt: string;
|
|
191
|
+
/**
|
|
192
|
+
* The previous prompt
|
|
193
|
+
*/
|
|
194
|
+
previousPrompt?: string;
|
|
195
|
+
/**
|
|
196
|
+
* Whether the operation was successful
|
|
197
|
+
*/
|
|
198
|
+
success: boolean;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
export interface BatchCreateAgentsParams {
|
|
202
|
+
/**
|
|
203
|
+
* Array of agents to create
|
|
204
|
+
*/
|
|
205
|
+
agents: CreateAgentParams[];
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface BatchCreateAgentsState {
|
|
209
|
+
/**
|
|
210
|
+
* Created agents info
|
|
211
|
+
*/
|
|
212
|
+
agents: Array<{
|
|
213
|
+
agentId: string;
|
|
214
|
+
success: boolean;
|
|
215
|
+
title: string;
|
|
216
|
+
}>;
|
|
217
|
+
/**
|
|
218
|
+
* Number of agents that failed to create
|
|
219
|
+
*/
|
|
220
|
+
failedCount: number;
|
|
221
|
+
/**
|
|
222
|
+
* Number of agents successfully created
|
|
223
|
+
*/
|
|
224
|
+
successCount: number;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
// ============== State Types (for Render components) ==============
|
|
228
|
+
|
|
229
|
+
export interface SearchAgentResult {
|
|
230
|
+
avatar?: string;
|
|
231
|
+
description?: string;
|
|
232
|
+
id: string;
|
|
233
|
+
title: string;
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface SearchAgentState {
|
|
237
|
+
agents: SearchAgentResult[];
|
|
238
|
+
query?: string;
|
|
239
|
+
total: number;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export interface CreateAgentState {
|
|
243
|
+
/**
|
|
244
|
+
* The ID of the created agent
|
|
245
|
+
*/
|
|
246
|
+
agentId: string;
|
|
247
|
+
/**
|
|
248
|
+
* Whether the operation was successful
|
|
249
|
+
*/
|
|
250
|
+
success: boolean;
|
|
251
|
+
/**
|
|
252
|
+
* The title of the created agent
|
|
253
|
+
*/
|
|
254
|
+
title: string;
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
export interface InviteAgentState {
|
|
258
|
+
/**
|
|
259
|
+
* Agent identifier that was invited
|
|
260
|
+
*/
|
|
261
|
+
agentId: string;
|
|
262
|
+
/**
|
|
263
|
+
* Agent display name
|
|
264
|
+
*/
|
|
265
|
+
agentName?: string;
|
|
266
|
+
/**
|
|
267
|
+
* Whether the operation was successful
|
|
268
|
+
*/
|
|
269
|
+
success: boolean;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export interface RemoveAgentState {
|
|
273
|
+
/**
|
|
274
|
+
* Agent identifier that was removed
|
|
275
|
+
*/
|
|
276
|
+
agentId: string;
|
|
277
|
+
/**
|
|
278
|
+
* Agent display name
|
|
279
|
+
*/
|
|
280
|
+
agentName?: string;
|
|
281
|
+
/**
|
|
282
|
+
* Whether the operation was successful
|
|
283
|
+
*/
|
|
284
|
+
success: boolean;
|
|
135
285
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
|
|
3
3
|
import { DEFAULT_AVATAR } from '@lobechat/const';
|
|
4
|
-
import type {
|
|
4
|
+
import type { AgentGroupMember, BuiltinInspectorProps } from '@lobechat/types';
|
|
5
5
|
import { Avatar, Flexbox } from '@lobehub/ui';
|
|
6
6
|
import { createStaticStyles, cx, useTheme } from 'antd-style';
|
|
7
7
|
import { memo, useMemo } from 'react';
|
|
@@ -45,7 +45,7 @@ export const BroadcastInspector = memo<BuiltinInspectorProps<BroadcastParams>>(
|
|
|
45
45
|
if (!agentIds.length || !groupAgents.length) return [];
|
|
46
46
|
return agentIds
|
|
47
47
|
.map((id) => groupAgents.find((agent) => agent.id === id))
|
|
48
|
-
.filter((agent): agent is
|
|
48
|
+
.filter((agent): agent is AgentGroupMember => !!agent);
|
|
49
49
|
}, [agentIds, groupAgents]);
|
|
50
50
|
|
|
51
51
|
// Transform agents to Avatar.Group format
|
|
@@ -57,7 +57,7 @@ export const GroupManagementManifest: BuiltinToolManifest = {
|
|
|
57
57
|
{
|
|
58
58
|
description:
|
|
59
59
|
'Create a new agent dynamically based on user requirements and add it to the group. Use this when no existing agent matches the needed expertise.',
|
|
60
|
-
humanIntervention: '
|
|
60
|
+
humanIntervention: 'required',
|
|
61
61
|
name: GroupManagementApiName.createAgent,
|
|
62
62
|
parameters: {
|
|
63
63
|
properties: {
|
|
@@ -5,7 +5,7 @@ import { createStaticStyles, cx } from 'antd-style';
|
|
|
5
5
|
import { memo } from 'react';
|
|
6
6
|
import { Trans, useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
8
|
-
import { shinyTextStyles } from '@/styles';
|
|
8
|
+
import { inspectorTextStyles, shinyTextStyles } from '@/styles';
|
|
9
9
|
|
|
10
10
|
import type { ClearTodosParams, ClearTodosState } from '../../../types';
|
|
11
11
|
|
|
@@ -15,14 +15,6 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
|
15
15
|
color: ${cssVar.colorText};
|
|
16
16
|
background: linear-gradient(to top, ${cssVar.colorWarningBg} 40%, transparent 40%);
|
|
17
17
|
`,
|
|
18
|
-
root: css`
|
|
19
|
-
overflow: hidden;
|
|
20
|
-
display: -webkit-box;
|
|
21
|
-
-webkit-box-orient: vertical;
|
|
22
|
-
-webkit-line-clamp: 1;
|
|
23
|
-
|
|
24
|
-
color: ${cssVar.colorTextSecondary};
|
|
25
|
-
`,
|
|
26
18
|
}));
|
|
27
19
|
|
|
28
20
|
export const ClearTodosInspector = memo<BuiltinInspectorProps<ClearTodosParams, ClearTodosState>>(
|
|
@@ -33,7 +25,7 @@ export const ClearTodosInspector = memo<BuiltinInspectorProps<ClearTodosParams,
|
|
|
33
25
|
|
|
34
26
|
if (isArgumentsStreaming && !mode) {
|
|
35
27
|
return (
|
|
36
|
-
<div className={cx(
|
|
28
|
+
<div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
|
|
37
29
|
<span>{t('builtins.lobe-gtd.apiName.clearTodos')}</span>
|
|
38
30
|
</div>
|
|
39
31
|
);
|
|
@@ -45,7 +37,9 @@ export const ClearTodosInspector = memo<BuiltinInspectorProps<ClearTodosParams,
|
|
|
45
37
|
: t('builtins.lobe-gtd.apiName.clearTodos.modeCompleted');
|
|
46
38
|
|
|
47
39
|
return (
|
|
48
|
-
<div
|
|
40
|
+
<div
|
|
41
|
+
className={cx(inspectorTextStyles.root, isArgumentsStreaming && shinyTextStyles.shinyText)}
|
|
42
|
+
>
|
|
49
43
|
<Trans
|
|
50
44
|
components={{ mode: <span className={styles.mode} /> }}
|
|
51
45
|
i18nKey="builtins.lobe-gtd.apiName.clearTodos.result"
|
|
@@ -7,17 +7,11 @@ import { CheckCircle } from 'lucide-react';
|
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
|
|
10
|
-
import { shinyTextStyles } from '@/styles';
|
|
10
|
+
import { oneLineEllipsis, shinyTextStyles } from '@/styles';
|
|
11
11
|
|
|
12
12
|
import type { CompleteTodosParams, CompleteTodosState } from '../../../types';
|
|
13
13
|
|
|
14
14
|
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
15
|
-
root: css`
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
display: -webkit-box;
|
|
18
|
-
-webkit-box-orient: vertical;
|
|
19
|
-
-webkit-line-clamp: 1;
|
|
20
|
-
`,
|
|
21
15
|
title: css`
|
|
22
16
|
margin-inline-end: 8px;
|
|
23
17
|
color: ${cssVar.colorText};
|
|
@@ -34,14 +28,14 @@ export const CompleteTodosInspector = memo<
|
|
|
34
28
|
|
|
35
29
|
if (isArgumentsStreaming && count === 0) {
|
|
36
30
|
return (
|
|
37
|
-
<div className={cx(
|
|
31
|
+
<div className={cx(oneLineEllipsis, shinyTextStyles.shinyText)}>
|
|
38
32
|
<span>{t('builtins.lobe-gtd.apiName.completeTodos')}</span>
|
|
39
33
|
</div>
|
|
40
34
|
);
|
|
41
35
|
}
|
|
42
36
|
|
|
43
37
|
return (
|
|
44
|
-
<div className={cx(
|
|
38
|
+
<div className={cx(oneLineEllipsis, isArgumentsStreaming && shinyTextStyles.shinyText)}>
|
|
45
39
|
<span className={styles.title}>{t('builtins.lobe-gtd.apiName.completeTodos')}</span>
|
|
46
40
|
{count > 0 && (
|
|
47
41
|
<Text as={'span'} code color={cssVar.colorSuccess} fontSize={12}>
|
|
@@ -1,25 +1,14 @@
|
|
|
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 { Trans, useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
8
|
-
import { highlightTextStyles, shinyTextStyles } from '@/styles';
|
|
8
|
+
import { highlightTextStyles, inspectorTextStyles, shinyTextStyles } from '@/styles';
|
|
9
9
|
|
|
10
10
|
import type { CreatePlanParams, CreatePlanState } from '../../../types';
|
|
11
11
|
|
|
12
|
-
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
13
|
-
root: css`
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
display: -webkit-box;
|
|
16
|
-
-webkit-box-orient: vertical;
|
|
17
|
-
-webkit-line-clamp: 1;
|
|
18
|
-
|
|
19
|
-
color: ${cssVar.colorTextSecondary};
|
|
20
|
-
`,
|
|
21
|
-
}));
|
|
22
|
-
|
|
23
12
|
export const CreatePlanInspector = memo<BuiltinInspectorProps<CreatePlanParams, CreatePlanState>>(
|
|
24
13
|
({ args, partialArgs, isArgumentsStreaming }) => {
|
|
25
14
|
const { t } = useTranslation('plugin');
|
|
@@ -28,14 +17,16 @@ export const CreatePlanInspector = memo<BuiltinInspectorProps<CreatePlanParams,
|
|
|
28
17
|
|
|
29
18
|
if (isArgumentsStreaming && !goal) {
|
|
30
19
|
return (
|
|
31
|
-
<div className={cx(
|
|
20
|
+
<div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
|
|
32
21
|
<span>{t('builtins.lobe-gtd.apiName.createPlan')}</span>
|
|
33
22
|
</div>
|
|
34
23
|
);
|
|
35
24
|
}
|
|
36
25
|
|
|
37
26
|
return (
|
|
38
|
-
<div
|
|
27
|
+
<div
|
|
28
|
+
className={cx(inspectorTextStyles.root, isArgumentsStreaming && shinyTextStyles.shinyText)}
|
|
29
|
+
>
|
|
39
30
|
{goal ? (
|
|
40
31
|
<Trans
|
|
41
32
|
components={{ goal: <span className={highlightTextStyles.primary} /> }}
|
|
@@ -7,17 +7,11 @@ import { Plus } from 'lucide-react';
|
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
|
|
10
|
-
import { shinyTextStyles } from '@/styles';
|
|
10
|
+
import { oneLineEllipsis, shinyTextStyles } from '@/styles';
|
|
11
11
|
|
|
12
12
|
import type { CreateTodosParams, CreateTodosState } from '../../../types';
|
|
13
13
|
|
|
14
14
|
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
15
|
-
root: css`
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
display: -webkit-box;
|
|
18
|
-
-webkit-box-orient: vertical;
|
|
19
|
-
-webkit-line-clamp: 1;
|
|
20
|
-
`,
|
|
21
15
|
title: css`
|
|
22
16
|
margin-inline-end: 8px;
|
|
23
17
|
color: ${cssVar.colorText};
|
|
@@ -35,14 +29,14 @@ export const CreateTodosInspector = memo<
|
|
|
35
29
|
|
|
36
30
|
if (isArgumentsStreaming && count === 0) {
|
|
37
31
|
return (
|
|
38
|
-
<div className={cx(
|
|
32
|
+
<div className={cx(oneLineEllipsis, shinyTextStyles.shinyText)}>
|
|
39
33
|
<span>{t('builtins.lobe-gtd.apiName.createTodos')}</span>
|
|
40
34
|
</div>
|
|
41
35
|
);
|
|
42
36
|
}
|
|
43
37
|
|
|
44
38
|
return (
|
|
45
|
-
<div className={cx(
|
|
39
|
+
<div className={cx(oneLineEllipsis, isArgumentsStreaming && shinyTextStyles.shinyText)}>
|
|
46
40
|
<span className={styles.title}>{t('builtins.lobe-gtd.apiName.createTodos')}</span>
|
|
47
41
|
{count > 0 && (
|
|
48
42
|
<Text as={'span'} code color={cssVar.colorSuccess} fontSize={12}>
|
|
@@ -1,25 +1,14 @@
|
|
|
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';
|
|
8
|
+
import { highlightTextStyles, inspectorTextStyles, shinyTextStyles } from '@/styles';
|
|
9
9
|
|
|
10
10
|
import type { ExecTaskParams, ExecTaskState } from '../../../types';
|
|
11
11
|
|
|
12
|
-
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
13
|
-
root: css`
|
|
14
|
-
overflow: hidden;
|
|
15
|
-
display: -webkit-box;
|
|
16
|
-
-webkit-box-orient: vertical;
|
|
17
|
-
-webkit-line-clamp: 1;
|
|
18
|
-
|
|
19
|
-
color: ${cssVar.colorTextSecondary};
|
|
20
|
-
`,
|
|
21
|
-
}));
|
|
22
|
-
|
|
23
12
|
export const ExecTaskInspector = memo<BuiltinInspectorProps<ExecTaskParams, ExecTaskState>>(
|
|
24
13
|
({ args, partialArgs, isArgumentsStreaming, isLoading }) => {
|
|
25
14
|
const { t } = useTranslation('plugin');
|
|
@@ -30,13 +19,13 @@ export const ExecTaskInspector = memo<BuiltinInspectorProps<ExecTaskParams, Exec
|
|
|
30
19
|
if (isArgumentsStreaming) {
|
|
31
20
|
if (!description)
|
|
32
21
|
return (
|
|
33
|
-
<div className={cx(
|
|
22
|
+
<div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
|
|
34
23
|
<span>{t('builtins.lobe-gtd.apiName.execTask')}</span>
|
|
35
24
|
</div>
|
|
36
25
|
);
|
|
37
26
|
|
|
38
27
|
return (
|
|
39
|
-
<div className={cx(
|
|
28
|
+
<div className={cx(inspectorTextStyles.root, shinyTextStyles.shinyText)}>
|
|
40
29
|
<span>{t('builtins.lobe-gtd.apiName.execTask.loading')}</span>
|
|
41
30
|
<span className={highlightTextStyles.primary}>{description}</span>
|
|
42
31
|
</div>
|
|
@@ -46,7 +35,7 @@ export const ExecTaskInspector = memo<BuiltinInspectorProps<ExecTaskParams, Exec
|
|
|
46
35
|
// 有 description 时,根据 loading 状态显示不同文案
|
|
47
36
|
if (description) {
|
|
48
37
|
return (
|
|
49
|
-
<div className={cx(
|
|
38
|
+
<div className={cx(inspectorTextStyles.root, isLoading && shinyTextStyles.shinyText)}>
|
|
50
39
|
<span>
|
|
51
40
|
{isLoading
|
|
52
41
|
? t('builtins.lobe-gtd.apiName.execTask.loading')
|
|
@@ -59,7 +48,7 @@ export const ExecTaskInspector = memo<BuiltinInspectorProps<ExecTaskParams, Exec
|
|
|
59
48
|
|
|
60
49
|
// fallback
|
|
61
50
|
return (
|
|
62
|
-
<div className={
|
|
51
|
+
<div className={inspectorTextStyles.root}>
|
|
63
52
|
<span>{t('builtins.lobe-gtd.apiName.execTask')}</span>
|
|
64
53
|
</div>
|
|
65
54
|
);
|
|
@@ -7,17 +7,11 @@ import { Minus } from 'lucide-react';
|
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
|
|
10
|
-
import { shinyTextStyles } from '@/styles';
|
|
10
|
+
import { oneLineEllipsis, shinyTextStyles } from '@/styles';
|
|
11
11
|
|
|
12
12
|
import type { RemoveTodosParams, RemoveTodosState } from '../../../types';
|
|
13
13
|
|
|
14
14
|
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
15
|
-
root: css`
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
display: -webkit-box;
|
|
18
|
-
-webkit-box-orient: vertical;
|
|
19
|
-
-webkit-line-clamp: 1;
|
|
20
|
-
`,
|
|
21
15
|
title: css`
|
|
22
16
|
margin-inline-end: 8px;
|
|
23
17
|
color: ${cssVar.colorText};
|
|
@@ -34,14 +28,14 @@ export const RemoveTodosInspector = memo<
|
|
|
34
28
|
|
|
35
29
|
if (isArgumentsStreaming && count === 0) {
|
|
36
30
|
return (
|
|
37
|
-
<div className={cx(
|
|
31
|
+
<div className={cx(oneLineEllipsis, shinyTextStyles.shinyText)}>
|
|
38
32
|
<span>{t('builtins.lobe-gtd.apiName.removeTodos')}</span>
|
|
39
33
|
</div>
|
|
40
34
|
);
|
|
41
35
|
}
|
|
42
36
|
|
|
43
37
|
return (
|
|
44
|
-
<div className={cx(
|
|
38
|
+
<div className={cx(oneLineEllipsis, isArgumentsStreaming && shinyTextStyles.shinyText)}>
|
|
45
39
|
<span className={styles.title}>{t('builtins.lobe-gtd.apiName.removeTodos')}</span>
|
|
46
40
|
{count > 0 && (
|
|
47
41
|
<Text as={'span'} code color={cssVar.colorError} fontSize={12}>
|
|
@@ -7,17 +7,11 @@ import { CheckCircle, DiffIcon } from 'lucide-react';
|
|
|
7
7
|
import { memo } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
|
|
10
|
-
import { shinyTextStyles } from '@/styles';
|
|
10
|
+
import { oneLineEllipsis, shinyTextStyles } from '@/styles';
|
|
11
11
|
|
|
12
12
|
import type { UpdatePlanParams, UpdatePlanState } from '../../../types';
|
|
13
13
|
|
|
14
14
|
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
15
|
-
root: css`
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
display: -webkit-box;
|
|
18
|
-
-webkit-box-orient: vertical;
|
|
19
|
-
-webkit-line-clamp: 1;
|
|
20
|
-
`,
|
|
21
15
|
title: css`
|
|
22
16
|
margin-inline-end: 8px;
|
|
23
17
|
color: ${cssVar.colorText};
|
|
@@ -34,14 +28,14 @@ export const UpdatePlanInspector = memo<BuiltinInspectorProps<UpdatePlanParams,
|
|
|
34
28
|
|
|
35
29
|
if (isArgumentsStreaming && !planId) {
|
|
36
30
|
return (
|
|
37
|
-
<div className={cx(
|
|
31
|
+
<div className={cx(oneLineEllipsis, shinyTextStyles.shinyText)}>
|
|
38
32
|
<span>{t('builtins.lobe-gtd.apiName.updatePlan')}</span>
|
|
39
33
|
</div>
|
|
40
34
|
);
|
|
41
35
|
}
|
|
42
36
|
|
|
43
37
|
return (
|
|
44
|
-
<div className={cx(
|
|
38
|
+
<div className={cx(oneLineEllipsis, isArgumentsStreaming && shinyTextStyles.shinyText)}>
|
|
45
39
|
<span className={styles.title}>{t('builtins.lobe-gtd.apiName.updatePlan')}</span>
|
|
46
40
|
{completed && (
|
|
47
41
|
<Text as={'span'} code color={cssVar.colorSuccess} fontSize={12}>
|
|
@@ -7,17 +7,11 @@ import { CheckCircle, DiffIcon, Minus, Plus } from 'lucide-react';
|
|
|
7
7
|
import { type ReactNode, memo, useMemo } from 'react';
|
|
8
8
|
import { useTranslation } from 'react-i18next';
|
|
9
9
|
|
|
10
|
-
import { shinyTextStyles } from '@/styles';
|
|
10
|
+
import { oneLineEllipsis, shinyTextStyles } from '@/styles';
|
|
11
11
|
|
|
12
12
|
import type { UpdateTodosParams, UpdateTodosState } from '../../../types';
|
|
13
13
|
|
|
14
14
|
const styles = createStaticStyles(({ css, cssVar }) => ({
|
|
15
|
-
root: css`
|
|
16
|
-
overflow: hidden;
|
|
17
|
-
display: -webkit-box;
|
|
18
|
-
-webkit-box-orient: vertical;
|
|
19
|
-
-webkit-line-clamp: 1;
|
|
20
|
-
`,
|
|
21
15
|
separator: css`
|
|
22
16
|
margin-inline: 2px;
|
|
23
17
|
color: ${cssVar.colorTextQuaternary};
|
|
@@ -66,7 +60,7 @@ export const UpdateTodosInspector = memo<
|
|
|
66
60
|
|
|
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-gtd.apiName.updateTodos')}</span>
|
|
71
65
|
</div>
|
|
72
66
|
);
|
|
@@ -107,7 +101,7 @@ export const UpdateTodosInspector = memo<
|
|
|
107
101
|
}
|
|
108
102
|
|
|
109
103
|
return (
|
|
110
|
-
<div className={cx(
|
|
104
|
+
<div className={cx(oneLineEllipsis, isArgumentsStreaming && shinyTextStyles.shinyText)}>
|
|
111
105
|
<span className={styles.title}>{t('builtins.lobe-gtd.apiName.updateTodos')}</span>
|
|
112
106
|
{statsParts.length > 0 && (
|
|
113
107
|
<>
|