aws/aws-toolkit-vscode

amazonq: Illegal argument: character must be non-negative

ege0zcan opened this issue · 1 comments

Problem

When trying to make a code selection from my IDE and send it to Q, if my selection reaches the end of the file, then the chat request doesn't happen due to an error

Kapture.2024-10-07.at.14.29.11.mp4

Steps to reproduce the issue

  • Open the text editor, click on any line to place the cursor
  • Press CMD + Shift + Down Arrow to select contents from the cursor location to the end of the file
  • Either use send to prompt or type a message in the Q panel
  • You get the error:
An error occurred while processing your request.
This error is reported to the team automatically. We will attempt to fix it as soon as possible.

Details: Illegal argument: character must be non-negative

Expected behavior

  • There shouldn't be any error when making the request

System details (run AWS: About and/or Amazon Q: About)

OS: Amazon Linux 2 (reproducible on MacOS as well)
Visual Studio Code extension host: 1.94.0
Amazon Q: 1.28.0
node: 20.16.0