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.

🔨 chore: reducing the tracing scope (#8846)

Arvin Xu07a9b341b47a
diff --git a/src/services/discover.ts b/src/services/discover.ts
index 1e3338063f4..e2932f96d7a 100644
--- a/src/services/discover.ts
+++ b/src/services/discover.ts
@@ -143,6 +143,10 @@ class DiscoverService {
errorCode,
...params
}: InstallReportRequest) => {
+ // if user don't allow tracing, just not report installation
+ const allow = preferenceSelectors.userAllowTrace(useUserStore.getState());
+
+ if (!allow) return;
await this.injectMPToken();
const reportData = {
@@ -164,7 +168,8 @@ class DiscoverService {
* 上报插件调用结果
*/
reportPluginCall = async (reportData: CallReportRequest) => {
- const allow = useUserStore(preferenceSelectors.userAllowTrace);
+ // if user don't allow tracing , just not report calling
+ const allow = preferenceSelectors.userAllowTrace(useUserStore.getState());
if (!allow) return;