refresh profiles stream error dialog updates

This commit is contained in:
Dallin Romney 2025-02-26 16:07:01 -08:00
parent bd6cfb047f
commit fb2d2907f7

View file

@ -26,6 +26,12 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => {
);
const { session, refreshProfiles } = useAuth();
const handleRefreshProfiles = () => {
refreshProfiles();
dispatch(setShowDialog(false));
dispatch(setDialogMessage(undefined));
};
// Collect model information to display useful error info
let modelTitle = "Chat model";
let providerName = "the model provider";
@ -151,9 +157,9 @@ const StreamErrorDialog = ({ error }: StreamErrorProps) => {
session &&
selectedProfile &&
!isLocalProfile(selectedProfile) && (
<div>
<span>{`If your hub secret values may have changed, refresh your profiles`}</span>
<SecondaryButton onClick={refreshProfiles}>
<div className="flex flex-col gap-1">
<span>{`If your hub secret values may have changed, refresh your assistants`}</span>
<SecondaryButton onClick={handleRefreshProfiles}>
Refresh profile secrets
</SecondaryButton>
</div>