@dpskh/tool-rewind
探索折叠插件:将最近一次检查点之后的所有对话内容折叠为自动生成的摘要报告,在保留结果的同时精简上下文。
AI 分析
核心用途是节省 Token 并清理上下文噪音。适合长对话、多步骤调试任务。必要条件:需配合 @dpskh/tool-checkpoint 插件使用。
安裝
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:dpskh/dsh-rewind說明文件
閱讀完整 README ↗Configuration
- id: tool-rewind
name: '@dpskh/tool-rewind'
config:
toolName: rewind # model-facing tool name (default rewind)
maxTokens: 1024 # summarization output budget
maxSummarizationRetries: 2 # empty-completion retries before failing
summarizationProvider: deepseek # optional override of the routed provider
summarizationModel: deepseek-chat
reportLanguage: en # en | zh (report instruction language)
Provider/model resolution order for the report call: configured overrides, then the session's last routed request/header config, then the agent's options. Missing all three fails loud.
The report call runs with thinking disabled when the route exposes an off reasoning effort — condensing an exploration is mechanical, and a reasoning model's thinking tokens otherwise compete with the report text under maxTokens (thinking can exhaust the budget before any text starts, leaving an empty completion). Empty completions retry up to maxSummarizationRetries; an exhausted budget rejects with a message carrying the finish reason and token usage, which the rejection message preserves.