mirror of
https://github.com/sdwolf4103/opencode-working-memory.git
synced 2026-07-17 12:56:42 +02:00
12 lines
454 B
TypeScript
12 lines
454 B
TypeScript
import { formatExplain } from "../formatters/explain.ts";
|
|
import { snapshotForOptions } from "../workspace-snapshot.ts";
|
|
import type { CliOptions, CommandResult } from "../types.ts";
|
|
import { runTrace } from "./trace.ts";
|
|
|
|
export async function runExplain(options: CliOptions): Promise<CommandResult> {
|
|
if (options.memory) return runTrace(options);
|
|
|
|
const snapshot = await snapshotForOptions(options);
|
|
return { stdout: formatExplain(snapshot) };
|
|
}
|