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

FIX: Chat memory is not cleared when opening new project #413 #422

Merged
merged 1 commit into from
Dec 28, 2024

Conversation

samkerr4coding
Copy link
Contributor

related to : Chat memory is not cleared when opening new project #413

Modification of FileListManager so each VirtualFiles and File observers are segregated by project in a Hashmap data structure with project.getLocationHash() as Map, consequently "project" become a argument for each calls

Previously ChatMessageContextUtil was calling a getFiles method on FileLIstManager at:

List<VirtualFile> files = FileListManager.getInstance().getFiles(); grabbing indistinctively files belonging to the collection of files in FileListManager (Lists)

Now FileListManager is handling files and observers to these files in a hashmap.

In term of test (reproducing @mydeveloperplanet use case):

  • Add a file to the prompt context (errorHandler.java)
  • ask a question 'tell me something about this file' (running /explain)
  • The response explains the file

image

Then

  • open a new project (in a new IntelliJ window)
  • ask a question 'tell me something about this file' (give me opitmizations on ErrorHandler class)
  • The response is about the file added in step 1 (from another project) --> the response in the screenshot show the LLM has not be informed of any file named ErrorHandler in the chat context

image

… and File observers are segregated by project in a Hashmap data structure with project.getLocationHash() as Map, consequently "project" become a argument for each calls
@stephanj stephanj merged commit c12db64 into devoxx:master Dec 28, 2024
1 check passed
@stephanj
Copy link
Contributor

Great work, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants