Liangebra/dsh-smart-compact ↗★ 0
dsh-smart-compact
自定义 DSH 压缩引擎后端:支持可配置的阈值提示、极限强制回退、基于 DCP 的去重/清理、自定义摘要提示词及 /compact 命令。无外部状态。
AI 分析
核心用途是自动或手动压缩长会话上下文,防止超出模型限制。适合需要进行超长对话、频繁触发上下文超限的重度用户。
安裝
此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗
說明文件
閱讀完整 README ↗Configuration
| Option | Default | Meaning |
|---|---|---|
thresholdRatio | 0.5 | Context-usage fraction where the advisory nudge appears (agent/pre-step); the model decides whether to use the compress tool. |
mandatoryRatio | 0.9 | At/above this the engine auto-compacts the largest compressible span once per turn. |
summarizationMaxTokens | 8192 | Generation cap for the direct ctx.llm.stream summary call (purpose: 'compaction'). |
preserveRecent | 5 | Number of newest surface nodes never auto-compressed. |
dedupEnabled | true | Offer DCP-style dedup suggestions in dcp_status. |
purgeErroredTurns | 4 | Offer purge suggestions for the N most recent errored turns. |
protectedTools | [] | Tool names whose call/result pairs are never compressed. |
protectUserMessages | false | Keep every user message verbatim (never compress them). |
summaryPrompt | built-in | Full prompt template; {content} is replaced with the span text. |
modelContextLimit | auto-probed | Explicit context window (tokens) that wins over model probing. |
autoNudge | true | Enable the threshold advisory nudge. |
autoTools | true | Register compress and dcp_status model tools. |