-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: replay as is stops working (#69)
* fix: forbade to send 'custom content' to the 'model' * fix: added selected addons to the restriction for the custom_content.state * fix: clear message state when settings have been changed * added model selector to select model by id * fix: created additional check for the model selector
- Loading branch information
1 parent
21ba7c2
commit 15cff6e
Showing
5 changed files
with
102 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
import { Message } from '@/src/types/chat'; | ||
|
||
export const clearStateForMessages = (messages: Message[]): Message[] => { | ||
return messages.map((message) => ({ | ||
...message, | ||
custom_content: { | ||
...message.custom_content, | ||
state: undefined, | ||
}, | ||
})); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters