aws / aws-toolkit-jetbrains

AWS Toolkit for JetBrains - a plugin for interacting with AWS from JetBrains IDEs
https://plugins.jetbrains.com/plugin/11349-aws-toolkit
Apache License 2.0
753 stars 216 forks source link

Chat: Source code is too large to use as context. Jetbrain only but not on VSCode #4491

Open CyrusTC opened 4 months ago

CyrusTC commented 4 months ago

Describe the bug Getting an error when in Amazon Q Chat using the /dev command to generate code suggestion. However, the same is not happening in VSCode, but just Jetbrain (Webstorm)

Sorry, we encountered a problem when processing your request. The project you have selected for source code is too large to use as context. Please select a different folder to use for this conversation

To reproduce

  1. create a sample nestjs project
    $ npm i -g @nestjs/cli
    $ nest new project-name
  2. In Amazon Q chat, use below prompt
    build an API that will return current server date time
  3. Wait the Generating your answer loading. Error will return

Expected behavior Same as VSCode, code - generate code suggestion.

Screenshots image

Your Environment

Additional context Manually deleting the cdk.out and node_module folders would prevent the above error in Webstorm

lecjan commented 4 months ago

Yesterday 2024-05-30 I noticed that again I am getting "too large" errors. This is disappointing as that issue was previously fixed. I work on projects larger than 200MB (~500MB). I have installed new plugin version 3.8-241 to Intellij 2024.1.2 and unfortunately I cannot retrieve any /dev results:

Sorry, we encountered a problem when processing your request. The project you have selected for source code is too large to use as context. Please select a different folder to use for this conversation.Conversation ID: 4bc18d38-9a8f-445c-ba0f-abe1734f68de

How exactly that below bug was fixed?:

3.8 (2024-05-30) (Bug Fix) Amazon Q Feature Development: Update error message when repo size larger than 200 megabytes

CyrusTC commented 4 months ago

I believe this issue is another root cause - the plugin is uploading un-necessary files and folders for analysis. For example, I have node_modules marked as excluded but dev agent is suggesting changes to file inside this folder. Should we just basically ignore files or folders specified in gitignore file ?

Eseperio commented 1 month ago

Same here. Waiting for a solution.