@averyyy/pi-coding-agent 0.82.1-piclient.7 → 0.82.1-piclient.9
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 +1 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -16
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/pi-server-client.d.ts.map +1 -1
- package/dist/core/pi-server-client.js +4 -10
- package/dist/core/pi-server-client.js.map +1 -1
- package/dist/core/sdk.d.ts +2 -5
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +3 -24
- package/dist/core/sdk.js.map +1 -1
- package/package.json +4 -4
|
@@ -29,7 +29,7 @@ import { createToolHtmlRenderer } from "./export-html/tool-renderer.js";
|
|
|
29
29
|
import { ExtensionRunner, wrapRegisteredTools, } from "./extensions/index.js";
|
|
30
30
|
import { emitSessionShutdownEvent } from "./extensions/runner.js";
|
|
31
31
|
import { ModelRegistry } from "./model-registry.js";
|
|
32
|
-
import { compactPiServer
|
|
32
|
+
import { compactPiServer } from "./pi-server-client.js";
|
|
33
33
|
import { expandPromptTemplate } from "./prompt-templates.js";
|
|
34
34
|
import { CURRENT_SESSION_VERSION, getLatestCompactionEntry } from "./session-manager.js";
|
|
35
35
|
import { createSyntheticSourceInfo } from "./source-info.js";
|
|
@@ -491,7 +491,7 @@ export class AgentSession {
|
|
|
491
491
|
// Track last assistant message for auto-compaction check
|
|
492
492
|
_lastAssistantMessage = undefined;
|
|
493
493
|
/** Internal handler for agent events - shared by subscribe and reconnect */
|
|
494
|
-
_handleAgentEvent = async (event,
|
|
494
|
+
_handleAgentEvent = async (event, _signal) => {
|
|
495
495
|
// When a user message starts, check if it's from either queue and remove it BEFORE emitting
|
|
496
496
|
// This ensures the UI sees the updated queue state
|
|
497
497
|
if (event.type === "message_start" && event.message.role === "user") {
|
|
@@ -549,13 +549,6 @@ export class AgentSession {
|
|
|
549
549
|
});
|
|
550
550
|
this._retryAttempt = 0;
|
|
551
551
|
}
|
|
552
|
-
if (isPiServerMode() && !this._isTerminalAssistantFailure(assistantMsg)) {
|
|
553
|
-
await syncPiServerTree(this.sessionId, {
|
|
554
|
-
systemPrompt: this.systemPrompt,
|
|
555
|
-
messages: this.agent.state.messages,
|
|
556
|
-
tools: this.agent.state.tools,
|
|
557
|
-
}, { entries: this.sessionManager.getEntries(), leafId: this.sessionManager.getLeafId() }, { signal, onHistoryReconciled: (snapshot) => this.reconcilePiServerHistory(snapshot) });
|
|
558
|
-
}
|
|
559
552
|
}
|
|
560
553
|
}
|
|
561
554
|
};
|
|
@@ -2935,13 +2928,6 @@ export class AgentSession {
|
|
|
2935
2928
|
// Update agent state
|
|
2936
2929
|
const sessionContext = this.sessionManager.buildSessionContext();
|
|
2937
2930
|
this.agent.state.messages = sessionContext.messages;
|
|
2938
|
-
if (isPiServerMode()) {
|
|
2939
|
-
await syncPiServerTree(this.sessionId, {
|
|
2940
|
-
systemPrompt: this.systemPrompt,
|
|
2941
|
-
messages: this.agent.state.messages,
|
|
2942
|
-
tools: this.agent.state.tools,
|
|
2943
|
-
}, { entries: this.sessionManager.getEntries(), leafId: this.sessionManager.getLeafId() }, { onHistoryReconciled: (snapshot) => this.reconcilePiServerHistory(snapshot) });
|
|
2944
|
-
}
|
|
2945
2931
|
// Emit session_tree event
|
|
2946
2932
|
await this._extensionRunner.emit({
|
|
2947
2933
|
type: "session_tree",
|