rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:itstartstosnow/dsh-context-window-reminder
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
中文 | English
给 agent 的轻量上下文窗口提醒,不是账号/套餐用量提醒。
DSH 不会在每轮对话里主动把模型上下文窗口用量注入给模型。模型有时会猜测剩余空间,e.g.,误以为上下文快满了所以偷工减料。本插件会在提示词中增加轻量提醒,告诉 agent 自己用了多少上下文:
Context window: 392k / 1M tokens used (39%)
❌ 仅关注上下文窗口,不涉及账单、套餐、账号用量等 usage 数据。
设计上刻意保持最小:每次只给一条数据,不做任何判断、建议、阈值或状态分级;这条数据怎么用、要不要收敛、要不要继续,由模型自行决定。
适用于 DeepSeek Harness(dsh)0.2.1-rc.x,Host 插件,安装后对所有会话生效。
用前,模型看不到任何占用数据:
你:帮我重构这个模块
模型:(只能靠猜……"我读了不少文件,可能快满了")
用后,你的消息后面多一条可折叠的上下文提示(模型可见,界面上是灰色的"上下文注入"行):
你:帮我重构这个模块
Context window: 392k / 1M tokens used (39%) ← 新增,可折叠,不是你说的话
模型:……(知道还有约 60% 空间,自行判断怎么安排)
更细的接入点、数据字段、去重投影和验证记录见 doc/technical.md(中文)。
npm:
dsh plugin --profile <profile 名> install @itstartstosnow/dsh-context-window-reminder
本地开发(link 本目录):
plugin_manager install_bundle target: <本目录绝对路径>dsh plugin --profile <profile 名> install link:<本目录绝对路径>安装通常热生效;如果之后修改了本地代码,需要重启一次 DSH 让模块重新加载。
默认每 20 步、也覆盖 subagent 会话。要调整就在 profile 的 cordis.patch.yml 里按行 id 覆盖:
- id: context-window-reminder
name: '@itstartstosnow/dsh-context-window-reminder'
config:
everySteps: 20
includeSubagents: true
| 字段 | 默认 | 含义 |
|---|---|---|
everySteps |
20 |
同一轮内再次注入的步数间隔 |
includeSubagents |
true |
是否也向子代理会话注入 |
关闭:plugin_manager set_plugin entryId: include:context-window-reminder enabled: false;彻底移除:plugin_manager remove_bundle target: @itstartstosnow/dsh-context-window-reminder。
MIT,见 LICENSE。
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek-harness。