DevoxxGenieIDEAPlugin icon indicating copy to clipboard operation
DevoxxGenieIDEAPlugin copied to clipboard

[ENHANCE] When the full project is added to the Prompt Context, other files added are ignored

Open mydeveloperplanet opened this issue 9 months ago • 1 comments

With #433 the ChatMessageContextUtil.setWindowContext is changed.

// First handle any existing project context
        if (projectContext != null && isProjectContextAdded) {
            // If the full project is added as context, set it and ignore any attached files
            chatMessageContext.setFilesContext(projectContext);
        } else {
            // We don't include separate added files to the context if the full project is already included
            processAttachedFiles(chatMessageContext);
...

When the full project is added, other added files are ignored.

Some remarks about this:

  • I add the full project to the context. But I do want to add some additional files which otherwise would be ignored. E.g. generated sources in the target directory. Ignoring these files is implicit now.
  • If this functionality remain this way, it should be made explicit. E.g. A message should be raised when adding extra files ('Adding these files will be ignored because the full project was added').

My proposal is to allow adding extra files. It is the responsibility of the user not to add files multiple times. I can fix this, if you agree upon this.

mydeveloperplanet avatar Mar 01 '25 15:03 mydeveloperplanet

Adding additional files to a full project is perfectly fine for me, as long as they are not part of the original project. I recently fixed an issue where users could accidentally add the same file twice.

stephanj avatar Mar 02 '25 08:03 stephanj