Skip to content

Commit e391a8f

Browse files
committed
summary searching sucks
1 parent da56861 commit e391a8f

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

lib/tools/compress.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ export function createCompressTool(ctx: ToolContext): ReturnType<typeof tool> {
180180
summaries: state.compressSummaries.length,
181181
},
182182
)
183+
// TODO: This takes the first summary text match and does not error on
184+
// multiple matching summaries (ambiguous fallback).
183185
const s = state.compressSummaries.find((s) => s.summary.includes(startString))
184186
if (s) {
185187
rawStartIndex = messages.findIndex((m) => m.info.id === s.anchorMessageId)
@@ -203,6 +205,8 @@ export function createCompressTool(ctx: ToolContext): ReturnType<typeof tool> {
203205
summaries: state.compressSummaries.length,
204206
},
205207
)
208+
// TODO: This takes the first summary text match and does not error on
209+
// multiple matching summaries (ambiguous fallback).
206210
const s = state.compressSummaries.find((s) => s.summary.includes(endString))
207211
if (s) {
208212
rawEndIndex = messages.findIndex((m) => m.info.id === s.anchorMessageId)

0 commit comments

Comments
 (0)