soulsands / trilium-chat

Chat plugin highly integrated with Trilium
https://soulsands.github.io/trilium-chat/
GNU Affero General Public License v3.0
84 stars 11 forks source link

Fix misspellings, show user API error in message #8

Closed perfectra1n closed 1 year ago

perfectra1n commented 1 year ago

Hi @soulsands,

Thanks again for making this great widget! I wanted to try my hand at fixing some of the misspellings in the code and those that are also user-facing.

I also tried my hand at figuring out why appending messages to notes saved the formatting versus using the child command to create a new child note with GPT output. It seems that the createNewNote backend function doesn't translate newline characters, or any markdown characters for that reason (which I'm sure you already know)...

I also tried to see if there was some way to set the title of the note (after running the child command) to the initial prompt that was sent to establish the GPT thread, but I wasn't able to figure out how to do so :(

I also wasn't able to fix the Bootstrap spacing underneath the "Send a message..." box, I'm honestly horrible at JavaScript but I wanted to try to help lol. image

Hopefully you find this PR helpful! Feel free to make any changes you see fit, or to just toss it in the trash lol. Have a good day :)

soulsands commented 1 year ago

Hi @perfectra1n ,thanks for the contribution! I managed to handle the style issue and made some changes.

I also tried to see if there was some way to set the title of the note (after running the child command) to the initial prompt that was sent to establish the GPT thread, but I wasn't able to figure out how to do so :(

I submitted a PR, not sure if this is what you want, please take a look. https://github.com/perfectra1n/trilium-chat/pull/1 Thank you again for your attention.

perfectra1n commented 1 year ago

Yeah that was exactly it! Thanks for fixing my mistake lol. Again, I really appreciate your effort into making this. I use it a ton.

soulsands commented 1 year ago

@perfectra1n You're welcome! I'm glad it helped and that you find it useful. If you have any more ideas or suggestions, feel free to share them with me!