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

Add a config option to add the current note to chat context by default #898

Open
wenzhengjiang opened this issue Dec 5, 2024 · 4 comments
Labels
good first issue Good for newcomers

Comments

@wenzhengjiang
Copy link

Is your feature request related to a problem? Please describe.
When reading or writing a note, I often need to ask related questions in the chat. But every time I have to manually add the current note to the context in the beginning. It would be great if the current note can be added to context by default.

Describe the solution you'd like
Add a setting option to pass the current note to chat context by default. Once enabled, when switching to a new note,

  • If the current chat conversation is empty, adding the current note to the chat context
  • if chat conversation is not empty, do not update context (not sure if there a better way to handle this). But when user resets chat, adding the current note to the chat context.

Describe alternatives you've considered
N/A

Additional context
N/A

@logancyang
Copy link
Owner

logancyang commented Dec 5, 2024

I thought about this too. But I dislike adding too many things to settings, so I designed it to behave like this:

There's already a flag in the code includeActiveNote. It defaults to false. But when a user manually adds an active note, it turns to true (until the user manually removes the active note, it then turns to false again). After that, when the user switches to another active note, the note with the "current" badge should be updated to the new active note (this is essentially what your suggested setting does). However this is not the case right now because a previous change messed it up.

So, at the moment we can say it's a bug: "current" note does not update to new active note after switching.

The bug should be fixed in ChatInput.tsx where it should listen to an event that the active note has changed.

@logancyang logancyang added the good first issue Good for newcomers label Dec 5, 2024
@wenzhengjiang
Copy link
Author

wenzhengjiang commented Dec 5, 2024

Nice! Glad that the code path already exists!

It defaults to false.

Hmm... I wonder if it's better to make it default to true, which seems more align with being a copilot - an assistant always tracks your active note and ready to help you right away.

@logancyang
Copy link
Owner

logancyang commented Dec 5, 2024

My thinking is that we don't really care whether it defaults to true or false. Once you add an active note with that + button, it flips to true and stays true. There's no extra toggle in the setting you need to worry about.

From the other side of the isle, users may want to have simple chats and ad-hoc questions without the note as context, myself included. 80%+ of my chats are without context, or I only need the context for a particular turn of my conversation, so I add and remove it just for that turn. The point I want to make is that every user is different and we want to decrease the actions they have to make and the mental load they have to remember to achieve their goal.

@logancyang
Copy link
Owner

Just FYI, in 2.7.7, current note in context gets updated as you switch notes. The bug is fixed.

As for the new setting, I am inclined not to have an extra setting just to flip this flag.

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

No branches or pull requests

2 participants