Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terminal Chat code-insert button sometimes inserts entirely commented-out code #18186

Open
lukejjh opened this issue Nov 13, 2024 · 0 comments
Open
Assignees
Labels
Area-Chat All things LLM or "AI" Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.

Comments

@lukejjh
Copy link

lukejjh commented Nov 13, 2024

Windows Terminal version

1.23.3171.0

Windows build number

10.0.26120.0

Other Software

  • OpenAI
  • PowerShell 7

Steps to reproduce

  1. Open Terminal Chat and provide a prompt which might result in multiple lines of code, such as "connect to Exchange Online and list all mailboxes".
  2. Ensure the code starts with a comment (#).
  3. Click the insert/copy icon next to the code block.

Expected Behavior

Possible options:

  • The insert button doesn't insert comments into the terminal; they are filtered out.
  • Line breaks are inserted so that single-line comments are "broken out of".
  • Comments aren't included in code blocks (i.e. the system prompt is modified to instruct the model not to include comments).

Actual Behavior

When there is multi-line code with a leading single-line comment inserted, the code (including comments) are inserted as all one line, meaning that the first comment comments out the entirety of the command, leaving no actual commands.

The code can be manually modified to remove comments, but this greatly takes away from the convenience of just being able to click the code-insert button and have working code just run.

Image
Image

@lukejjh lukejjh added Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Nov 13, 2024
@carlos-zamora carlos-zamora added Product-Terminal The new Windows Terminal. Area-Chat All things LLM or "AI" labels Nov 20, 2024
@carlos-zamora carlos-zamora added this to the Terminal v1.23 milestone Nov 20, 2024
@carlos-zamora carlos-zamora removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Nov 20, 2024
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Chat All things LLM or "AI" Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

3 participants