mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-22 11:20:15 +01:00
✨ 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:
parent
d6c0121b19
commit
020995514e
23 changed files with 92 additions and 43 deletions
|
|
@ -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 '';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue