diff --git a/packages/coding-agent/src/cli/stats-cli.ts b/packages/coding-agent/src/cli/stats-cli.ts index c90bf16d0..a2e9300d2 100644 --- a/packages/coding-agent/src/cli/stats-cli.ts +++ b/packages/coding-agent/src/cli/stats-cli.ts @@ -85,9 +85,9 @@ function formatPercent(n: number): string { export async function runStatsCommand(cmd: StatsCommandArgs): Promise { // Lazy import to avoid loading stats module when not needed - const { getDashboardStats, syncAllSessions, getTotalMessageCount } = await import("@oh-my-pi/omp-stats"); - const { startServer } = await import("@oh-my-pi/omp-stats/src/server"); - const { closeDb } = await import("@oh-my-pi/omp-stats/src/db"); + const { getDashboardStats, syncAllSessions, getTotalMessageCount, startServer, closeDb } = await import( + "@oh-my-pi/omp-stats" + ); // Sync session files first console.log("Syncing session files..."); diff --git a/packages/stats/src/index.ts b/packages/stats/src/index.ts index 1b179f3bc..e510c75ee 100755 --- a/packages/stats/src/index.ts +++ b/packages/stats/src/index.ts @@ -6,6 +6,8 @@ import { closeDb } from "./db"; import { startServer } from "./server"; export { getDashboardStats, getTotalMessageCount, syncAllSessions } from "./aggregator"; +export { closeDb } from "./db"; +export { startServer } from "./server"; export type { AggregatedStats, DashboardStats, diff --git a/tsconfig.base.json b/tsconfig.base.json index c4d28c082..b2dd15691 100644 --- a/tsconfig.base.json +++ b/tsconfig.base.json @@ -34,7 +34,6 @@ "@oh-my-pi/pi-natives": ["./packages/natives/src/index.ts"], "@oh-my-pi/pi-natives/*": ["./packages/natives/src/*"], "@oh-my-pi/omp-stats": ["./packages/stats/src/index.ts"], - "@oh-my-pi/omp-stats/src/*": ["./packages/stats/src/*"], "@oh-my-pi/omp-stats/*": ["./packages/stats/src/*"], "@oh-my-pi/pi-tui": ["./packages/tui/src/index.ts"], "@oh-my-pi/pi-tui/*": ["./packages/tui/src/*"],