New request
#3133: 上下文压缩存在漏洞,超限后对话内容易丢失且上下文统计不准确
We'll provision a sandbox, run an agent against the issue, and open a draft PR. You can pull the branch and iterate from there.
Issue
bugneedinfoperformancestreaming
问题描述
上下文压缩功能存在两个严重问题:
-
对话内容丢失:上下文长度超过限制后,对话内容容易在压缩过程中丢失,且难以定位和查找丢失的内容。
-
上下文计数不更新:压缩上下文后,检测到的上下文数量没有变化,完全无法反映真实的上下文占用情况。这导致用户无法判断当前对话的实际状态,容易误以为还有足够空间继续对话,实际上已经压缩或丢失了大量内容。
预期行为
- 压缩后应准确反映当前上下文占用量
- 用户应能清晰看到压缩前后的上下文变化
- 丢失的对话内容应有迹可循
环境
- hermes-webui latest
- macOS
Assessmentadvisory
bug●●● hard85% confidence
Core context-management defect spanning compression algorithm, streaming integration, and frontend state sync; architectural complexity.
Likely files
- api/compression.py
- api/sessions.py
- api/streaming.py
- static/ui.js
- static/messages.js
- api/models.py
Create the request