🔧 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:
Danny Avila 2025-12-29 21:42:21 -05:00 committed by GitHub
parent c7469ce884
commit dcda6a249c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 46 additions and 29 deletions

View file

@ -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 = [];