gpt4all icon indicating copy to clipboard operation
gpt4all copied to clipboard

Fixes for issue #2519.

Open manyoso opened this issue 1 year ago • 0 comments

Send text directly into the text document from the chat view rather than using a signal to post process the text. This is still not ideal in that we want to move to preprocessing the text in the future and to do so by streaming the content in rather than replacing it all at the same time, but it does fix a hang that we experience with an infinite recursive loop of text changed signals in the markdown processing.

This fixes issue #2519.


:rocket: This description was created by Ellipsis for commit 068343fbfaef73d99ad005cfc7603a7435da3055

Summary:

Fixes issue #2519 by sending text directly to the text document in the chat view, avoiding infinite recursive loops during markdown processing.

Key points:

  • Fixes issue #2519 by sending text directly to the text document in the chat view, avoiding infinite recursive loops during markdown processing.
  • Removed forceUpdate method from gpt4all-chat/chatmodel.h.
  • Added valueChanged signal in ChatModel class in gpt4all-chat/chatmodel.h.
  • Modified updateValue method in ChatModel to emit valueChanged signal.
  • Replaced m_textDocument with m_quickTextDocument in ChatViewTextProcessor class in gpt4all-chat/chatviewtextprocessor.cpp and gpt4all-chat/chatviewtextprocessor.h.
  • Added setValue method to ChatViewTextProcessor class to set plain text directly.
  • Updated ChatView.qml to use textProcessor.setValue(value) instead of chatModel.forceUpdate(index).

Generated with :heart: by ellipsis.dev

manyoso avatar Jul 03 '24 17:07 manyoso