功能:自动压缩提议每会话至多弹一次——autoCompressProposed 闸门(事件确有 SSE 观看者送达才计数,无人看则下回合仍有机会);确认/取消后本会话均不再打扰,想压可手动点「压缩」;删会话/清空历史/重启服务重置额度;前端取消 toast 文案同步
This commit is contained in:
@@ -1435,7 +1435,7 @@
|
||||
}
|
||||
|
||||
// 自动压缩提议(后端回合结束+宽限期后发 auto_compress 事件,不再自启):弹 modal 由用户手动确认。
|
||||
// 取消/忽略 = 本轮不压(下个超长回合结束后会再提议);防重入:确认期间不叠加弹窗。
|
||||
// 取消/忽略 = 本会话不再提议(服务端闸门,想压可手动点「压缩」);防重入:确认期间不叠加弹窗。
|
||||
async function proposeAutoCompress(d) {
|
||||
const sid = state.sessionId;
|
||||
if (!sid || state.view !== 'chat' || state.status !== 'held') return; // 会话已有新动静,提议过期
|
||||
@@ -1450,7 +1450,7 @@
|
||||
} finally {
|
||||
_autoCompressPrompting = false;
|
||||
}
|
||||
if (!ok) { toast('已跳过本次自动压缩'); return; }
|
||||
if (!ok) { toast('已跳过,本会话不再自动提议压缩'); return; }
|
||||
if (state.sessionId !== sid) return; // 确认期间切了会话,作废
|
||||
if (state.status === 'active') { toast('AI 正在输出,本次提议作废,可稍后手动压缩'); return; }
|
||||
await startSummary();
|
||||
|
||||
Reference in New Issue
Block a user