-
Notifications
You must be signed in to change notification settings - Fork 14.4k
The issue of being unable to create files in Windows (CR LF) format #18616
Description
Description
I use OpenCode under the Windows system. It's an excellent AI programming tool, and I really like it.
However, I am currently troubled by a problem and unsure if it can be resolved:
Using batch processing to call programs is a commonly used method in CMD/PowerShell. However, the batch files created by OpenCode are always in Unix (LF) format, whereas in the CMD/PowerShell environment, they must be in Windows (CR LF) format. Otherwise, the operation will definitely fail, especially when outputting non-English information.
This is a minor issue, but when AI encounters such problems, it often fails to solve them and can only try repeatedly, sometimes even altering the correct batch file beyond recognition.
Don't recommend me to use the WSL environment. I don't want to change my working environment.
Plugins
No plugins were used
OpenCode version
1.2.27
Steps to reproduce
- Open OpenCode
- Input prompt: Create a batch file and output the current operating system and shell environment, requiring Chinese output
- AI will create batch files and then try them out. Due to the Unix (LF) format, errors are inevitable during the run
- Then the AI will get stuck in repeated attempts at modification
Screenshot and/or share link
No response
Operating System
Windows 11
Terminal
Windows Terminal + Git Bash