agentscope-ai / agentscope-ai/agentscope-java

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

オープン
#856 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
area/ext/memory enhancement
主要言語
Java
スター
5.6k
フォーク
1.3k
平均マージ
4日 12時間
マージ済み PR(30日)
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 を短くまとめたダイジェスト。