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: 4086 - editing message should not send follow-up messages #4116

Merged
merged 1 commit into from
Nov 25, 2024

Conversation

louis-jan
Copy link
Contributor

@louis-jan louis-jan commented Nov 25, 2024

Describe Your Changes

When editing a message, for instance, "A of A _ B _C," it sends "A B C A" instead of just "A."

CleanShot 2024-11-25 at 17 32 16@2x

Fixes Issues

Changes made

  1. useSendChatMessage.ts:

    • The sendChatMessage function's signature has been updated to accept an optional messages parameter of type ThreadMessage[].
    • When calling requestBuilder.requestThread, if messages is provided, it will be used; otherwise, currentMessages will be used as before.
  2. index.tsx:

    • Within the EditChatInput component, the call to sendChatMessage has been updated to pass newMessages as the second argument, matching the updated function signature.

These changes likely aim to provide more flexibility when sending chat messages by allowing an optional thread message array to be passed to the sendChatMessage function.

@github-actions github-actions bot added the type: bug Something isn't working label Nov 25, 2024
@louis-jan louis-jan requested a review from urmauur November 25, 2024 10:42
Copy link
Contributor

Barecheck - Code coverage report

Total: 69.21%

Your code coverage diff: 0.00% ▴

Uncovered files and lines
FileLines
web/hooks/useSendChatMessage.ts92-96, 98, 100, 102, 110, 113, 118-119, 121-126, 129-130, 135, 142, 144-146, 149, 151-152, 154, 156-158, 160, 164, 166, 170, 173-174, 180-181, 185, 196, 199, 203, 206, 209, 217, 220, 226, 229-230, 233-239, 242, 245, 248, 251, 254, 259-260
web/screens/Thread/ThreadCenterPanel/EditChatInput/index.tsx40-42, 44-51, 53-54, 57-61, 65-69, 74-75, 79-85, 93, 98-103, 107-108, 141, 149, 157, 160

@louis-jan
Copy link
Contributor Author

@louis-jan louis-jan merged commit a5acaf0 into dev Nov 25, 2024
21 checks passed
@louis-jan louis-jan deleted the fix/do-not-send-follow-messages-on-edit branch November 25, 2024 12:10
@github-actions github-actions bot added this to the v0.5.10 milestone Nov 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants