Expose memory diagnostics through CLI (#4408)
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user