v0.7.5-rc2 (#3976)

*  v0.7.5-rc2

* docs: update README

* refactor(settings): Update rememberForkOption default value

* a11y: proper screen reader announcements for content blocks

* Update version to 0.7.423 in package-lock.json and packages/data-provider/package.json

* chore: rename rememberForkOption -> rememberDefaultFork to apply new default value

* fix: headlessui menu stealing focus from Settings Dialog when pressing Enter
This commit is contained in:
Danny Avila 2024-09-10 19:00:27 -04:00 committed by GitHub
parent d6c0121b19
commit 020995514e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 92 additions and 43 deletions

View file

@ -40,6 +40,26 @@ export const getLatestText = (message?: TMessage | null, includeIndex?: boolean)
return '';
};
export const getAllContentText = (message?: TMessage | null): string => {
if (!message) {
return '';
}
if (message.text) {
return message.text;
}
if (message.content && message.content.length > 0) {
return message.content
.filter((part) => part.type === ContentTypes.TEXT)
.map((part) => (typeof part.text === 'string' ? part.text : part.text.value) ?? '')
.filter((text) => text.length > 0)
.join('\n');
}
return '';
};
export const getTextKey = (message?: TMessage | null, convoId?: string | null) => {
if (!message) {
return '';