File tree Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Expand file tree Collapse file tree 2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change 1111 "on interpreting the requirements and translating them into a single, executable Bash command. "
1212 "Ensure accuracy and relevance to the user's description. The output should be a valid Bash "
1313 "command that directly aligns with the user's intent, ready for execution in a command-line "
14- "environment. Output nothing except for the command. No code block, no English explanation, "
15- "no start/end tags."
14+ "environment. Do not output anything except for the command. No code block, no English explanation, "
15+ "no newlines, and no start/end tags."
1616)
1717
1818
Original file line number Diff line number Diff line change @@ -61,6 +61,8 @@ async def shelloracle() -> None:
6161 shell_command = ""
6262 with create_app_session_from_tty (), patch_stdout (raw = True ), yaspin () as sp :
6363 async for token in provider .generate (prompt ):
64+ # some models may erroneously return a newline, which causes issues with the status spinner
65+ token = token .replace ("\n " , "" )
6466 shell_command += token
6567 sp .text = shell_command
6668 sys .stdout .write (shell_command )
You can’t perform that action at this time.
0 commit comments