Repository navigation
[pull] main from slow-stack:main - #34
Merged
Merged
Conversation
issue #334:注入路径 4 处截断点(热上下文查询/回复 500/800、 lastUserQuery 500、记忆条目 injectContentMaxChars)UTF-16 slice 切在代理对中间留下孤立高位代理项,序列化成非法 UTF-8 后 DeepSeek API 每轮 400,且畸形文本永久写入会话历史。新增 safeSlice(尾字符 为高位代理即丢弃),4 处截断点全部换用;测试以「孤立代理项不存在」 锁语义,附变异阴性对照。 issue #333(issue #34 恢复):injectTimePrefix 于 v0.7.11 面板 大改版时随一次批量删除静默消失(CHANGELOG 无登记,同刀的 escapePromptVars 已随 #162/#165 恢复、本函数漏了)。按 v0.7.2 语义原样恢复:键名/默认值/格式不变,per-session 闩锁每会话一次, 时间前缀排记忆块最前(时间 → 热上下文 → 长期记忆)。settings 白名单、面板双语、FEATURE_GROUPS、配置计数锁同步。 全量 1429/1428/0。
1. lastUserQuery 移除预截断:先 slice(0,500) 再 safeSlice 时,恰好 500 长的串会绕过孤立代理项检查(length<=limit 早退),畸形 query 流向 embedQuery/轮换记录/injectionSnapshot。改为全文直接 safeSlice; 补快照 query 干净性断言。 2. 时间前缀闩锁改按会话集合:单值闩锁在 A→B→A 交替渲染下会让 A 重复注入。改 Set(上限 500 逐出最早,防长驻进程无界增长);补 A-B-A 用例,变异阴性对照红。 全量 1431/1430/0。
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )