mirror of
https://github.com/HKUDS/DeepTutor.git
synced 2026-12-02 10:50:37 +08:00
* fix(sandbox): support Windows code execution * refactor(sandbox): vary only the shell clause in the workspace note The Windows branch duplicated the whole workspace paragraph, so the note existed in four near-identical copies (zh/en x posix/windows) that would drift apart on the next edit. Only the "how do I get a script into a file" clause actually depends on the host shell, so vary that clause and keep one template per language. Also prefer `pwsh` (PowerShell 7+) when it is on PATH — it defaults to UTF-8 and is the version still receiving updates; the generated commands are written in 5.1-compatible syntax, which 7 accepts too. And hoist `import sys` to module scope now that two methods need it. Adds the tests this note never had: each host gets the syntax that works there (a Bash heredoc is a syntax error in PowerShell, and the model would silently produce no file), and the host-independent half stays byte-identical. --------- Co-authored-by: Frank <bingxizhao@novix.science>