Skip to content

🤯 LobeHub - Super-Agents on Your Team. Add super-agents to the chats your team already uses.They take on work by themselves and get better every week.

♻️ refactor: drop dead markUserValidAction business slot (#16018)

YuTengjingcd4de1cf9667
diff --git a/src/business/client/markUserValidAction.ts b/src/business/client/markUserValidAction.ts
deleted file mode 100644
index db58acf60bf..00000000000
--- a/src/business/client/markUserValidAction.ts
+++ /dev/null
@@ -1 +0,0 @@
-export const markUserValidAction = async () => {};
diff --git a/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts b/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts
index 139b687ed9e..b2e5c6ca598 100644
--- a/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts
+++ b/src/store/chat/slices/aiChat/actions/conversationLifecycle.ts
@@ -23,7 +23,6 @@ import { nanoid } from '@lobechat/utils';
import { TRPCClientError } from '@trpc/client';
import { t } from 'i18next';
-import { markUserValidAction } from '@/business/client/markUserValidAction';
import { message as antdMessage } from '@/components/AntdStaticMethods';
import { agentService } from '@/services/agent';
import { aiChatService } from '@/services/aiChat';
@@ -56,7 +55,6 @@ import {
import { getElectronStoreState } from '@/store/electron';
import { useGlobalStore } from '@/store/global';
import { systemStatusSelectors } from '@/store/global/selectors';
-import { getServerConfigStoreState, serverConfigSelectors } from '@/store/serverConfig';
import { pageAgentRuntime } from '@/store/tool/slices/builtin/executors/lobe-page-agent';
import { type StoreSetter } from '@/store/types';
import { useUserMemoryStore } from '@/store/userMemory';
@@ -974,14 +972,6 @@ export class ConversationLifecycleActionImpl {
this.#get().updateOperationMetadata(operationId, { inputEditorTempState: null });
}
- const serverConfigState = getServerConfigStoreState();
- const enableBusinessFeatures =
- !!serverConfigState && serverConfigSelectors.enableBusinessFeatures(serverConfigState);
-
- if (enableBusinessFeatures) {
- markUserValidAction();
- }
-
if (!data) return;
if (data.topicId) this.#get().internal_updateTopicLoading(data.topicId, true);
diff --git a/src/store/image/slices/createImage/action.ts b/src/store/image/slices/createImage/action.ts
index 220f7ddf748..558fe46409f 100644
--- a/src/store/image/slices/createImage/action.ts
+++ b/src/store/image/slices/createImage/action.ts
@@ -1,8 +1,6 @@
import { handleGenerationPromptModerationError } from '@/business/client/handleGenerationPromptModerationError';
import { handleLobeHubModelDeprecatedError } from '@/business/client/handleLobeHubModelDeprecatedError';
-import { markUserValidAction } from '@/business/client/markUserValidAction';
import { imageService } from '@/services/image';
-import { getServerConfigStoreState, serverConfigSelectors } from '@/store/serverConfig';
import { type StoreSetter } from '@/store/types';
import { type ImageStore } from '../../store';
@@ -74,14 +72,6 @@ export class CreateImageActionImpl {
);
}
- const serverConfigState = getServerConfigStoreState();
- const enableBusinessFeatures =
- !!serverConfigState && serverConfigSelectors.enableBusinessFeatures(serverConfigState);
-
- if (enableBusinessFeatures) {
- markUserValidAction();
- }
-
// 5. Create image via service
await imageService.createImage({
generationTopicId: finalTopicId!,
diff --git a/src/store/video/slices/createVideo/action.ts b/src/store/video/slices/createVideo/action.ts
index 7f8838d78e7..8742bb40ec2 100644
--- a/src/store/video/slices/createVideo/action.ts
+++ b/src/store/video/slices/createVideo/action.ts
@@ -2,10 +2,8 @@ import { t } from 'i18next';
import { handleGenerationPromptModerationError } from '@/business/client/handleGenerationPromptModerationError';
import { handleLobeHubModelDeprecatedError } from '@/business/client/handleLobeHubModelDeprecatedError';
-import { markUserValidAction } from '@/business/client/markUserValidAction';
import { message } from '@/components/AntdStaticMethods';
import { videoService } from '@/services/video';
-import { getServerConfigStoreState, serverConfigSelectors } from '@/store/serverConfig';
import { type StoreSetter } from '@/store/types';
import { type VideoStore } from '../../store';
@@ -94,14 +92,6 @@ export class CreateVideoActionImpl {
);
}
- const serverConfigState = getServerConfigStoreState();
- const enableBusinessFeatures =
- !!serverConfigState && serverConfigSelectors.enableBusinessFeatures(serverConfigState);
-
- if (enableBusinessFeatures) {
- markUserValidAction();
- }
-
// 4. Create video via service
await videoService.createVideo({
generationTopicId: finalTopicId!,