Repository navigation
减少自动标题模型消耗,发布 auto-thread-title 0.2.1 - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
自动命名原本要求主模型先读取任务,再计算日期并写入标题。每个新任务都会携带完整命名指令并增加一次读取工具往返。
匹配项目范围后,钩子改为在本机预读当前任务元数据,核对身份、目录和创建时间,计算上海日期;已合规的标题直接跳过。正常路径只向模型注入日期和精简规则,仍由当前模型理解用户请求并写入一次标题,可与首批业务操作放在同一工具批次。代表性路径的指令从 756 减至 326 个 Unicode 字符,约减少 57%;这不等同于账户额度减少 57%。
读取仅允许当前 ID 的一次
thread/read,强制includeTurns: false;不允许列表、写操作或模型回合,不向主模型传递标题、preview、回合正文等响应内容。不新增 MCP 服务或 npm 依赖。接口不支持、暂不可读或读取超时时回退原流程;身份、目录或子任务类型不匹配则跳过。元数据预读有独立时间上限,项目发现过慢时直接保留原流程。版本更新为
0.2.1,保持正式 SemVer 命名。验证:Windows / Node.js 24 下 95 项测试中 85 通过、10 平台跳过;覆盖正常及手动范围、合规标题、身份/目录冲突、跨日日期、接口失败/超时及恢复、元数据白名单和进程清理。插件及配置技能校验、11 个文档链接通过。本机实际 Windows 启动命令对已有任务的只读预检成功并输出完整精简规则;未发起模型任务或写入真实标题。首次新任务的元数据可见性和桌面自动改名仍需对应环境验收。