-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Include context in user message #1006
base: master
Are you sure you want to change the base?
Conversation
@@ -86,52 +90,19 @@ const ChatInput = forwardRef<{ focus: () => void }, ChatInputProps>( | |||
}, | |||
})); | |||
|
|||
const debounce = <T extends (...args: any[]) => any>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the debounce function and the effect that listens to input message change do the same thing. It caused duplicated context values. Tested that everything still works after removing all the debounce calls
3532a65
to
adbdfb8
Compare
adbdfb8
to
77209ba
Compare
Note that editing doesn't work as intended yet. It will make people think the edited message is sent with context but in reality it doesn't. Not sure if we want to push this change before we fix the issue. |
Right, let me look into fixing the edit and this one can rebase on that. |
I can look into this, too. It will be related to the edit UI work that will follow up on this one. |
Sounds good. Right now we have "hidden user message" that has added context in "handleSendMessage" in Chat.tsx. We also have some ad-hoc processing and appending to the user message using I think we need a clear design of a new ChatMessage object with context in it (currently in |
One thing to be careful about is that any context should be fresh in case the context notes have changed. It is working correctly at the moment for chat input, but we should avoid saving a previous context in an old ChatMessage object. |
Render context with the user message.