Expose memory diagnostics through CLI (#4408)

This commit is contained in:
Neil
2026-06-01 15:14:15 -07:00
committed by GitHub
parent a05a108e67
commit f7fb6ef686
16 changed files with 258 additions and 9 deletions
+9
View File
@@ -60,6 +60,7 @@ import type {
ProjectGroup,
ProjectGroupImportMode,
ProjectGroupImportResult,
MemorySnapshot,
TabGroupLayoutNode,
TuiAgent,
WorkspaceCreateTelemetrySource
@@ -158,6 +159,7 @@ import { RuntimeBrowserCommands } from './orca-runtime-browser'
import { RuntimeFileCommands } from './orca-runtime-files'
import { RuntimeGitCommands } from './orca-runtime-git'
import { joinWorktreeRelativePath } from './runtime-relative-paths'
import { collectMemorySnapshot } from '../memory/collector'
import { BrowserWindow, ipcMain } from 'electron'
import type { AgentBrowserBridge } from '../browser/agent-browser-bridge'
import { BrowserError } from '../browser/cdp-bridge'
@@ -1458,6 +1460,13 @@ export class OrcaRuntimeService {
return this.stats?.getSummary() ?? null
}
getMemorySnapshot(): Promise<MemorySnapshot> {
if (!this.store) {
throw new Error('runtime_unavailable')
}
return collectMemorySnapshot(this.store)
}
getUIState(): PersistedUIState {
if (!this.store?.getUI) {
throw new Error('runtime_unavailable')