You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use /terminal to import terminal context into the Assistant, it will include linebreaks which correspond to your terminal width. This extra linebreaks can confuse the assistant.
Adjust the width of your terminal so that the command is split across multiple lines
Open the Assistant and type /terminal
Adjust the width of your terminal window and do /terminal again
Actual Behavior: Assistant gets a linebreak where softwraps in terminal occur.
# Original text (pasted from script)
perl -i -pe \
's/"vscode-languageserver(\/node)?"/"\@zed-industries\/vscode-languageserver$1"/g' packages/css/lib/node/cssServerMain.js
# Terminal is ~80chars wide
Terminal output:
~/zcode/vscode-extracted (main) $ perl -i -pe \
's/"vscode-languageserver(\/node)?"/"\@zed-industries\/vscode-languageserver$1"/g' pa
ckages/css/lib/node/cssServerMain.js
# Super wide terminal
Terminal output:
~/zcode/vscode-extracted (main) $ perl -i -pe \
's/"vscode-languageserver(\/node)?"/"\@zed-industries\/vscode-languageserver$1"/g' packages/css/lib/node/cssServerMain.js
Expected Behavior: The width of the terminal should have no impact on the context provided to the Assistant
The \\n in the original command is not necessary to trigger this behavior, but it helps demonstrate that real linebreaks should be preserved
Noticeably, an extra linebreak can totally confuse the assistant as it can totally change the token boundaries. Mine split between "packages" and "/css/lib/node/cssServerMain.js" and Claude was convinced I had provided two filenames and assumed that was the source of my bug. (I was troubleshooting the regex).
Summary
If you use
/terminal
to import terminal context into the Assistant, it will include linebreaks which correspond to your terminal width. This extra linebreaks can confuse the assistant.Steps to trigger the problem:
perl -i -pe \ 's/"vscode-languageserver(\/node)?"/"\@zed-industries\/vscode-languageserver$1"/g' packages/css/lib/node/cssServerMain.js
/terminal
/terminal
againActual Behavior: Assistant gets a linebreak where softwraps in terminal occur.
Expected Behavior: The width of the terminal should have no impact on the context provided to the Assistant
The
\\n
in the original command is not necessary to trigger this behavior, but it helps demonstrate that real linebreaks should be preservedNoticeably, an extra linebreak can totally confuse the assistant as it can totally change the token boundaries. Mine split between "packages" and "/css/lib/node/cssServerMain.js" and Claude was convinced I had provided two filenames and assumed that was the source of my bug. (I was troubleshooting the regex).
Zed Version and System Specs
Zed: v0.176.0 (Zed Nightly 4871d3c)
OS: macOS 15.3.0
Memory: 64 GiB
Architecture: aarch64
The text was updated successfully, but these errors were encountered: