The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
fix(desktop): declare rememberLog state before the top-level pool-limits read
liuhao102405f548f35dd3
diff --git a/apps/desktop/electron/main.ts b/apps/desktop/electron/main.tsindex d5ff39d6d8f..0e5ec73363f 100644--- a/apps/desktop/electron/main.ts+++ b/apps/desktop/electron/main.ts@@ -1464,6 +1464,15 @@ function persistPoolLimits(limits) {}}+// rememberLog() state. Declared here, before the top-level+// readPersistedPoolLimits() call below, because that call logs during module+// evaluation; declaring these later crashed launch with `undefined.push` in+// the packaged build (esbuild lowers the TDZ to undefined instead of throwing).+const hermesLog = []+let desktopLogBuffer = ''+let desktopLogFlushTimer = null+let desktopLogFlushPromise = Promise.resolve()+let poolLimits = readPersistedPoolLimits()// Hard cap on local backends that are starting OR running (the LRU eviction// above is soft — it spares keepalive-fresh entries). Follows the live@@ -1574,12 +1583,8 @@ let connectionRegistryCache = nulllet connectionRegistryCacheMtime = nulllet remoteHeaderRulesInstalled = falseconst remoteWsHeaderStore = createRemoteWsHeaderStore()-const hermesLog = []const previewWatchers = new Map()let previewShortcutActive = false-let desktopLogBuffer = ''-let desktopLogFlushTimer = null-let desktopLogFlushPromise = Promise.resolve()let nativeThemeListenerInstalled = falselet bootProgressState = {