Repository navigation
Conversation
build_dsh_patch_yaml 用行尾 `\` 续行拼接 YAML,Rust 会吃掉续行后的前导空白, 生成的 openless.patch.yml 没有任何缩进,是非法 YAML。dsh 解析补丁失败后崩溃, Less Computer 选择 dsh 后端时每次都失败。 summarize_stderr 只取以 `dsh:` 开头或含小写 `error:` 的行,而 Node 崩溃输出是 `Error: dsh: failed to parse ...`,匹配不上就回退到最后一行,界面上只剩 `Node.js v24.18.1`,看不到真实原因。 - build_dsh_patch_yaml 改用 concat! 逐行拼接,保留缩进 - summarize_stderr 对 `error:` 的匹配不再区分大小写 - 新增测试:补丁 YAML 逐字输出(含 Windows 反斜杠路径、换行、引号)、 Node 崩溃 stderr 的摘要、无匹配行时回退到最后一行
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.
摘要
Fixes #1204。
修复 Less Computer 选择
dsh后端时必然失败的问题:build_dsh_patch_yaml生成的openless.patch.yml缩进全部丢失,是非法 YAML,dsh 解析时崩溃;同时让这类失败在界面上显示真实原因,而不是只显示Node.js v24.18.1。修复 / 新增 / 改进
build_dsh_patch_yaml:不再用行尾\续行拼接(Rust 会吃掉下一行开头的空白),改用concat!逐行拼接,缩进得以保留。summarize_stderr:对error:的匹配改为不区分大小写,使 Node 崩溃输出里的Error: dsh: failed to parse ...能被选中,而不是回退到最后一行的 Node 版本号。dsh_patch_yaml_keeps_its_indentation:逐字断言生成的补丁文本(含缩进、Windows 反斜杠路径、换行和引号)。summarize_stderr_picks_the_node_crash_message_not_the_version_footer:用真实的 dsh 崩溃 stderr 断言摘要。summarize_stderr_falls_back_to_the_last_line:无匹配行时仍回退到最后一行,空输入返回None。兼容
dsh:改为contains匹配、非 0 退出时把完整 stderr 写入openless.log,这两项不在 [windows][less-computer][dsh] Windows 上 dsh 后端必然失败:生成的 openless.patch.yml 缩进丢失,界面只显示 Node 版本号 #1204 的验收标准内,未改动。openless-core/src/coding_agent.rs。summarize_stderr还被 OpenCode 模型列表命令的失败路径复用,大小写不敏感后其错误摘要也会更容易命中带Error:的行,属于同方向的改进。其它 provider 的行为不变。测试计划
cargo test --locked -p openless-core --lib -- summarize_stderr dsh_patch_yamlNode.js v24.18.1)。coding_agent模块 37 个测试全部通过。ci.yml(workflow_dispatch)YAMLException且与 issue 中一致。未编译运行完整桌面应用。