mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-15 23:15:30 +01:00
🔧 refactor: Display name logic in Parallel Responses (#11149)
- Removed the use of `getResponseSender` for computing display names in both `Agent.js` and `loadAddedAgent.js`. - Implemented fallback logic to derive display names from `modelLabel`, `modelSpec.label`, and `endpointConfig.modelDisplayLabel`. - Enhanced comments for clarity on the new display name resolution process. - Updated `useChatFunctions` and `createDualMessageContent` to accommodate changes in sender logic, ensuring consistent handling of ephemeral agents across the application.
This commit is contained in:
parent
c7469ce884
commit
dcda6a249c
4 changed files with 46 additions and 29 deletions
|
|
@ -18,6 +18,7 @@ import type {
|
|||
TMessage,
|
||||
TSubmission,
|
||||
TConversation,
|
||||
TStartupConfig,
|
||||
TEndpointOption,
|
||||
TEndpointsConfig,
|
||||
EndpointSchemaKey,
|
||||
|
|
@ -169,6 +170,7 @@ export default function useChatFunctions({
|
|||
}
|
||||
|
||||
const endpointsConfig = queryClient.getQueryData<TEndpointsConfig>([QueryKeys.endpoints]);
|
||||
const startupConfig = queryClient.getQueryData<TStartupConfig>([QueryKeys.startupConfig]);
|
||||
const endpointType = getEndpointField(endpointsConfig, endpoint, 'type');
|
||||
const iconURL = conversation?.iconURL;
|
||||
|
||||
|
|
@ -291,6 +293,7 @@ export default function useChatFunctions({
|
|||
conversation,
|
||||
addedConvo,
|
||||
endpointsConfig,
|
||||
startupConfig?.modelSpecs?.list,
|
||||
);
|
||||
} else {
|
||||
initialResponse.content = [];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue