agentscope-ai / agentscope-ai/agentscope-java

[Feature]: Add loop mechanism to recheck context after compression

未关闭
#856 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
area/ext/memory enhancement
主要语言
Java
星标
5.6k
派生
1.3k
平均合并
4 天 12 小时
30 天内合并 PR
77

描述

## Problem Description

The `compressIfNeeded()` method currently returns `true` immediately after any compression strategy succeeds, **without checking if the
context still exceeds the threshold after compression**.

## Current Behavior

```java
// Strategy 1-6 are tried sequentially
if (strategy1()) return true; // Returns immediately, no recheck
if (strategy2()) return true;
...
// All strategies failed
log.warn("All compression strategies exhausted but context still exceeds threshold");
return false;

Issue Scenarios

1. Insufficient compression: Strategy 1 compresses tool calls, but context still exceeds threshold after compression

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。