@caupulican/pi-adaptative 0.80.40 → 0.80.42
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 +8 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +2 -2
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +1 -1
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +4 -2
- package/dist/core/compaction/compaction.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
|
@@ -205,7 +205,7 @@ export class AgentSession {
|
|
|
205
205
|
const contextWindow = this.model?.contextWindow ?? 0;
|
|
206
206
|
if (settings.enabled && contextWindow > 0 && !this.isCompacting) {
|
|
207
207
|
const contextTokens = this._estimateCurrentContextTokens(authoritativeMessages);
|
|
208
|
-
if (shouldCompact(contextTokens, contextWindow, settings)) {
|
|
208
|
+
if (shouldCompact(contextTokens, contextWindow, settings, this.model?.autoCompactionTriggerTokens)) {
|
|
209
209
|
const latestBefore = getLatestCompactionEntry(this.sessionManager.getBranch())?.id;
|
|
210
210
|
await this._runAutoCompaction("threshold", false);
|
|
211
211
|
const latestAfter = getLatestCompactionEntry(this.sessionManager.getBranch())?.id;
|
|
@@ -1711,7 +1711,7 @@ export class AgentSession {
|
|
|
1711
1711
|
}
|
|
1712
1712
|
}
|
|
1713
1713
|
}
|
|
1714
|
-
if (shouldCompact(contextTokens, contextWindow, settings)) {
|
|
1714
|
+
if (shouldCompact(contextTokens, contextWindow, settings, this.model?.autoCompactionTriggerTokens)) {
|
|
1715
1715
|
return await this._runAutoCompaction("threshold", false);
|
|
1716
1716
|
}
|
|
1717
1717
|
return false;
|