Update files

This commit is contained in:
Mohamed Boudra
2026-02-07 09:43:44 +07:00
parent 3f58937c98
commit 4a9cf9e90f
13 changed files with 427 additions and 157 deletions
-14
View File
@@ -210,9 +210,6 @@ export interface GroupedAgents {
const ACTIVE_GRACE_PERIOD_MS = 2 * 24 * 60 * 60 * 1000; // 2 days (temporary for screenshots)
// eslint-disable-next-line no-console
console.log('[agent-grouping] ACTIVE_GRACE_PERIOD_MS:', ACTIVE_GRACE_PERIOD_MS, 'ms =', ACTIVE_GRACE_PERIOD_MS / (1000 * 60 * 60), 'hours');
interface GroupAgentsOptions {
/**
* Optional function to read a remote URL for an agent.
@@ -252,17 +249,6 @@ export function groupAgents(
const isRecentlyActive = ageDiff < ACTIVE_GRACE_PERIOD_MS;
const isActive = isRunningOrAttention || isRecentlyActive;
// eslint-disable-next-line no-console
console.log('[agent-grouping] agent:', agent.title || agent.id, {
status: agent.status,
lastActivityAt: agent.lastActivityAt,
ageDiffHours: ageDiff / (1000 * 60 * 60),
gracePeriodHours: ACTIVE_GRACE_PERIOD_MS / (1000 * 60 * 60),
isRunningOrAttention,
isRecentlyActive,
isActive,
});
if (isActive) {
activeAgents.push(agent);
} else {
+1 -18
View File
@@ -1,21 +1,4 @@
const getIsDevEnvironment = (): boolean => {
const globalDev = (globalThis as { __DEV__?: boolean } | undefined)?.__DEV__;
if (typeof globalDev === "boolean") {
return globalDev;
}
if (typeof process !== "undefined" && process.env?.NODE_ENV) {
return process.env.NODE_ENV !== "production";
}
return false;
};
const shouldDisablePerfLogging =
typeof process !== "undefined" && process.env?.EXPO_PUBLIC_DISABLE_PERF_LOGGING === "1";
const shouldForcePerfLogging =
typeof process !== "undefined" && process.env?.EXPO_PUBLIC_ENABLE_PERF_LOGGING === "1";
const PERF_LOGGING_ENABLED =
(shouldForcePerfLogging || getIsDevEnvironment()) && !shouldDisablePerfLogging;
const PERF_LOGGING_ENABLED = false;
export const isPerfLoggingEnabled = (): boolean => PERF_LOGGING_ENABLED;