@wahack/pi-coding-agent 15.11.6 → 15.11.7
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/package.json
CHANGED
|
@@ -107,7 +107,7 @@ import {
|
|
|
107
107
|
relativePathWithinRoot,
|
|
108
108
|
Snowflake,
|
|
109
109
|
} from "@oh-my-pi/pi-utils";
|
|
110
|
-
import {
|
|
110
|
+
import { compact } from "@oh-my-pi/snapcompact";
|
|
111
111
|
import { type AsyncJob, type AsyncJobDeliveryState, AsyncJobManager } from "../async";
|
|
112
112
|
import { classifyDifficulty } from "../auto-thinking/classifier";
|
|
113
113
|
import { reset as resetCapabilities } from "../capability";
|
|
@@ -6333,7 +6333,7 @@ export class AgentSession {
|
|
|
6333
6333
|
details = compactionPrep.details;
|
|
6334
6334
|
preserveData = compactionPrep.preserveData;
|
|
6335
6335
|
} else if (snapcompactReady) {
|
|
6336
|
-
const snapcompactResult = await
|
|
6336
|
+
const snapcompactResult = await compact(preparation, { convertToLlm, model: this.model });
|
|
6337
6337
|
summary = snapcompactResult.summary;
|
|
6338
6338
|
shortSummary = snapcompactResult.shortSummary;
|
|
6339
6339
|
firstKeptEntryId = snapcompactResult.firstKeptEntryId;
|
|
@@ -7847,7 +7847,7 @@ export class AgentSession {
|
|
|
7847
7847
|
} else if (action === "snapcompact") {
|
|
7848
7848
|
// Local, deterministic: render discarded history onto PNG frames.
|
|
7849
7849
|
// No model candidates, no API key, no retry loop.
|
|
7850
|
-
const snapcompactResult = await
|
|
7850
|
+
const snapcompactResult = await compact(preparation, { convertToLlm, model: this.model });
|
|
7851
7851
|
summary = snapcompactResult.summary;
|
|
7852
7852
|
shortSummary = snapcompactResult.shortSummary;
|
|
7853
7853
|
firstKeptEntryId = snapcompactResult.firstKeptEntryId;
|
|
@@ -27,7 +27,7 @@ import {
|
|
|
27
27
|
Snowflake,
|
|
28
28
|
toError,
|
|
29
29
|
} from "@oh-my-pi/pi-utils";
|
|
30
|
-
import {
|
|
30
|
+
import { getPreservedArchive, images } from "@oh-my-pi/snapcompact";
|
|
31
31
|
import { ArtifactManager } from "./artifacts";
|
|
32
32
|
import {
|
|
33
33
|
type BlobPutOptions,
|
|
@@ -712,7 +712,7 @@ export function buildSessionContext(
|
|
|
712
712
|
// the component can report them.
|
|
713
713
|
for (const entry of path) {
|
|
714
714
|
if (entry.type === "compaction") {
|
|
715
|
-
const snapcompactArchive =
|
|
715
|
+
const snapcompactArchive = getPreservedArchive(entry.preserveData);
|
|
716
716
|
messages.push(
|
|
717
717
|
createCompactionSummaryMessage(
|
|
718
718
|
entry.summary,
|
|
@@ -720,7 +720,7 @@ export function buildSessionContext(
|
|
|
720
720
|
entry.timestamp,
|
|
721
721
|
entry.shortSummary,
|
|
722
722
|
undefined,
|
|
723
|
-
|
|
723
|
+
snapcompactArchive ? images(snapcompactArchive) : undefined,
|
|
724
724
|
),
|
|
725
725
|
);
|
|
726
726
|
} else {
|
|
@@ -744,7 +744,7 @@ export function buildSessionContext(
|
|
|
744
744
|
|
|
745
745
|
// Emit summary first; re-attach any archived snapcompact frames so the
|
|
746
746
|
// model can keep reading the archived history after every context rebuild.
|
|
747
|
-
|
|
747
|
+
const snapcompactArchive = getPreservedArchive(compaction.preserveData);
|
|
748
748
|
messages.push(
|
|
749
749
|
createCompactionSummaryMessage(
|
|
750
750
|
compaction.summary,
|
|
@@ -752,7 +752,7 @@ export function buildSessionContext(
|
|
|
752
752
|
compaction.timestamp,
|
|
753
753
|
compaction.shortSummary,
|
|
754
754
|
providerPayload,
|
|
755
|
-
snapcompactArchive ?
|
|
755
|
+
snapcompactArchive ? images(snapcompactArchive) : undefined,
|
|
756
756
|
),
|
|
757
757
|
);
|
|
758
758
|
|