@openeryc/pi-coding-agent 0.75.8 → 0.75.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,7 +27,7 @@ import { createToolHtmlRenderer } from "./export-html/tool-renderer.js";
27
27
  import { ExtensionRunner, wrapRegisteredTools, } from "./extensions/index.js";
28
28
  import { emitSessionShutdownEvent } from "./extensions/runner.js";
29
29
  import { expandPromptTemplate } from "./prompt-templates.js";
30
- import { CURRENT_SESSION_VERSION, getLatestCompactionEntry } from "./session-manager.js";
30
+ import { CURRENT_SESSION_VERSION, getLatestCompactionEntry, SessionManager as SessionManagerCtor, } from "./session-manager.js";
31
31
  import { createSyntheticSourceInfo } from "./source-info.js";
32
32
  import { buildSystemPrompt } from "./system-prompt.js";
33
33
  import { createLocalBashOperations } from "./tools/bash.js";
@@ -2328,6 +2328,7 @@ export class AgentSession {
2328
2328
  * Get session statistics.
2329
2329
  */
2330
2330
  getSessionStats() {
2331
+ // ... existing implementation unchanged
2331
2332
  const state = this.state;
2332
2333
  const userMessages = state.messages.filter((m) => m.role === "user").length;
2333
2334
  const assistantMessages = state.messages.filter((m) => m.role === "assistant").length;
@@ -2368,6 +2369,9 @@ export class AgentSession {
2368
2369
  contextUsage: this.getContextUsage(),
2369
2370
  };
2370
2371
  }
2372
+ async getUsageStats(onProgress) {
2373
+ return await SessionManagerCtor.getUsageStats(onProgress);
2374
+ }
2371
2375
  getContextUsage() {
2372
2376
  const model = this.model;
2373
2377
  if (!model)