From 3281b2f9bd0c912616dcd58b70f4b4855e660e05 Mon Sep 17 00:00:00 2001 From: wassname <1103714+wassname@users.noreply.github.com> Date: Thu, 16 Apr 2026 13:09:53 +0800 Subject: [PATCH] fix: match overlap error to actual tool parameter schema --- compress-tool.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/compress-tool.ts b/compress-tool.ts index 6a26736..bca1bda 100644 --- a/compress-tool.ts +++ b/compress-tool.ts @@ -205,12 +205,15 @@ export function registerCompressTool( .join(', ') const gapInfo = gaps.length > 0 - ? gaps.map(g => `compress(${g.replace('..', ', ')})`).join('; ') + ? gaps.map(g => { + const [s, e] = g.split('..') + return `{startId: "${s}", endId: "${e}"}` + }).join(', ') : 'none available — all visible messages are covered by existing blocks' throw new Error( - `You tried compress(${startId}, ${endId}) but this overlaps existing summaries: ${overlapInfo}. ` + - `Instead use: ${gapInfo}`, + `Range {startId: "${startId}", endId: "${endId}"} overlaps existing summaries: ${overlapInfo}. ` + + `Available ranges: ${gapInfo}`, ) }