fix: 通过快捷方式打开mxu无法启动pretask进程#292
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Hey - 我在这里提供了一些总体反馈:
- 新的
resolved_program逻辑是特定于 Windows 的,但却始终被应用;请考虑使用cfg!(windows)来保护该行为,或者在注释中澄清这种路径规范化是否也预期影响非 Windows 平台。 resolve_child_exec_path现在返回一个PathBuf,随后立刻通过to_string_lossy转换;如果build_launch_command能接受OsStr/Path,建议避免有损转换,以便在文件系统条目不是 UTF-8 的情况下也能保留精确路径。
给 AI Agent 的提示
请解决本次代码评审中的各条评论:
## 总体评论
- 新的 `resolved_program` 逻辑是特定于 Windows 的,但却始终被应用;请考虑使用 `cfg!(windows)` 来保护该行为,或者在注释中澄清这种路径规范化是否也预期影响非 Windows 平台。
- `resolve_child_exec_path` 现在返回一个 `PathBuf`,随后立刻通过 `to_string_lossy` 转换;如果 `build_launch_command` 能接受 `OsStr`/`Path`,建议避免有损转换,以便在文件系统条目不是 UTF-8 的情况下也能保留精确路径。帮我变得更有用!请在每条评论上点击 👍 或 👎,我会根据你的反馈改进后续评审。
Original comment in English
Hey - I've left some high level feedback:
- The new
resolved_programlogic is Windows-specific but always applied; consider either guarding the behavior withcfg!(windows)or clarifying in comments whether the path normalization is intended to affect non-Windows platforms as well. resolve_child_exec_pathnow returns aPathBufthat is immediately converted withto_string_lossy; ifbuild_launch_commandcan acceptOsStr/Path, consider avoiding lossy conversion to preserve exact paths, especially for non-UTF-8 filesystem entries.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- The new `resolved_program` logic is Windows-specific but always applied; consider either guarding the behavior with `cfg!(windows)` or clarifying in comments whether the path normalization is intended to affect non-Windows platforms as well.
- `resolve_child_exec_path` now returns a `PathBuf` that is immediately converted with `to_string_lossy`; if `build_launch_command` can accept `OsStr`/`Path`, consider avoiding lossy conversion to preserve exact paths, especially for non-UTF-8 filesystem entries.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
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.
opus4.8

Summary by Sourcery
通过将可执行文件路径解析方式与代理启动逻辑对齐,确保在通过快捷方式启动 MXU 时前置任务进程能够正确启动。
Bug Fixes:
Enhancements:
Original summary in English
Summary by Sourcery
Ensure pretask processes start correctly when MXU is launched via shortcuts by aligning executable path resolution with the agent startup logic.
Bug Fixes:
Enhancements: