Repository navigation
fix(issue#40,#41): escape prompt-variable braces + overlay close overlap - #42
Merged
Merged
Conversation
- #40: run-based brace escaping at the injection boundary ({{→{\{、}}→\}\}), covers odd runs like {{{a}}}; gated by escapePromptVariables (default on) so DSH interpolate() never sees an illegal {{...}} to throw on - #41: MemoryOverlay top bar left-aligned, close button clears the host window-control cluster (min/max/close) and stays clickable Co-Authored-By: Claude <[email protected]>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
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.
修复内容
issue #40 — 记忆内容含
{{...}}模板语法时整轮崩溃DSH 核心
interpolate()会把{{name}}当 prompt 变量严格校验(变量名须匹配/^[a-z][a-z0-9_]*$/),记忆里合法的模板语法(如{{hl|}}、{{挖空}}、{{关键词}})因非法变量名直接 throw,整轮失败。修复:注入边界做 run-based 花括号转义(
{{a}}→{\{a\}\}),连续 2+ 个花括号之间插反斜杠,奇数连续(如{{{a}}})也不残留字面{{,interpolate()不再扫描到。覆盖 memory 块 / 短期上下文 / 用户设置三处注入出口,新增配置escapePromptVariables(默认开,关闭时原样透传)。转义幂等、单花括号不受影响。issue #41 — 记忆窗口关闭按钮重叠无法关闭
MemoryOverlay全屏覆盖层顶栏右侧的关闭按钮,与宿主窗口标题栏控制按钮(最小化/最大化/关闭)落在同一区域,宿主控制按钮浮在 web 内容最上层,抢走关闭按钮点击热区。修复:顶栏改为左对齐(标题 + 关闭按钮并排),关闭按钮离开右上角宿主控制按钮区,任何窗口尺寸下都可见可点。
验证
{{{a}}}奇数括号回归)Fixes #40, #41
🤖 Generated with Claude Code