@openeryc/pi-coding-agent 0.75.9 → 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.
- package/CHANGELOG.md +6 -0
- package/dist/core/agent-session.d.ts +2 -1
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +5 -1
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/session-manager.d.ts +25 -0
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +156 -0
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/slash-commands.d.ts.map +1 -1
- package/dist/core/slash-commands.js +1 -0
- package/dist/core/slash-commands.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +45 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +12 -12
- package/package.json +4 -4
|
@@ -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)
|