mirror of
https://github.com/wassname/pi-dynamic-context-pruning.git
synced 2026-06-27 14:00:35 +08:00
fix: gap calculation scoped to requested range, clearer error text
This commit is contained in:
+2
-1
@@ -173,6 +173,7 @@ export function registerCompressTool(
|
||||
|
||||
const sortedEntries = [...state.messageIdSnapshot.entries()]
|
||||
.filter(([id]) => id.startsWith('m')) // only mNNN ids
|
||||
.filter(([, ts]) => ts >= startTimestamp && ts <= endTimestamp) // only within requested range
|
||||
.sort((a, b) => a[1] - b[1])
|
||||
|
||||
// Walk sorted messages, grouping consecutive uncovered ones into gap ranges
|
||||
@@ -213,7 +214,7 @@ export function registerCompressTool(
|
||||
|
||||
throw new Error(
|
||||
`[compress] Range {startId: "${startId}", endId: "${endId}"} overlaps existing summaries: ${overlapInfo}. ` +
|
||||
`Available ranges: ${gapInfo}`,
|
||||
`Available ranges within your requested range: ${gapInfo}`,
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Generated
+2
-17
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@complexthings/pi-dynamic-context-pruning",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"lockfileVersion": 3,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@complexthings/pi-dynamic-context-pruning",
|
||||
"version": "1.0.6",
|
||||
"version": "1.0.7",
|
||||
"dependencies": {
|
||||
"jsonc-parser": "^3.3.1"
|
||||
},
|
||||
@@ -913,9 +913,6 @@
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -933,9 +930,6 @@
|
||||
"cpu": [
|
||||
"arm64"
|
||||
],
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -953,9 +947,6 @@
|
||||
"cpu": [
|
||||
"riscv64"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -973,9 +964,6 @@
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"libc": [
|
||||
"glibc"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
@@ -993,9 +981,6 @@
|
||||
"cpu": [
|
||||
"x64"
|
||||
],
|
||||
"libc": [
|
||||
"musl"
|
||||
],
|
||||
"license": "MIT",
|
||||
"optional": true,
|
||||
"os": [
|
||||
|
||||
Reference in New Issue
Block a user